diff options
author | Jeremy Kemper <jeremykemper@gmail.com> | 2014-09-01 22:35:56 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremykemper@gmail.com> | 2014-09-01 22:36:05 -0700 |
commit | 41e48c2874eb8b4c419b7803976646005739d5bd (patch) | |
tree | bd4ff8370790fa6e27f3c98112b437d693220f8a /activerecord/test/cases/adapters/mysql2 | |
parent | 67b42cb4aa008198e2c22b84b063aa1eb082036d (diff) | |
download | rails-41e48c2874eb8b4c419b7803976646005739d5bd.tar.gz rails-41e48c2874eb8b4c419b7803976646005739d5bd.tar.bz2 rails-41e48c2874eb8b4c419b7803976646005739d5bd.zip |
MySQL: skip GTID-unsafe statement tests when enforce_gtid_consistency is enabled
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/schema_test.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/schema_test.rb b/activerecord/test/cases/adapters/mysql2/schema_test.rb index 43c9116b5a..1b7e60565d 100644 --- a/activerecord/test/cases/adapters/mysql2/schema_test.rb +++ b/activerecord/test/cases/adapters/mysql2/schema_test.rb @@ -66,12 +66,14 @@ module ActiveRecord assert_equal :fulltext, index_c.type end - def test_drop_temporary_table - @connection.transaction do - @connection.create_table(:temp_table, temporary: true) - # if it doesn't properly say DROP TEMPORARY TABLE, the transaction commit - # will complain that no transaction is active - @connection.drop_table(:temp_table, temporary: true) + unless mysql_enforcing_gtid_consistency? + def test_drop_temporary_table + @connection.transaction do + @connection.create_table(:temp_table, temporary: true) + # if it doesn't properly say DROP TEMPORARY TABLE, the transaction commit + # will complain that no transaction is active + @connection.drop_table(:temp_table, temporary: true) + end end end end |