Commit dc8af8ab authored by unknown's avatar unknown

Changed ROW_RESULT to default


sql/item_cmpfunc.cc:
  Changed ROW_RESULT to default
  Add some dafult case
parent 884e7334
...@@ -571,7 +571,7 @@ static void make_sortkey(register SORTPARAM *param, ...@@ -571,7 +571,7 @@ static void make_sortkey(register SORTPARAM *param,
change_double_for_sort(value,(byte*) to); change_double_for_sort(value,(byte*) to);
break; break;
} }
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
...@@ -954,7 +954,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length) ...@@ -954,7 +954,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
case REAL_RESULT: case REAL_RESULT:
sortorder->length=sizeof(double); sortorder->length=sizeof(double);
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
......
...@@ -821,7 +821,7 @@ Item *Item_func_case::find_item(String *str) ...@@ -821,7 +821,7 @@ Item *Item_func_case::find_item(String *str)
if (args[i]->val()==first_expr_real && !args[i]->null_value) if (args[i]->val()==first_expr_real && !args[i]->null_value)
return args[i+1]; return args[i+1];
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
...@@ -1166,6 +1166,9 @@ cmp_item* cmp_item::get_comparator (Item *item) ...@@ -1166,6 +1166,9 @@ cmp_item* cmp_item::get_comparator (Item *item)
case ROW_RESULT: case ROW_RESULT:
return new cmp_item_row; return new cmp_item_row;
break; break;
default:
DBUG_ASSERT(0);
break;
} }
return 0; // to satisfy compiler :) return 0; // to satisfy compiler :)
} }
...@@ -1308,6 +1311,9 @@ void Item_func_in::fix_length_and_dec() ...@@ -1308,6 +1311,9 @@ void Item_func_in::fix_length_and_dec()
case ROW_RESULT: case ROW_RESULT:
array= new in_row(arg_count, item); array= new in_row(arg_count, item);
break; break;
default:
DBUG_ASSERT(0);
return;
} }
uint j=0; uint j=0;
for (uint i=0 ; i < arg_count ; i++) for (uint i=0 ; i < arg_count ; i++)
......
...@@ -260,7 +260,7 @@ Field *Item_func::tmp_table_field(TABLE *t_arg) ...@@ -260,7 +260,7 @@ Field *Item_func::tmp_table_field(TABLE *t_arg)
else else
res= new Field_string(max_length, maybe_null, name, t_arg, charset()); res= new Field_string(max_length, maybe_null, name, t_arg, charset());
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
...@@ -910,7 +910,7 @@ String *Item_func_min_max::val_str(String *str) ...@@ -910,7 +910,7 @@ String *Item_func_min_max::val_str(String *str)
} }
return res; return res;
} }
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
return 0; return 0;
...@@ -1451,7 +1451,7 @@ bool udf_handler::get_arguments() ...@@ -1451,7 +1451,7 @@ bool udf_handler::get_arguments()
to+= ALIGN_SIZE(sizeof(double)); to+= ALIGN_SIZE(sizeof(double));
} }
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
; ;
...@@ -1909,7 +1909,7 @@ longlong Item_func_benchmark::val_int() ...@@ -1909,7 +1909,7 @@ longlong Item_func_benchmark::val_int()
case STRING_RESULT: case STRING_RESULT:
(void) args[0]->val_str(&tmp); (void) args[0]->val_str(&tmp);
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
return 0; return 0;
...@@ -2045,7 +2045,7 @@ Item_func_set_user_var::update() ...@@ -2045,7 +2045,7 @@ Item_func_set_user_var::update()
(void) val_str(&tmp); (void) val_str(&tmp);
break; break;
} }
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
...@@ -2124,7 +2124,7 @@ Item_func_get_user_var::val_str(String *str) ...@@ -2124,7 +2124,7 @@ Item_func_get_user_var::val_str(String *str)
return NULL; return NULL;
} }
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
...@@ -2145,7 +2145,7 @@ double Item_func_get_user_var::val() ...@@ -2145,7 +2145,7 @@ double Item_func_get_user_var::val()
return (double) *(longlong*) entry->value; return (double) *(longlong*) entry->value;
case STRING_RESULT: case STRING_RESULT:
return atof(entry->value); // This is null terminated return atof(entry->value); // This is null terminated
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
return 0; return 0;
...@@ -2166,7 +2166,7 @@ longlong Item_func_get_user_var::val_int() ...@@ -2166,7 +2166,7 @@ longlong Item_func_get_user_var::val_int()
return *(longlong*) entry->value; return *(longlong*) entry->value;
case STRING_RESULT: case STRING_RESULT:
return strtoull(entry->value,NULL,10); // String is null terminated return strtoull(entry->value,NULL,10); // String is null terminated
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
return 0; return 0;
......
...@@ -350,7 +350,7 @@ double Item_sum_hybrid::val() ...@@ -350,7 +350,7 @@ double Item_sum_hybrid::val()
return (double) sum_int; return (double) sum_int;
case REAL_RESULT: case REAL_RESULT:
return sum; return sum;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
return 0; return 0;
...@@ -385,7 +385,7 @@ Item_sum_hybrid::val_str(String *str) ...@@ -385,7 +385,7 @@ Item_sum_hybrid::val_str(String *str)
else else
str->set((longlong) sum_int,thd_charset()); str->set((longlong) sum_int,thd_charset());
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
...@@ -431,7 +431,7 @@ bool Item_sum_min::add() ...@@ -431,7 +431,7 @@ bool Item_sum_min::add()
} }
} }
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
...@@ -478,7 +478,7 @@ bool Item_sum_max::add() ...@@ -478,7 +478,7 @@ bool Item_sum_max::add()
} }
} }
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
......
...@@ -2038,7 +2038,7 @@ void User_var_log_event::pack_info(Protocol* protocol) ...@@ -2038,7 +2038,7 @@ void User_var_log_event::pack_info(Protocol* protocol)
buf[val_offset + val_len]= '\''; buf[val_offset + val_len]= '\'';
event_len= val_offset + 1 + val_len; event_len= val_offset + 1 + val_len;
break; break;
case ROW_RESULT: default:
DBUG_ASSERT(1); DBUG_ASSERT(1);
return; return;
} }
...@@ -2111,7 +2111,7 @@ int User_var_log_event::write_data(IO_CACHE* file) ...@@ -2111,7 +2111,7 @@ int User_var_log_event::write_data(IO_CACHE* file)
case STRING_RESULT: case STRING_RESULT:
pos= val; pos= val;
break; break;
case ROW_RESULT: default:
DBUG_ASSERT(1); DBUG_ASSERT(1);
return 0; return 0;
} }
...@@ -2163,7 +2163,7 @@ void User_var_log_event::print(FILE* file, bool short_form, char* last_db) ...@@ -2163,7 +2163,7 @@ void User_var_log_event::print(FILE* file, bool short_form, char* last_db)
case STRING_RESULT: case STRING_RESULT:
fprintf(file, ":='%s';\n", val); fprintf(file, ":='%s';\n", val);
break; break;
case ROW_RESULT: default:
DBUG_ASSERT(1); DBUG_ASSERT(1);
return; return;
} }
...@@ -2207,7 +2207,7 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli) ...@@ -2207,7 +2207,7 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli)
case STRING_RESULT: case STRING_RESULT:
it= new Item_string(val, val_len, charset); it= new Item_string(val, val_len, charset);
break; break;
case ROW_RESULT: default:
DBUG_ASSERT(1); DBUG_ASSERT(1);
return 0; return 0;
} }
......
...@@ -205,7 +205,7 @@ static int find_keyword(LEX *lex, uint len, bool function) ...@@ -205,7 +205,7 @@ static int find_keyword(LEX *lex, uint len, bool function)
return (udf->type == UDFTYPE_FUNCTION) ? UDF_FLOAT_FUNC : UDA_FLOAT_SUM; return (udf->type == UDFTYPE_FUNCTION) ? UDF_FLOAT_FUNC : UDA_FLOAT_SUM;
case INT_RESULT: case INT_RESULT:
return (udf->type == UDFTYPE_FUNCTION) ? UDF_INT_FUNC : UDA_INT_SUM; return (udf->type == UDFTYPE_FUNCTION) ? UDF_INT_FUNC : UDA_INT_SUM;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
return 0; return 0;
......
...@@ -3847,7 +3847,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, ...@@ -3847,7 +3847,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
item->name,table,item->charset()); item->name,table,item->charset());
return new Field_string(item_sum->max_length,maybe_null, return new Field_string(item_sum->max_length,maybe_null,
item->name,table,item->charset()); item->name,table,item->charset());
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
return 0; return 0;
...@@ -3907,7 +3907,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, ...@@ -3907,7 +3907,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
new_field= new Field_string(item->max_length,maybe_null, new_field= new Field_string(item->max_length,maybe_null,
item->name,table,item->str_value.charset()); item->name,table,item->str_value.charset());
break; break;
case ROW_RESULT: default:
// This case should never be choosen // This case should never be choosen
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
......
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