summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorunknown <kaa@polly.(none)>2007-11-08 12:06:14 +0300
committerunknown <kaa@polly.(none)>2007-11-08 12:06:14 +0300
commit0075aa496075a82bda940e1a1636fc09e9b15918 (patch)
tree6663e67b72c4782c0306e016618e9a0c7b4bbeab /mysql-test/t/select.test
parent2a0f4e4faf8e0f48f25a39775aa4d34b13f43310 (diff)
parent4713575c77fe5c6b78378b476c7349d9e1cf1a7d (diff)
downloadmariadb-git-0075aa496075a82bda940e1a1636fc09e9b15918.tar.gz
Merge polly.(none):/home/kaa/src/opt/bug32103/my50-bug26215
into polly.(none):/home/kaa/src/opt/mysql-5.0-opt mysql-test/r/select.result: Auto merged mysql-test/t/select.test: Auto merged
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index a6ed3c854b4..259de144a51 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2360,6 +2360,27 @@ insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
select hex(a), hex(b) from t1;
drop table t1;
+#
+# Bug #32103: optimizer crash when join on int and mediumint with variable in
+# where clause
+#
+
+CREATE TABLE t1 (c0 int);
+CREATE TABLE t2 (c0 int);
+
+# We need any variable that:
+# 1. has integer type,
+# 2. can be used with the "@@name" syntax
+# 3. available in every server build
+INSERT INTO t1 VALUES(@@connect_timeout);
+INSERT INTO t2 VALUES(@@connect_timeout);
+
+# We only need to ensure 1 row is returned to validate the results
+--replace_column 1 X 2 X
+SELECT * FROM t1 JOIN t2 ON t1.c0 = t2.c0 WHERE (t1.c0 <=> @@connect_timeout);
+
+DROP TABLE t1, t2;
+
--echo End of 4.1 tests
#