summaryrefslogtreecommitdiff
path: root/sql/item_buff.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-07-30 16:56:57 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-07-30 16:56:57 +0300
commit1560eab136642c19773f71e855e5696226cfd94f (patch)
tree3c3efc605b2176abeeadaa0a70a061877360cc4e /sql/item_buff.cc
parentab20577be5d34daed7ae772285d069af59d09dee (diff)
parentde5029a4586176b9fed06ab96fb3a6e0bbcd8c54 (diff)
downloadmariadb-git-1560eab136642c19773f71e855e5696226cfd94f.tar.gz
merge
Diffstat (limited to 'sql/item_buff.cc')
-rw-r--r--sql/item_buff.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_buff.cc b/sql/item_buff.cc
index a1bbd95c2c6..87197c7d9b6 100644
--- a/sql/item_buff.cc
+++ b/sql/item_buff.cc
@@ -65,7 +65,9 @@ Cached_item::~Cached_item() {}
*/
Cached_item_str::Cached_item_str(THD *thd, Item *arg)
- :item(arg), value(min(arg->max_length, thd->variables.max_sort_length))
+ :item(arg),
+ value_max_length(min(arg->max_length, thd->variables.max_sort_length)),
+ value(value_max_length)
{}
bool Cached_item_str::cmp(void)
@@ -74,7 +76,7 @@ bool Cached_item_str::cmp(void)
bool tmp;
if ((res=item->val_str(&tmp_value)))
- res->length(min(res->length(), value.alloced_length()));
+ res->length(min(res->length(), value_max_length));
if (null_value != item->null_value)
{
if ((null_value= item->null_value))