Permalink
Browse files

Support MySQL 5.7 explain

  • Loading branch information...
1 parent 4aae538 commit 75f453ff4cff8b9652cc8f54ee68f775341148e9 @yahonda yahonda committed Dec 7, 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 75f453f

Please sign in to comment.