1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fixed problem with t1 LEFT_JOIN t2 ... WHERE t2.date_column IS NULL when date_column is declared as NOT NULL.

This commit is contained in:
monty@hundin.mysql.fi
2001-11-03 21:22:06 +02:00
parent 8cd4c2358d
commit 65d4c846d8
6 changed files with 24 additions and 5 deletions

View File

@@ -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))))