From c1660e1a23b8d54123c93e92a2ab568cd0d8cdd2 Mon Sep 17 00:00:00 2001 From: "Sinisa@sinisa.nasamreza.org" <> Date: Wed, 2 Jul 2003 00:10:47 +0300 Subject: Lot's of clean-ups and fixes for 4.0.14. --- mysql-test/r/union.result | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/r/union.result') diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 970e83c6752..929c79b542f 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -96,6 +96,13 @@ a b select found_rows(); found_rows() 6 +select sql_calc_found_rows a,b from t1 union all select a,b from t2 limit 2; +a b +1 a +2 b +select found_rows(); +found_rows() +6 explain select a,b from t1 union all select a,b from t2; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 4 @@ -259,3 +266,14 @@ uid rl g1 cid gg uid rl g1 cid gg 1 NULL V1 NULL 1 drop table t1,t2,t3,t4,t5,t6; +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'); +create table t3 select a,b from t1 union select a,b from t2; +create table t4 (select a,b from t1) union (select a,b from t2) limit 2; +insert into t4 select a,b from t1 union select a,b from t2; +insert into t3 (select a,b from t1) union (select a,b from t2) limit 2; +select * from t3; +select * from t4; +drop table t1,t2,t3,t4; -- cgit v1.2.1 From fb39821e94b7f921000a40c42efdcdb8c4f28d6d Mon Sep 17 00:00:00 2001 From: "Sinisa@sinisa.nasamreza.org" <> Date: Wed, 2 Jul 2003 01:24:05 +0300 Subject: Some fixes for CREATE / INSERT FROM UNIO >.. --- mysql-test/r/union.result | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'mysql-test/r/union.result') diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 929c79b542f..2072b045563 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -271,9 +271,35 @@ 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'); create table t3 select a,b from t1 union select a,b from t2; -create table t4 (select a,b from t1) union (select a,b from t2) limit 2; +create table t4 (select a,b from t1) union (select a,b from t2); insert into t4 select a,b from t1 union select a,b from t2; -insert into t3 (select a,b from t1) union (select a,b from t2) limit 2; +insert into t3 (select a,b from t1) union (select a,b from t2); select * from t3; +a b +1 a +2 b +3 c +4 d +5 f +6 e +1 a +2 b +3 c +4 d +5 f +6 e select * from t4; +a b +1 a +2 b +3 c +4 d +5 f +6 e +1 a +2 b +3 c +4 d +5 f +6 e drop table t1,t2,t3,t4; -- cgit v1.2.1 From 1df6492c7d5036e0553191d8da86df7db220a70c Mon Sep 17 00:00:00 2001 From: "Sinisa@sinisa.nasamreza.org" <> Date: Wed, 2 Jul 2003 14:57:40 +0300 Subject: Fix for a problem with : CREATE / INSERT ... (SELECT ...) UNION (SELECT ...) LIMIT; --- mysql-test/r/union.result | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'mysql-test/r/union.result') diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 2072b045563..51d9f2d17ca 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -271,9 +271,9 @@ 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'); create table t3 select a,b from t1 union select a,b from t2; -create table t4 (select a,b from t1) union (select a,b from t2); +create table t4 (select a,b from t1) union (select a,b from t2) limit 2; insert into t4 select a,b from t1 union select a,b from t2; -insert into t3 (select a,b from t1) union (select a,b from t2); +insert into t3 (select a,b from t1) union (select a,b from t2) limit 2; select * from t3; a b 1 a @@ -284,18 +284,10 @@ a b 6 e 1 a 2 b -3 c -4 d -5 f -6 e select * from t4; a b 1 a 2 b -3 c -4 d -5 f -6 e 1 a 2 b 3 c -- cgit v1.2.1