summaryrefslogtreecommitdiff
path: root/mysql-test/t/myisam.test
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-09-30 18:55:02 -0700
committerIgor Babaev <igor@askmonty.org>2011-09-30 18:55:02 -0700
commit715dc5f99ddf852a5ef45bcb68c6c86298f6a7c3 (patch)
tree3557e3bfdfa8723372daf13fa6f46ffdd30483b6 /mysql-test/t/myisam.test
parent42b928ca05fca3ae8858566622a3a483a70aa3fc (diff)
downloadmariadb-git-715dc5f99ddf852a5ef45bcb68c6c86298f6a7c3.tar.gz
Fixed a cost estimation bug introduced into in the function best_access_path
of the 5.3 code line after a merge with 5.2 on 2010-10-28 in order not to allow the cost to access a joined table to be equal to 0 ever. Expanded data sets for many test cases to get the same execution plans as before.
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r--mysql-test/t/myisam.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index e912eb754f4..2f3eff31ff5 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -350,7 +350,7 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a));
-INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
+INSERT into t1 values (0,null,0), (0,null,1), (0,null,2), (0,null,3), (1,1,4);
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
INSERT into t2 values (1,1,1), (2,2,2);
optimize table t1;
@@ -358,7 +358,13 @@ show index from t1;
explain select * from t1,t2 where t1.a=t2.a;
explain select * from t1,t2 force index(a) where t1.a=t2.a;
explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
+INSERT into t1 values (2,4,5), (7,8,4), (8,3,1), (9,7,2), (5,5,9);
+optimize table t1;
+show index from t1;
explain select * from t1,t2 where t1.b=t2.b;
+delete from t1 where t1.a>1;
+optimize table t1;
+show index from t1;
explain select * from t1,t2 force index(c) where t1.a=t2.a;
explain select * from t1 where a=0 or a=2;
explain select * from t1 force index (a) where a=0 or a=2;