diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc index 82b6c921ec7..c529f351250 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2000, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -430,7 +430,7 @@ Item::Item(THD *thd, Item *item): fixed(item->fixed), is_autogenerated_name(item->is_autogenerated_name), collation(item->collation), - with_subselect(item->with_subselect), + with_subselect(item->has_subquery()), cmp_context(item->cmp_context) { next= thd->free_list; // Put in free list @@ -3204,7 +3204,9 @@ bool Item_param::convert_str_value(THD *thd) /* Here str_value is guaranteed to be in final_character_set_of_str_value */ max_length= str_value.numchars() * str_value.charset()->mbmaxlen; - decimals= 0; + + /* For the strings converted to numeric form within some functions */ + decimals= NOT_FIXED_DEC; /* str_value_ptr is returned from val_str(). It must be not alloced to prevent it's modification by val_str() invoker. |