diff options
author | iggy@rolltop.ignatz42.dyndns.org <> | 2006-12-04 15:32:16 -0500 |
---|---|---|
committer | iggy@rolltop.ignatz42.dyndns.org <> | 2006-12-04 15:32:16 -0500 |
commit | f427935804664d82ffe41413dff137e68e0cf9a0 (patch) | |
tree | be782c8cac1213ba583035a52fa85885b9a893cc /mysql-test | |
parent | 2f79d20bc39d97ef519bdf797ceb268bba994405 (diff) | |
parent | 3add79dd1113b8623a1caa04f0376023898d8b00 (diff) | |
download | mariadb-git-f427935804664d82ffe41413dff137e68e0cf9a0.tar.gz |
Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20836/my50-bug20836
into rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-maint
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/t/distinct.test | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index e517380ba9b..b2cc42cc0ff 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -437,3 +437,70 @@ EXPLAIN SELECT DISTINCT a,a FROM t1 WHERE b < 12 ORDER BY a; SELECT DISTINCT a,a FROM t1 WHERE b < 12 ORDER BY a; DROP TABLE t1; +# The test case for bug#20836 should be re-enabled when bug#16861 is resolved +# The results for the test should be the same as in 4.1. +# +#Bug #20836: Selecting into variables results in wrong results being returned +# +#--disable_warnings +#DROP TABLE IF EXISTS t1; +#--enable_warnings +# +#CREATE TABLE t1 (id INT NOT NULL, fruit_id INT NOT NULL, fruit_name varchar(20) +#default NULL); +# +#INSERT INTO t1 VALUES (1,1,'ORANGE'); +#INSERT INTO t1 VALUES (2,2,'APPLE'); +#INSERT INTO t1 VALUES (3,2,'APPLE'); +#INSERT INTO t1 VALUES (4,3,'PEAR'); +# +#SELECT DISTINCT fruit_id, fruit_name INTO @v1, @v2 FROM t1 WHERE fruit_name = +#'APPLE'; +#SELECT @v1, @v2; +# +#SELECT DISTINCT fruit_id, fruit_name INTO @v3, @v4 FROM t1 GROUP BY fruit_id, +#fruit_name HAVING fruit_name = 'APPLE'; +#SELECT @v3, @v4; +# +#SELECT DISTINCT @v5:= fruit_id, @v6:= fruit_name INTO @v7, @v8 FROM t1 WHERE +#fruit_name = 'APPLE'; +#SELECT @v5, @v6, @v7, @v8; +# +#SELECT DISTINCT @v5 + fruit_id, CONCAT(@v6, fruit_name) INTO @v9, @v10 FROM t1 +#WHERE fruit_name = 'APPLE'; +#SELECT @v5, @v6, @v7, @v8, @v9, @v10; +# +#SELECT DISTINCT @v11:= @v5 + fruit_id, @v12:= CONCAT(@v6, fruit_name) INTO +#@v13, @v14 FROM t1 WHERE fruit_name = 'APPLE'; +#SELECT @v11, @v12, @v13, @v14; +# +#SELECT DISTINCT @v13, @v14 INTO @v15, @v16 FROM t1 WHERE fruit_name = 'APPLE'; +#SELECT @v15, @v16; +# +#SELECT DISTINCT 2 + 2, 'Bob' INTO @v17, @v18 FROM t1 WHERE fruit_name = +#'APPLE'; +#SELECT @v17, @v18; +# +#--disable_warnings +#DROP TABLE IF EXISTS t2; +#--enable_warnings +# +#CREATE TABLE t2 (fruit_id INT NOT NULL, fruit_name varchar(20) +#default NULL); +# +#SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE +#'../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE'; +#LOAD DATA INFILE '../tmp/data1.tmp' INTO TABLE t2; +#--exec rm $MYSQL_TEST_DIR/var/tmp/data1.tmp +# +#SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE +#'../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE'; +#LOAD DATA INFILE '../tmp/data2.tmp' INTO TABLE t2; +#--exec rm $MYSQL_TEST_DIR/var/tmp/data2.tmp +# +#SELECT @v19, @v20; +#SELECT * FROM t2; +# +#DROP TABLE t1; +#DROP TABLE t2; + |