Commit 41c09450 authored by unknown's avatar unknown

item.h:

  Revised the fix for bug #7098.
  Corrected the method Item_string::new_item.
sql_select.cc:
  Revised the fix for bug #7098.
  Aborted the previous modifications.


sql/sql_select.cc:
  Revised the fix for bug #7098.
  Aborted the previous modifications.
sql/item.h:
  Revised the fix for bug #7098.
  Corrected the method Item_string::new_item.
parent d2a69d8f
...@@ -742,7 +742,7 @@ class Item_string :public Item ...@@ -742,7 +742,7 @@ class Item_string :public Item
Item *new_item() Item *new_item()
{ {
return new Item_string(name, str_value.ptr(), return new Item_string(name, str_value.ptr(),
str_value.length(), &my_charset_bin); str_value.length(), collation.collation);
} }
Item *safe_charset_converter(CHARSET_INFO *tocs); Item *safe_charset_converter(CHARSET_INFO *tocs);
String *const_string() { return &str_value; } String *const_string() { return &str_value; }
......
...@@ -4230,8 +4230,6 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list, ...@@ -4230,8 +4230,6 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
Item *tmp=value->new_item(); Item *tmp=value->new_item();
if (tmp) if (tmp)
{ {
tmp->collation.set(value->collation.collation,
value->collation.derivation);
thd->change_item_tree(args + 1, tmp); thd->change_item_tree(args + 1, tmp);
func->update_used_tables(); func->update_used_tables();
if ((functype == Item_func::EQ_FUNC || functype == Item_func::EQUAL_FUNC) if ((functype == Item_func::EQ_FUNC || functype == Item_func::EQUAL_FUNC)
...@@ -4253,8 +4251,6 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list, ...@@ -4253,8 +4251,6 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
Item *tmp=value->new_item(); Item *tmp=value->new_item();
if (tmp) if (tmp)
{ {
tmp->collation.set(value->collation.collation,
value->collation.derivation);
thd->change_item_tree(args, tmp); thd->change_item_tree(args, tmp);
value= tmp; value= tmp;
func->update_used_tables(); func->update_used_tables();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment