diff options
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb.test')
-rw-r--r-- | mysql-test/suite/innodb/t/innodb.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index 3a8c12dfbbd..35b11a9f367 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -1109,7 +1109,13 @@ CREATE TABLE t2 ( ) ENGINE=InnoDB; INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9"); +# We have to analyze the tables to make the row count stable +ANALYZE table t1,t2; +explain SELECT t2.id, t1.`label` FROM t2 INNER JOIN +(SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl +ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object); +--sorted_result SELECT t2.id, t1.`label` FROM t2 INNER JOIN (SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object); |