diff options
author | unknown <bell@sanja.is.com.ua> | 2003-11-27 19:48:04 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-11-27 19:48:04 +0200 |
commit | 94387d4be3a066bcc5a8b9a495dd5b1ef4e75513 (patch) | |
tree | a7b706dac705c0ca989d69ee0975e3e82aa89f9e | |
parent | 48ea56a5533f446478e5070f3fd80485a0f9fa6a (diff) | |
parent | 8c430b22fad65039d88fbe72c2b92ee777eda789 (diff) | |
download | mariadb-git-94387d4be3a066bcc5a8b9a495dd5b1ef4e75513.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-union-4.1
-rw-r--r-- | mysql-test/r/subselect.result | 8 | ||||
-rw-r--r-- | mysql-test/r/union.result | 20 | ||||
-rw-r--r-- | mysql-test/t/subselect.test | 2 | ||||
-rw-r--r-- | mysql-test/t/union.test | 25 |
4 files changed, 47 insertions, 8 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 95638cbee41..71755aac52d 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -149,10 +149,10 @@ select (select a from t1 where t1.a=t2.b), a from t2; (select a from t1 where t1.a=t2.b) a NULL 1 NULL 2 -select (select a from t1), a from t2; -(select a from t1) a -2 1 -2 2 +select (select a from t1), a, (select 1 union select 2 limit 1) from t2; +(select a from t1) a (select 1 union select 2 limit 1) +2 1 1 +2 2 1 select (select a from t3), a from t2; (select a from t3) a NULL 1 diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index d01ecbc39b7..241b9847c02 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -803,3 +803,23 @@ t1 CREATE TABLE `t1` ( `test` char(5) character set latin2 NOT NULL default '' ) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +create table t1 (s char(200)); +insert into t1 values (repeat("1",200)); +create table t2 select * from t1; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +set local tmp_table_size=1024; +select count(*) from (select * from t1 union all select * from t2 order by 1) b; +count(*) +21 +select count(*) from t1; +count(*) +8 +select count(*) from t2; +count(*) +13 +drop table t1,t2; +set local tmp_table_size=default; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 75ca521d24e..e53679b444e 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -67,7 +67,7 @@ insert into t4 values (4,8),(3,8),(5,9); select (select a from t1 where t1.a = a1) as a2, (select b from t2 where t2.b=a2) as a1; select (select a from t1 where t1.a=t2.a), a from t2; select (select a from t1 where t1.a=t2.b), a from t2; -select (select a from t1), a from t2; +select (select a from t1), a, (select 1 union select 2 limit 1) from t2; select (select a from t3), a from t2; select * from t2 where t2.a=(select a from t1); insert into t3 values (6),(7),(3); diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index b758d57fa39..e302378e117 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -306,8 +306,6 @@ drop table t1, t2; # # types conversions # - - create table t1 SELECT "a" as a UNION select "aa" as a; select * from t1; show create table t1; @@ -416,4 +414,25 @@ drop table t1; create table t1 select _latin1"test" union select _latin2"testt" ; create table t1 select _latin2"test" union select _latin2"testt" ; show create table t1; -drop table t1;
\ No newline at end of file +drop table t1; + +# +# conversion memory->disk table +# +# +# conversion memory->disk table +# +create table t1 (s char(200)); +insert into t1 values (repeat("1",200)); +create table t2 select * from t1; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +set local tmp_table_size=1024; +select count(*) from (select * from t1 union all select * from t2 order by 1) b; +select count(*) from t1; +select count(*) from t2; +drop table t1,t2; +set local tmp_table_size=default; |