summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-11-03 21:22:06 +0200
committerunknown <monty@hundin.mysql.fi>2001-11-03 21:22:06 +0200
commit0176dacd54b7eb62ebc4a81909b189517aee2cb4 (patch)
tree4db195f60d4a50d5fb05cdcfbeda30ae4a1a34cd /sql
parentb2cec26dfb0fa6e2e7240d5dd2044e1192596ef8 (diff)
downloadmariadb-git-0176dacd54b7eb62ebc4a81909b189517aee2cb4.tar.gz
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
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 431674a58e2..d1df2b2aa71 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -3101,7 +3101,8 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
/* fix to replace 'NULL' dates with '0' (shreeve@uci.edu) */
else if (((field->type() == FIELD_TYPE_DATE) ||
(field->type() == FIELD_TYPE_DATETIME)) &&
- (field->flags & NOT_NULL_FLAG))
+ (field->flags & NOT_NULL_FLAG) &&
+ !field->table->maybe_null)
{
COND *new_cond;
if ((new_cond= new Item_func_eq(args[0],new Item_int("0", 0, 2))))