diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-07-30 16:56:57 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-07-30 16:56:57 +0300 |
commit | 1560eab136642c19773f71e855e5696226cfd94f (patch) | |
tree | 3c3efc605b2176abeeadaa0a70a061877360cc4e /sql/item_buff.cc | |
parent | ab20577be5d34daed7ae772285d069af59d09dee (diff) | |
parent | de5029a4586176b9fed06ab96fb3a6e0bbcd8c54 (diff) | |
download | mariadb-git-1560eab136642c19773f71e855e5696226cfd94f.tar.gz |
merge
Diffstat (limited to 'sql/item_buff.cc')
-rw-r--r-- | sql/item_buff.cc | 6 |
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)) |