1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +03:00

select.result, select.test:

Added a test case for bug #7098.
sql_select.cc:
  Fixed bug #7098.
  When a string field was substituted for an equal constant
  the collation of the constant was changed by mistake for 
  the binary collation.
This commit is contained in:
igor@rurik.mysql.com
2005-02-16 21:17:20 -08:00
parent 3261bf189a
commit eedde7ba3e
3 changed files with 45 additions and 0 deletions

View File

@@ -4230,6 +4230,8 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
Item *tmp=value->new_item();
if (tmp)
{
tmp->collation.set(value->collation.collation,
value->collation.derivation);
thd->change_item_tree(args + 1, tmp);
func->update_used_tables();
if ((functype == Item_func::EQ_FUNC || functype == Item_func::EQUAL_FUNC)
@@ -4251,6 +4253,8 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
Item *tmp=value->new_item();
if (tmp)
{
tmp->collation.set(value->collation.collation,
value->collation.derivation);
thd->change_item_tree(args, tmp);
value= tmp;
func->update_used_tables();