summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorunknown <mhansson/martin@linux-st28.site>2007-12-21 14:52:39 +0100
committerunknown <mhansson/martin@linux-st28.site>2007-12-21 14:52:39 +0100
commitbaf5c2c132f498df72c5c8196d591481e03b9fee (patch)
tree4db05ce0abde8a41b21fcb0c65c94ab0635b8952 /mysql-test/t/union.test
parent3a13408f8547b0f15952b8fd909bcc527910cc1a (diff)
parentfbb25b7cecf468eb4e422e22cd3aa2da4ba0fa8a (diff)
downloadmariadb-git-baf5c2c132f498df72c5c8196d591481e03b9fee.tar.gz
Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848 sql/field.cc: Auto merged sql/field.h: Auto merged sql/item.cc: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/union.result: Bug#32848: Manual merge mysql-test/t/union.test: Bug#32848: Manual merge
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 0f8ba1aeae0..70789404d6e 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -966,4 +966,26 @@ SELECT 1,1;
DROP TABLE t1,t2;
+# Bug#32848: Data type conversion bug in union subselects in MySQL 5.0.38
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+
+CREATE TABLE t2 SELECT * FROM (SELECT NULL) a UNION SELECT a FROM t1;
+DESC t2;
+
+CREATE TABLE t3 SELECT a FROM t1 UNION SELECT * FROM (SELECT NULL) a;
+DESC t3;
+
+CREATE TABLE t4 SELECT NULL;
+DESC t4;
+
+CREATE TABLE t5 SELECT NULL UNION SELECT NULL;
+DESC t5;
+
+CREATE TABLE t6
+SELECT * FROM (SELECT * FROM (SELECT NULL)a) b UNION SELECT a FROM t1;
+DESC t6;
+
+DROP TABLE t1, t2, t3, t4, t5, t6;
--echo End of 5.0 tests