File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,14 @@ def test_mysql_default_in_strict_mode
88
99 def test_mysql_strict_mode_disabled
1010 run_without_connection do |orig_connection |
11- ActiveRecord ::Base . establish_connection ( orig_connection . merge ( { :strict => false } ) )
12- assert_equal [ [ '' ] ] , select_rows ( "SELECT @@SESSION.sql_mode" ) if ! mariadb_driver?
11+ ActiveRecord ::Base . establish_connection ( orig_connection . merge ( :strict => false ) )
12+ sql_mode = select_rows ( "SELECT @@SESSION.sql_mode" )
13+ version = ActiveRecord ::Base . connection . send ( :version )
14+ if version [ 0 ] > 6 || ( version [ 0 ] == 5 && version [ 1 ] >= 6 )
15+ assert ! sql_mode . flatten . include? ( "STRICT_ALL_TABLES" )
16+ else
17+ assert_equal [ [ '' ] ] , sql_mode unless mariadb_driver?
18+ end
1319 end
1420 end
1521
You can’t perform that action at this time.
0 commit comments