summaryrefslogtreecommitdiff
path: root/mysql-test/r/myisam.result
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-01-09 03:55:26 +0200
committermonty@mashka.mysql.fi <>2003-01-09 03:55:26 +0200
commitf8e660d88ca64d2f7a1be58acbe57d777d20b122 (patch)
treeaf09adc5a3ec6814545553d72fda1d33e443d162 /mysql-test/r/myisam.result
parenta10178493005b3fa69163ef39c6a58fe9ff6658b (diff)
parent2ea43f3c53573a6482ea84556e11e5db6cedddef (diff)
downloadmariadb-git-f8e660d88ca64d2f7a1be58acbe57d777d20b122.tar.gz
merge with 4.0.9
To get bug fixes for TCP/IP connections, FORCE INDEX and OPTIMIZE TABLE with NULL keys
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;