summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-06-12 11:59:37 +0300
committerunknown <monty@hundin.mysql.fi>2001-06-12 11:59:37 +0300
commit29f1fd81ab3a1d3089ee742a1ab0736ae2bd983b (patch)
tree3889f2f1c8906faf3d9440c3d5d5c6742112f135 /mysql-test
parent54fe14e2f6d4249b4317dd8e9d4473fb665a468c (diff)
parent01c886ee22bd87b27348092d60a256b6735c3729 (diff)
downloadmariadb-git-29f1fd81ab3a1d3089ee742a1ab0736ae2bd983b.tar.gz
Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result4
-rw-r--r--mysql-test/t/create.test12
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index f32c9b0bc80..7940d51868a 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -8,3 +8,7 @@ b
1 10000000001
a$1 $b c$
1 2 3
+table type possible_keys key key_len ref rows Extra
+t2 ref B B 21 const 1 where used
+a B
+3 world
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index a5224cd0318..d45d013c9fb 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -2,6 +2,7 @@
# Check some special create statements.
#
+drop table if exists t1,t2;
create table t1 (b char(0));
insert into t1 values (""),(null);
select * from t1;
@@ -57,3 +58,14 @@ select a$1, $b, c$ from test_$1.$test1;
create table test_$1.test2$ (a int);
drop table test_$1.test2$;
drop database test_$1;
+
+#
+# Test of CREATE ... SELECT with indexes
+#
+
+create table t1 (a int auto_increment not null primary key, B CHAR(20));
+insert into t1 (b) values ("hello"),("my"),("world");
+create table t2 (key (b)) select * from t1;
+explain select * from t2 where b="world";
+select * from t2 where b="world";
+drop table t1,t2;