summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorEvgeny Potemkin <epotemkin@mysql.com>2009-12-09 18:43:45 +0300
committerEvgeny Potemkin <epotemkin@mysql.com>2009-12-09 18:43:45 +0300
commit69fa790fbd4f9b83b853b53ba1b64965fe88c454 (patch)
tree0eaf38662312ba5a5a800fbc6c47933862c0f967 /sql/item_cmpfunc.cc
parent514f4814d573c1ae5b9d450a782fc321d7b3eba7 (diff)
downloadmariadb-git-69fa790fbd4f9b83b853b53ba1b64965fe88c454.tar.gz
Bug#49489: Uninitialized cache led to a wrong result.
Arg_comparator uses Item_cache objects to store constants being compared when they're need a type conversion. Because this cache wasn't initialized properly Arg_comparator might produce wrong comparison result. The Arg_comparator::cache_converted_constant function now initializes cache prior to usage.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 5415d6f4f8a..a3c3051d790 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1023,7 +1023,7 @@ Item** Arg_comparator::cache_converted_constant(THD *thd, Item **value,
(*value)->const_item() && type != (*value)->result_type())
{
Item_cache *cache= Item_cache::get_cache(*value, type);
- cache->store(*value);
+ cache->setup(*value);
*cache_item= cache;
return cache_item;
}