summaryrefslogtreecommitdiff
path: root/mysql-test/r/myisam.result
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-09 03:55:26 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-09 03:55:26 +0200
commit9d812016c1287fe06a0c0715f0b2852c919cff82 (patch)
treeaf09adc5a3ec6814545553d72fda1d33e443d162 /mysql-test/r/myisam.result
parentcd2f741d5d2cc52928668c6ce1f77052d1ca8a3b (diff)
parentcf2ef3c68f696707671a96c8a2ad6c8449390f4a (diff)
downloadmariadb-git-9d812016c1287fe06a0c0715f0b2852c919cff82.tar.gz
merge with 4.0.9
To get bug fixes for TCP/IP connections, FORCE INDEX and OPTIMIZE TABLE with NULL keys client/mysqladmin.c: Auto merged client/mysqltest.c: Auto merged extra/Makefile.am: Auto merged include/my_base.h: Auto merged innobase/log/log0log.c: Auto merged myisam/ft_nlq_search.c: Auto merged myisam/mi_open.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/myisam.result: Auto merged sql/lex.h: Auto merged sql/log_event.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/protocol.cc: Auto merged sql/slave.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_select.cc: Auto merged sql-bench/crash-me.sh: Auto merged sql-bench/test-insert.sh: Auto merged sql/sql_show.cc: Auto merged sql/table.h: Auto merged configure.in: merge with 4.0.9 innobase/btr/btr0pcur.c: merge with 4.0.9 myisam/mi_check.c: merge with 4.0.9 myisam/mi_search.c: merge with 4.0.9 mysql-test/t/myisam.test: merge with 4.0.9 sql/log_event.cc: merge with 4.0.9 sql/mysql_priv.h: merge with 4.0.9 sql/sql_lex.h: merge with 4.0.9 sql/sql_parse.cc: merge with 4.0.9 sql/sql_yacc.yy: merge with 4.0.9
Diffstat (limited to 'mysql-test/r/myisam.result')
-rw-r--r--mysql-test/r/myisam.result44
1 files changed, 43 insertions, 1 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index f06194bb412..3d4b1dbd46d 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1,t2;
CREATE TABLE t1 (
STRING_DATA char(255) default NULL,
KEY string_data (STRING_DATA)
@@ -316,3 +316,45 @@ CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255));
ALTER TABLE t1 ADD INDEX t1 (a, b, c);
Specified key was too long. Max key length is 500
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);
+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;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+show index from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 b 1 b A 5 NULL NULL YES BTREE
+t1 1 c 1 c A 5 NULL NULL YES BTREE
+t1 1 a 1 a A 1 NULL NULL BTREE
+t1 1 a 2 b A 5 NULL NULL YES BTREE
+t1 1 c_2 1 c A 5 NULL NULL YES BTREE
+t1 1 c_2 2 a A 5 NULL NULL BTREE
+explain select * from t1,t2 where t1.a=t2.a;
+table type possible_keys key key_len ref rows Extra
+t1 ALL a NULL NULL NULL 5
+t2 ALL a NULL NULL NULL 2 Using where
+explain select * from t1,t2 force index(a) where t1.a=t2.a;
+table type possible_keys key key_len ref rows Extra
+t2 ALL a NULL NULL NULL 2
+t1 ALL a NULL NULL NULL 5 Using where
+explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
+table type possible_keys key key_len ref rows Extra
+t2 ALL a NULL NULL NULL 2
+t1 ref a a 4 t2.a 3
+explain select * from t1,t2 where t1.b=t2.b;
+table type possible_keys key key_len ref rows Extra
+t2 ALL b NULL NULL NULL 2
+t1 ref b b 5 t2.b 1 Using where
+explain select * from t1,t2 force index(c) where t1.a=t2.a;
+table type possible_keys key key_len ref rows Extra
+t1 ALL a NULL NULL NULL 5
+t2 ALL NULL NULL NULL NULL 2 Using where
+explain select * from t1 where a=0 or a=2;
+table type possible_keys key key_len ref rows Extra
+t1 ALL a NULL NULL NULL 5 Using where
+explain select * from t1 force index (a) where a=0 or a=2;
+table type possible_keys key key_len ref rows Extra
+t1 range a a 4 NULL 4 Using where
+drop table t1,t2;