summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <kaa@polly.(none)>2007-11-08 11:46:58 +0300
committerunknown <kaa@polly.(none)>2007-11-08 11:46:58 +0300
commit4713575c77fe5c6b78378b476c7349d9e1cf1a7d (patch)
tree445aab786cd451abeedad4fe5f3ef510c01479dc /mysql-test
parent93f1df5ef7bbeded3f8def0b89d8507d269fa77f (diff)
parent0a7a55d175c145f2ab22a16ef7259191edc806bc (diff)
downloadmariadb-git-4713575c77fe5c6b78378b476c7349d9e1cf1a7d.tar.gz
Merge polly.(none):/home/kaa/src/opt/bug32103/my41-bug26215
into polly.(none):/home/kaa/src/opt/bug32103/my50-bug26215 mysql-test/t/select.test: Auto merged mysql-test/r/select.result: Manual merge. sql/item.h: Manual merge.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/select.result8
-rw-r--r--mysql-test/t/select.test21
2 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index ed120a1bbb8..677fe414e10 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2827,6 +2827,14 @@ FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
8FFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
drop table t1;
+CREATE TABLE t1 (c0 int);
+CREATE TABLE t2 (c0 int);
+INSERT INTO t1 VALUES(@@connect_timeout);
+INSERT INTO t2 VALUES(@@connect_timeout);
+SELECT * FROM t1 JOIN t2 ON t1.c0 = t2.c0 WHERE (t1.c0 <=> @@connect_timeout);
+c0 c0
+X X
+DROP TABLE t1, t2;
End of 4.1 tests
CREATE TABLE t1 (
K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '',
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 5c30a17e08e..e29e01c8886 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
#