Skip to content

Commit 75f453f

Browse files
committed
Support MySQL 5.7 explain
1 parent 4aae538 commit 75f453f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

activerecord/test/cases/adapters/mysql2/explain_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ class ExplainTest < ActiveRecord::TestCase
1010
def test_explain_for_one_query
1111
explain = Developer.where(:id => 1).explain
1212
assert_match %(EXPLAIN for: SELECT `developers`.* FROM `developers` WHERE `developers`.`id` = 1), explain
13-
assert_match %(developers | const), explain
13+
assert_match /developers |.* const/, explain
1414
end
1515

1616
def test_explain_with_eager_loading
1717
explain = Developer.where(:id => 1).includes(:audit_logs).explain
1818
assert_match %(EXPLAIN for: SELECT `developers`.* FROM `developers` WHERE `developers`.`id` = 1), explain
19-
assert_match %(developers | const), explain
19+
assert_match /developers |.* const/, explain
2020
assert_match %(EXPLAIN for: SELECT `audit_logs`.* FROM `audit_logs` WHERE `audit_logs`.`developer_id` IN (1)), explain
21-
assert_match %(audit_logs | ALL), explain
21+
assert_match /audit_logs |.* ALL/, explain
2222
end
2323
end
2424
end

0 commit comments

Comments
 (0)