summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.h
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@gleb.loc>2007-11-10 23:44:48 +0400
committerunknown <gshchepa/uchum@gleb.loc>2007-11-10 23:44:48 +0400
commite7c6a81f2574840b61b9260e97789980337ca18b (patch)
treec00c29a8fdf1d323a7fd7c0006137770f89a940d /sql/sp_rcontext.h
parenta5d7fa746fd6db971d465f5072b6cfec8f28e2fb (diff)
downloadmariadb-git-e7c6a81f2574840b61b9260e97789980337ca18b.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. sql/item.cc: Fixed bug #28076. The Item_cache_str::save_in_field method has been overloaded to check cached values for an illegal padding before the saving into a field. sql/item.h: Fixed bug #28076. The Item_cache_str::is_varbinary flag has been added and the Item_cache_str::save_in_field method has been overloaded to prevent cached values from an illegal padding when saving in fields. The signature of the Item_cache::get_cache method has been changed to accept pointers to Item instead of Item_result values. sql/item_cmpfunc.cc: Fixed bug #28076. The Item_in_optimizer::fix_left method has been modified to to call Item_cache::get_cache in a new manner. sql/item_subselect.cc: Fixed bug #28076. The subselect_indexsubquery_engine::exec method has been modified to take into account field conversion errors (copy&paste from subselect_uniquesubquery_engine::exec). sql/sp_rcontext.cc: Fixed bug #28076. The sp_rcontext::create_case_expr_holder method has been modified to call Item_cache::get_cache in a new manner. sql/sp_rcontext.h: Fixed bug #28076. The sp_rcontext::create_case_expr_holder method signature has been modified to pass Item pointers to the Item_cache::get_cache method. sql/sql_class.cc: Fixed bug #28076. The select_max_min_finder_subselect::send_data method has been modified to call Item_cache::get_cache in a new manner. mysql-test/t/subselect.test: Added test case for bug #28076. mysql-test/r/subselect.result: Added test case for bug #28076.
Diffstat (limited to 'sql/sp_rcontext.h')
-rw-r--r--sql/sp_rcontext.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h
index 0104b71a648..43102cfeeb2 100644
--- a/sql/sp_rcontext.h
+++ b/sql/sp_rcontext.h
@@ -261,7 +261,7 @@ private:
bool init_var_table(THD *thd);
bool init_var_items();
- Item_cache *create_case_expr_holder(THD *thd, Item_result result_type);
+ Item_cache *create_case_expr_holder(THD *thd, const Item *item);
int set_variable(THD *thd, Field *field, Item **value);
}; // class sp_rcontext : public Sql_alloc