diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-12-09 23:22:32 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2013-12-09 23:22:32 -0800 |
commit | 2fd067c33b8ba711b7d11f4daaae94142f2fe407 (patch) | |
tree | 0177781a94839ca8a7b3ab494acc03b397baca86 | |
parent | 26cea8fabe828e7b0535275044cb8316fff1c590 (diff) | |
parent | 75f453ff4cff8b9652cc8f54ee68f775341148e9 (diff) | |
download | rails-2fd067c33b8ba711b7d11f4daaae94142f2fe407.tar.gz rails-2fd067c33b8ba711b7d11f4daaae94142f2fe407.tar.bz2 rails-2fd067c33b8ba711b7d11f4daaae94142f2fe407.zip |
Merge pull request #13248 from yahonda/support_mysql573_explain
Support MySQL 5.7 explain
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/explain_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/explain_test.rb b/activerecord/test/cases/adapters/mysql2/explain_test.rb index 68ed361aeb..49f9b44e1b 100644 --- a/activerecord/test/cases/adapters/mysql2/explain_test.rb +++ b/activerecord/test/cases/adapters/mysql2/explain_test.rb @@ -10,15 +10,15 @@ module ActiveRecord def test_explain_for_one_query explain = Developer.where(:id => 1).explain assert_match %(EXPLAIN for: SELECT `developers`.* FROM `developers` WHERE `developers`.`id` = 1), explain - assert_match %(developers | const), explain + assert_match /developers |.* const/, explain end def test_explain_with_eager_loading explain = Developer.where(:id => 1).includes(:audit_logs).explain assert_match %(EXPLAIN for: SELECT `developers`.* FROM `developers` WHERE `developers`.`id` = 1), explain - assert_match %(developers | const), explain + assert_match /developers |.* const/, explain assert_match %(EXPLAIN for: SELECT `audit_logs`.* FROM `audit_logs` WHERE `audit_logs`.`developer_id` IN (1)), explain - assert_match %(audit_logs | ALL), explain + assert_match /audit_logs |.* ALL/, explain end end end |