summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-15 18:24:15 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-15 18:24:15 +0100
commitd7304375e5e0ce30979c2b92e70eb0effaa30a25 (patch)
treebb9d05f40e948d4b027f4da9c007c433a16fa1a6 /sql/item.cc
parentcd29dc98216d822ad701d604b3eda886e1db2aaa (diff)
parente0f3a0fae98bea144b962ef8dbbe62e0935aebb1 (diff)
downloadmariadb-git-d7304375e5e0ce30979c2b92e70eb0effaa30a25.tar.gz
mysql-5.1.73 merge
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc8
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.