diff options
Diffstat (limited to 'mysql-test/main/join.test')
-rw-r--r-- | mysql-test/main/join.test | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test index bc8a83c0bb8..e21d0c12360 100644 --- a/mysql-test/main/join.test +++ b/mysql-test/main/join.test @@ -697,12 +697,11 @@ select 'The cost of accessing t1 (dont care if it changes' '^'; select 'vv: Following query must use ALL(t1), eq_ref(A), eq_ref(B): vv' Z; +set @@optimizer_cache_hit_ratio=0; explain select * from t1, t2 A, t2 B where A.a = t1.a and B.a=A.b; show status like '%cost%'; -select '^^: The above should be ~= 20 + cost(select * from t1). Value less than 20 is an error' Z; - - - +select '^^: The above should be ~= 40 + cost(select * from t1). Value less than 40 is an error' Z; +set @@optimizer_cache_hit_ratio=default; drop table t1, t2; # @@ -957,6 +956,9 @@ INSERT INTO t1 VALUES (3,'b'),(4,NULL),(5,'c'),(6,'cc'),(7,'d'), (8,'dd'),(9,'e'),(10,'ee'); INSERT INTO t2 VALUES (2,NULL); ANALYZE TABLE t1,t2; +# This will ensure that status tables are read now and not part of the later +# Handler_read% counts +explain SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1; FLUSH STATUS; SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1; SHOW STATUS LIKE 'Handler_read_%'; |