Commit d2730b33 authored by igor@rurik.mysql.com's avatar igor@rurik.mysql.com

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.
parent 4fd1869c
...@@ -742,7 +742,7 @@ public: ...@@ -742,7 +742,7 @@ public:
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