From 0176dacd54b7eb62ebc4a81909b189517aee2cb4 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 3 Nov 2001 21:22:06 +0200 Subject: Fixed problem with t1 LEFT_JOIN t2 ... WHERE t2.date_column IS NULL when date_column is declared as NOT NULL. BUILD/SETUP.sh: Use -O1 to avoid problem with INLINE functions Docs/manual.texi: Changelog mysql-test/r/join.result: Test for bugfix mysql-test/t/join.test: Test for bugfix sql/sql_select.cc: Fixed problem with t1 LEFT_JOIN t2 ... WHERE t2.date_column IS NULL when date_column was declared as NOT NULL. BitKeeper/etc/ignore: Added bdb/include/db_ext.h bdb/include/mutex_ext.h to the ignore list --- mysql-test/t/join.test | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'mysql-test/t/join.test') diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test index 224db1dd8f0..530dcd5fca7 100644 --- a/mysql-test/t/join.test +++ b/mysql-test/t/join.test @@ -106,9 +106,17 @@ INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(2,3); CREATE TABLE t2 ( a int(11) default NULL ) TYPE=MyISAM; - INSERT INTO t2 VALUES (2),(3); - SELECT t1.a,t2.a,b FROM t1,t2 WHERE t1.a=t2.a AND (t1.a=1 OR t1.a=2) AND b>=1 AND b<=3; - DROP TABLE t1, t2; + +# +# TEST LEFT JOIN with DATE columns +# + +CREATE TABLE t1 (d DATE NOT NULL); +CREATE TABLE t2 (d DATE NOT NULL); +INSERT INTO t1 (d) VALUES ('2001-08-01'),('0000-00-00'); +SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE t2.d IS NULL; +SELECT * from t1 WHERE t1.d IS NULL; +DROP TABLE t1,t2; -- cgit v1.2.1