diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item.cc b/sql/item.cc index 2edeb4c0ee0..2dc65c5fb17 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -255,8 +255,9 @@ my_decimal *Item::val_decimal_from_int(my_decimal *decimal_value) my_decimal *Item::val_decimal_from_string(my_decimal *decimal_value) { String *res; + if (!(res= val_str(&str_value))) - return 0; // NULL or EOM + return 0; if (str2my_decimal(E_DEC_FATAL_ERROR & ~E_DEC_BAD_NUM, res->ptr(), res->length(), res->charset(), @@ -3742,7 +3743,7 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list) int found_match_degree= 0; Item_ident *cur_field; int cur_match_degree= 0; - char name_buff[NAME_LEN+1]; + char name_buff[SAFE_NAME_LEN+1]; if (find_item->type() == Item::FIELD_ITEM || find_item->type() == Item::REF_ITEM) @@ -4154,8 +4155,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) context->first_name_resolution_table, context->last_name_resolution_table, reference, REPORT_ALL_ERRORS, - !any_privileges && - TRUE, TRUE); + !any_privileges, TRUE); } return -1; } |