From 41e48c2874eb8b4c419b7803976646005739d5bd Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 1 Sep 2014 22:35:56 -0700 Subject: MySQL: skip GTID-unsafe statement tests when enforce_gtid_consistency is enabled --- activerecord/test/cases/helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/cases/helper.rb') diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index 209ef597db..1bccd21f84 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -50,6 +50,10 @@ def mysql_56? ActiveRecord::Base.connection.send(:version).join(".") >= "5.6.0" end +def mysql_enforcing_gtid_consistency? + current_adapter?(:MysqlAdapter, :Mysql2Adapter) && 'ON' == ActiveRecord::Base.connection.show_variable('enforce_gtid_consistency') +end + def supports_savepoints? ActiveRecord::Base.connection.supports_savepoints? end -- cgit v1.2.3