Permalink
Browse files

Revert "Rename to test_mysql_strict_mode_disabled_dont_override_globa…

…l_sql_mode"

This reverts commit babc24c.

Conflicts:

	activerecord/test/cases/adapters/mysql/connection_test.rb
	activerecord/test/cases/adapters/mysql2/connection_test.rb
  • Loading branch information...
yahonda committed Jul 16, 2014
1 parent 7b52a26 commit 599d138465f772ac6bf9cfe1f10d4937a0604912
@@ -134,12 +134,11 @@ def test_mysql_default_in_strict_mode
assert_equal [["STRICT_ALL_TABLES"]], result.rows
end
def test_mysql_strict_mode_disabled_dont_override_global_sql_mode
def test_mysql_strict_mode_disabled
run_without_connection do |orig_connection|
ActiveRecord::Base.establish_connection(orig_connection.merge({:strict => false}))
global_sql_mode = ActiveRecord::Base.connection.exec_query "SELECT @@GLOBAL.sql_mode"
session_sql_mode = ActiveRecord::Base.connection.exec_query "SELECT @@SESSION.sql_mode"
assert_equal global_sql_mode.rows, session_sql_mode.rows
result = ActiveRecord::Base.connection.exec_query "SELECT @@SESSION.sql_mode"
assert_equal [['']], result.rows
end
end
@@ -60,12 +60,11 @@ def test_mysql_default_in_strict_mode
assert_equal [["STRICT_ALL_TABLES"]], result.rows
end
def test_mysql_strict_mode_disabled_dont_override_global_sql_mode
def test_mysql_strict_mode_disabled
run_without_connection do |orig_connection|
ActiveRecord::Base.establish_connection(orig_connection.merge({:strict => false}))
global_sql_mode = ActiveRecord::Base.connection.exec_query "SELECT @@GLOBAL.sql_mode"
session_sql_mode = ActiveRecord::Base.connection.exec_query "SELECT @@SESSION.sql_mode"
assert_equal global_sql_mode.rows, session_sql_mode.rows
result = ActiveRecord::Base.connection.exec_query "SELECT @@SESSION.sql_mode"
assert_equal [['']], result.rows
end
end

0 comments on commit 599d138

Please sign in to comment.