summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2006-01-13 12:13:50 +0300
committerunknown <evgen@moonbone.local>2006-01-13 12:13:50 +0300
commita8a4a22974fc95016248016e9b7836a2460bcef0 (patch)
treea6574ee59fca9abfbe8e3879ca60ea6046ed93be /mysql-test
parent891202f7d1c79200da23f4df8a19d9cd1c550a2b (diff)
parent593bed0d929cdc2827439d4697ce6f4b2bc9d941 (diff)
downloadmariadb-git-a8a4a22974fc95016248016e9b7836a2460bcef0.tar.gz
Merge
sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged mysql-test/r/select.result: SCCS merged mysql-test/t/select.test: SCCS merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_group.result2
-rw-r--r--mysql-test/r/select.result13
-rw-r--r--mysql-test/t/select.test14
3 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 2b0176179ed..cfa4cc0ef68 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -865,6 +865,7 @@ select 1, min(a) from t1m where 1=99;
1 NULL
select 1, min(1) from t1m where a=99;
1 min(1)
+1 NULL
select 1, min(1) from t1m where 1=99;
1 min(1)
1 NULL
@@ -876,6 +877,7 @@ select 1, max(a) from t1m where 1=99;
1 NULL
select 1, max(1) from t1m where a=99;
1 max(1)
+1 NULL
select 1, max(1) from t1m where 1=99;
1 max(1)
1 NULL
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index e2c4609d902..b764ffd3c80 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -3337,6 +3337,19 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t3 const PRIMARY PRIMARY 8 const,const 1
DROP TABLE t1,t2,t3;
+create table t1 (f1 int unique);
+create table t2 (f2 int unique);
+create table t3 (f3 int unique);
+insert into t1 values(1),(2);
+insert into t2 values(1),(2);
+insert into t3 values(1),(NULL);
+select * from t3 where f3 is null;
+f3
+NULL
+select t2.f2 from t1 left join t2 on f1=f2 join t3 on f1=f3 where f1=1;
+f2
+1
+drop table t1,t2,t3;
create table t1(f1 char, f2 char not null);
insert into t1 values(null,'a');
create table t2 (f2 char not null);
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index a85b82a7767..a53b984007f 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2807,6 +2807,20 @@ EXPLAIN SELECT t2.key_a,foo
DROP TABLE t1,t2,t3;
#
+# Bug #15633 Evaluation of Item_equal for non-const table caused wrong
+# select result
+#
+create table t1 (f1 int unique);
+create table t2 (f2 int unique);
+create table t3 (f3 int unique);
+insert into t1 values(1),(2);
+insert into t2 values(1),(2);
+insert into t3 values(1),(NULL);
+select * from t3 where f3 is null;
+select t2.f2 from t1 left join t2 on f1=f2 join t3 on f1=f3 where f1=1;
+drop table t1,t2,t3;
+
+#
# Bug#15268 Unchecked null value caused server crash
#
create table t1(f1 char, f2 char not null);