diff options
author | monty@mashka.mysql.fi <> | 2003-01-09 02:19:14 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-01-09 02:19:14 +0200 |
commit | 3c08da957e58937ead92a7609e67d2234fe76676 (patch) | |
tree | d8a4d338b246396e32745b9fe381fc6de42d5a9d /mysql-test/t/myisam.test | |
parent | 23c13c453982c4817831ecc36d06913518c52790 (diff) | |
download | mariadb-git-3c08da957e58937ead92a7609e67d2234fe76676.tar.gz |
Don't count NULL values in cardinalty for MyISAM tables.
Free row buffer cache after each query for MyISAM tables.
Added table join option FORCE INDEX
Fixed core dump bug when connecting with hostname that could not be resolved.
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r-- | mysql-test/t/myisam.test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 1265d809149..c96a21e73dd 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -2,7 +2,13 @@ # Test bugs in the MyISAM code # -drop table if exists t1; +# Initialise +drop table if exists t1,t2; + +# +# Test problem with CHECK TABLE; +# + CREATE TABLE t1 ( STRING_DATA char(255) default NULL, KEY STRING_DATA (STRING_DATA) @@ -326,3 +332,21 @@ CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255)); ALTER TABLE t1 ADD INDEX t1 (a, b, c); DROP TABLE t1; +# +# Test of cardinality of keys with NULL +# + +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); +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; +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; +explain select * from t1,t2 where t1.b=t2.b; +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; +drop table t1,t2; |