summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorgshchepa/uchum@gleb.loc <>2007-11-10 23:44:48 +0400
committergshchepa/uchum@gleb.loc <>2007-11-10 23:44:48 +0400
commit0aabb89ee11a7492a0788470be9a6ba018152c9f (patch)
treec00c29a8fdf1d323a7fd7c0006137770f89a940d /sql/item_cmpfunc.cc
parent00e897ac905a893407939791cb28fa192c91c136 (diff)
downloadmariadb-git-0aabb89ee11a7492a0788470be9a6ba018152c9f.tar.gz
Fixed bug #28076: inconsistent binary/varbinary comparison.
After adding an index the <VARBINARY> IN (SELECT <BINARY> ...) clause returned a wrong result: the VARBINARY value was illegally padded with zero bytes to the length of the BINARY column for the index search. (<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.
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 a9ad5ad675d..345b84e8868 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1373,7 +1373,7 @@ longlong Item_func_truth::val_int()
bool Item_in_optimizer::fix_left(THD *thd, Item **ref)
{
if (!args[0]->fixed && args[0]->fix_fields(thd, args) ||
- !cache && !(cache= Item_cache::get_cache(args[0]->result_type())))
+ !cache && !(cache= Item_cache::get_cache(args[0])))
return 1;
cache->setup(args[0]);