diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2013-12-08 06:51:08 +0900 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2013-12-10 11:04:09 +0900 |
commit | 75f453ff4cff8b9652cc8f54ee68f775341148e9 (patch) | |
tree | 7f178dbd7b75c5eee2b62da3633771f1d955b1b0 /activerecord/test/cases/adapters/mysql2 | |
parent | 4aae538d9ffff3a00a81f3da52fa70f7fd79ac74 (diff) | |
download | rails-75f453ff4cff8b9652cc8f54ee68f775341148e9.tar.gz rails-75f453ff4cff8b9652cc8f54ee68f775341148e9.tar.bz2 rails-75f453ff4cff8b9652cc8f54ee68f775341148e9.zip |
Support MySQL 5.7 explain
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2')
-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 |