summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-10-19 22:10:54 +0300
committerunknown <monty@hundin.mysql.fi>2001-10-19 22:10:54 +0300
commit253b9ecb1113131de67df7b8e1b2413a5ee113bb (patch)
treee717f4195e6b7d87809d3867302f30ea43732546 /mysql-test
parent6f2d56162b2b3c1117780ddc2686a5369bd172db (diff)
downloadmariadb-git-253b9ecb1113131de67df7b8e1b2413a5ee113bb.tar.gz
Don't use signal() on windows.
Added missing InnoDB variables to SHOW VARIABLES. Fixed bug when doing WHERE 'column_name=NULL' on an indexed column that had NULL values. Fixed bug when doing 'LEFT JOIN ... ON (column_name = constant) WHERE column_name = constant' Docs/manual.texi: Changelog libmysql/libmysql.c: Don't use signal() on windows. mysql-test/r/join_outer.result: Test for bugfix mysql-test/r/null.result: Test for bugfix mysql-test/t/join_outer.test: Test for bugfix mysql-test/t/null.test: Test for bugfix sql/mysqld.cc: Add missing InnoDB variables to SHOW VARIABLES. sql/sql_select.cc: Fixed bug when doing WHERE 'column_name=NULL' on an indexed column that had NULL values. Fixed bug when doing 'LEFT JOIN ... ON (column_name = constant) WHERE column_name = constant'
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/join_outer.result2
-rw-r--r--mysql-test/r/null.result7
-rw-r--r--mysql-test/t/join_outer.test10
-rw-r--r--mysql-test/t/null.test15
4 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 65b4c2ec73a..38f2f44f6ce 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -318,3 +318,5 @@ t1 ALL NULL NULL NULL NULL 2
t2 index id id 8 NULL 1 where used; Using index; Not exists
id name id idx
2 no NULL NULL
+bug_id reporter bug_id who
+1 1 1 2
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index 6109456b8c0..9f0bdb07973 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -23,3 +23,10 @@ NULL 0
inet_ntoa(null) inet_aton(null) inet_aton("122.256") inet_aton("122.226.") inet_aton("")
NULL NULL NULL NULL NULL
x
+indexed_field
+indexed_field
+NULL
+NULL
+indexed_field
+NULL
+NULL
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index a6da5fd577c..774f35ae38e 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -394,3 +394,13 @@ INSERT INTO t2 VALUES (1,1);
explain SELECT * from t1 left join t2 on t1.id=t2.id where t2.id IS NULL;
SELECT * from t1 left join t2 on t1.id=t2.id where t2.id IS NULL;
drop table t1,t2;
+
+#
+# Test problem with using key_column= constant in ON and WHERE
+#
+create table t1 (bug_id mediumint, reporter mediumint);
+create table t2 (bug_id mediumint, who mediumint, index(who));
+insert into t2 values (1,1),(1,2);
+insert into t1 values (1,1),(2,1);
+SELECT * FROM t1 LEFT JOIN t2 ON (t1.bug_id = t2.bug_id AND t2.who = 2) WHERE (t1.reporter = 2 OR t2.who = 2);
+drop table t1,t2;
diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test
index f1fe2cf2c9f..a010ab38e07 100644
--- a/mysql-test/t/null.test
+++ b/mysql-test/t/null.test
@@ -20,3 +20,18 @@ create table t1 (x int);
insert into t1 values (null);
select * from t1 where x != 0;
drop table t1;
+
+#
+# Test problem med index on NULL columns and testing with =NULL;
+#
+
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (
+ indexed_field int default NULL,
+ KEY indexed_field (indexed_field)
+);
+INSERT INTO t1 VALUES (NULL),(NULL);
+SELECT * FROM t1 WHERE indexed_field=NULL;
+SELECT * FROM t1 WHERE indexed_field IS NULL;
+SELECT * FROM t1 WHERE indexed_field<=>NULL;
+DROP TABLE t1;