summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 2fdb89f301c..62eb66be646 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -4551,9 +4551,11 @@ void JOIN::exec_inner()
{
List_iterator_fast<Item> const_item_it(exec_const_order_group_cond);
Item *cur_const_item;
+ StringBuffer<MAX_FIELD_WIDTH> tmp;
while ((cur_const_item= const_item_it++))
{
- cur_const_item->val_str(); // This caches val_str() to Item::str_value
+ tmp.set_buffer_if_not_allocated(&my_charset_bin);
+ cur_const_item->val_str(&tmp);
if (unlikely(thd->is_error()))
{
error= thd->is_error();