diff options
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index bb7f23a6710..3c063428509 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3340,8 +3340,7 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father, if ((tmp2=new COND_CMP(and_father,func))) save_list->push_back(tmp2); } - func->set_cmp_func(item_cmp_type(func->arguments()[0]->result_type(), - func->arguments()[1]->result_type())); + func->set_cmp_func(func->arguments()[0],func->arguments()[1]); } } else if (left_item->eq(field,0) && right_item != value) @@ -3361,8 +3360,7 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father, if ((tmp2=new COND_CMP(and_father,func))) save_list->push_back(tmp2); } - func->set_cmp_func(item_cmp_type(func->arguments()[0]->result_type(), - func->arguments()[1]->result_type())); + func->set_cmp_func(func->arguments()[0], func->arguments()[1]); } } } @@ -3702,6 +3700,10 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, item->name,table,item->charset()); return new Field_string(item_sum->max_length,maybe_null, item->name,table,item->charset()); + case ROW_RESULT: + // This case should never be choosen + DBUG_ASSERT(0); + return 0; } } thd->fatal_error=1; @@ -3758,6 +3760,10 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, new_field= new Field_string(item->max_length,maybe_null, item->name,table,item->str_value.charset()); break; + case ROW_RESULT: + // This case should never be choosen + DBUG_ASSERT(0); + break; } if (copy_func) *((*copy_func)++) = (Item_result_field*) item; // Save for copy_funcs |