summaryrefslogtreecommitdiff
path: root/sql/item_buff.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2010-10-10 17:18:11 +0300
committerSergey Petrunya <psergey@askmonty.org>2010-10-10 17:18:11 +0300
commit72dd7575cd8b9372ddb79cc4c94050e4ee1e5ee1 (patch)
tree220c965bb467b020a4db171d7803586f9ed22cea /sql/item_buff.cc
parentcfbd9270243e4b429cdc26e8554bcc99690f2422 (diff)
parent00a2f36bbf22a4d8b2367724e7919c0603cf6f71 (diff)
downloadmariadb-git-72dd7575cd8b9372ddb79cc4c94050e4ee1e5ee1.tar.gz
Merge 5.2->5.3
- Re-commit Monty's merge, partially fixed by Igor and SergeyP, but still broken
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 13183a33e59..7d025ef518b 100644
--- a/sql/item_buff.cc
+++ b/sql/item_buff.cc
@@ -62,7 +62,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)
@@ -71,7 +73,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))