summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-05-07 16:12:42 +0500
committerunknown <holyfoot/hf@hfmain.(none)>2007-05-07 16:12:42 +0500
commit6e07c2e641303430c51098d1559dc28d31d4b578 (patch)
tree1eb902b20bcaa743403f66b5240a9764c979f2ba /sql/item_cmpfunc.cc
parent42c714fd5f86a1dee317deb91f02994f97dffcef (diff)
parent187ccf4bca5bf865fec86581d894fb8e6df0792a (diff)
downloadmariadb-git-6e07c2e641303430c51098d1559dc28d31d4b578.tar.gz
Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into mysql.com:/d2/hf/mrg/mysql-5.1-opt sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_subselect.cc: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/sp-vars.result: merging mysql-test/r/type_datetime.result: SCCS merged mysql-test/t/type_datetime.test: SCCS merged sql/item_func.h: merging sql/mysql_priv.h: merging
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index ff7b991448c..7b55abe8fc7 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -802,7 +802,7 @@ void Arg_comparator::set_datetime_cmp_func(Item **a1, Item **b1)
obtained value
*/
-static ulonglong
+ulonglong
get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
Item *warn_item, bool *is_null)
{
@@ -838,7 +838,7 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
MYSQL_TYPE_DATE ? MYSQL_TIMESTAMP_DATE : MYSQL_TIMESTAMP_DATETIME;
value= get_date_from_str(thd, str, t_type, warn_item->name, &error);
}
- if (item->const_item())
+ if (item->const_item() && cache_arg)
{
Item_cache_int *cache= new Item_cache_int();
/* Mark the cache as non-const to prevent re-caching. */