summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2013-08-22 16:23:54 +0400
committerAlexander Barkov <bar@mariadb.org>2013-08-22 16:23:54 +0400
commitd1adae3707cf509bf8268315ebf499b206327de2 (patch)
tree43b6708e6c0490e53918ae68fa19d738cd0f5639 /sql/item_cmpfunc.cc
parentf5ea23b6e2bedb4bdaed7f53325cfce35acc8a3e (diff)
parentc40de1df363da0bc04118b4957c94fd52afe20b0 (diff)
downloadmariadb-git-d1adae3707cf509bf8268315ebf499b206327de2.tar.gz
Merging from 5.3
pending merges: Alexander Barkov 2013-08-22 MDEV-4804 Date comparing false result
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 6f975541c55..dcc356ce5b2 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -3238,12 +3238,12 @@ bool Item_func_coalesce::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
null_value= 0;
for (uint i= 0; i < arg_count; i++)
{
- bool res= args[i]->get_date(ltime, fuzzydate);
+ bool res= args[i]->get_date(ltime, fuzzydate & ~TIME_FUZZY_DATES);
if (!args[i]->null_value)
return res;
}
- null_value=1;
- return 1;
+ bzero((char*) ltime,sizeof(*ltime));
+ return null_value|= !(fuzzydate & TIME_FUZZY_DATES);
}