summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-04-23 17:01:02 +0200
committerunknown <msvensson@pilot.blaudden>2007-04-23 17:01:02 +0200
commit0d5a18b53bd30af029b27e39579b52f05b8f7115 (patch)
tree8cc026fffb64b3233d53f89373b5f930e8ed9a49 /sql/item_cmpfunc.cc
parent2c4ad7372c0737d49812f1e22a108dc841b4ba74 (diff)
parente4a8fd700ef4078cdd7ea11cd57e7d2bc9c11253 (diff)
downloadmariadb-git-0d5a18b53bd30af029b27e39579b52f05b8f7115.tar.gz
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint BitKeeper/etc/ignore: auto-union client/Makefile.am: Auto merged client/mysql.cc: Auto merged configure.in: Auto merged client/mysqltest.c: Auto merged libmysqld/Makefile.am: Auto merged sql/Makefile.am: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 54b78cdf51c..0a177a58dbd 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -366,7 +366,8 @@ static bool convert_constant_item(THD *thd, Field *field, Item **item)
old_read_map= dbug_tmp_use_all_columns(table, table->read_set);
}
/* For comparison purposes allow invalid dates like 2000-01-32 */
- thd->variables.sql_mode|= MODE_INVALID_DATES;
+ thd->variables.sql_mode= (orig_sql_mode & ~MODE_NO_ZERO_DATE) |
+ MODE_INVALID_DATES;
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
if (!(*item)->save_in_field(field, 1) && !((*item)->null_value))
{