diff options
author | unknown <monty@mashka.mysql.fi> | 2003-01-09 02:19:14 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-01-09 02:19:14 +0200 |
commit | b5e37b242e23c1fed48007e0ec6f9eb7ecc34758 (patch) | |
tree | d8a4d338b246396e32745b9fe381fc6de42d5a9d /mysql-test/t/myisam.test | |
parent | a3f4a46bf29761fe73760a74ceb86491861dcbf4 (diff) | |
download | mariadb-git-b5e37b242e23c1fed48007e0ec6f9eb7ecc34758.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.
include/my_base.h:
Don't count NULL values in cardinalty
myisam/mi_check.c:
Don't count NULL values in cardinalty
myisam/mi_extra.c:
Free row buffer cache after each query
myisam/mi_open.c:
Avoid realloc if cache size doesn't change
myisam/mi_search.c:
Don't count NULL values in cardinalty
myisam/myisamdef.h:
Change buffer length from uint to uint32 to make it more portable/predictable
mysql-test/r/myisam.result:
Test case for cardinality with NULL keys and FORCE INDEX
mysql-test/t/myisam.test:
Test case for cardinality with NULL keys and FORCE INDEX
sql/lex.h:
Added table join option FORCE INDEX
sql/mysql_priv.h:
Added table join option FORCE INDEX
sql/opt_range.cc:
Added table join option FORCE INDEX
sql/sql_base.cc:
Added table join option FORCE INDEX
sql/sql_lex.h:
Added table join option FORCE INDEX
sql/sql_parse.cc:
Added table join option FORCE INDEX
Don't use strlen() on hostname without first checking if it's not NULL
sql/sql_select.cc:
Added table join option FORCE INDEX
sql/sql_yacc.yy:
Added table join option FORCE INDEX
sql/table.h:
Added table join option FORCE INDEX
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; |