diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/derived.result | 10 | ||||
-rw-r--r-- | mysql-test/r/heap.result | 2 | ||||
-rw-r--r-- | mysql-test/r/myisam.result | 2 | ||||
-rw-r--r-- | mysql-test/t/derived.test | 7 | ||||
-rw-r--r-- | mysql-test/t/heap.test | 2 | ||||
-rw-r--r-- | mysql-test/t/myisam.test | 2 |
6 files changed, 21 insertions, 4 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result new file mode 100644 index 00000000000..5a41a51463e --- /dev/null +++ b/mysql-test/r/derived.result @@ -0,0 +1,10 @@ +drop table if exists t1,t2; +CREATE TABLE t1 (a int not null, b char (10) not null); +insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c'); +CREATE TABLE t2 (a int not null, b char (10) not null); +insert into t2 values (3,'c'),(4,'d'),(5,'f'),(6,'e'); +select t1.a,t3.y from t1,(select a as y from t2 where b='c') as t3 where t1.a = t3.y; +a y +3 3 +3 3 +drop table if exists t1.t2; diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index 13f452e26d8..eb3bae0fea2 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -68,7 +68,7 @@ explain select * from t1 where a in (869751,736494,226312,802616); table type possible_keys key key_len ref rows Extra t1 range uniq_id uniq_id 4 NULL 4 where used; Using index drop table t1; -create table t1 (x int not null, y int not null, key x(x), unique y(y)) +create table t1 (x int not null, y int not null, key x (x), unique y (y)) type=heap; insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6); select * from t1 where x=1; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index c5c69c1ba7b..fb18841ac3f 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1,7 +1,7 @@ drop table if exists t1; CREATE TABLE t1 ( STRING_DATA char(255) default NULL, -KEY STRING_DATA (STRING_DATA) +KEY string_data (STRING_DATA) ) TYPE=MyISAM; INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test new file mode 100644 index 00000000000..4a3e8e86d4a --- /dev/null +++ b/mysql-test/t/derived.test @@ -0,0 +1,7 @@ +drop table if exists t1,t2; +CREATE TABLE t1 (a int not null, b char (10) not null); +insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c'); +CREATE TABLE t2 (a int not null, b char (10) not null); +insert into t2 values (3,'c'),(4,'d'),(5,'f'),(6,'e'); +select t1.a,t3.y from t1,(select a as y from t2 where b='c') as t3 where t1.a = t3.y; +drop table if exists t1.t2;
\ No newline at end of file diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test index ef7e3239a96..f8b27d09a19 100644 --- a/mysql-test/t/heap.test +++ b/mysql-test/t/heap.test @@ -42,7 +42,7 @@ alter table t1 type=myisam; explain select * from t1 where a in (869751,736494,226312,802616); drop table t1; -create table t1 (x int not null, y int not null, key x(x), unique y(y)) +create table t1 (x int not null, y int not null, key x (x), unique y (y)) type=heap; insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6); select * from t1 where x=1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 861bc807323..42d1dd6d553 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -5,7 +5,7 @@ drop table if exists t1; CREATE TABLE t1 ( STRING_DATA char(255) default NULL, - KEY STRING_DATA (STRING_DATA) + KEY string_data (STRING_DATA) ) TYPE=MyISAM; INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); |