Permalink
Browse files

Merge pull request #13248 from yahonda/support_mysql573_explain

Support MySQL 5.7 explain
  • Loading branch information...
2 parents 26cea8f + 75f453f commit 2fd067c33b8ba711b7d11f4daaae94142f2fe407 @jeremy jeremy committed Dec 10, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/test/cases/adapters/mysql2/explain_test.rb
@@ -10,15 +10,15 @@ class ExplainTest < ActiveRecord::TestCase
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

0 comments on commit 2fd067c

Please sign in to comment.