summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2005-06-23 19:05:36 +0200
committersergefp@mysql.com <>2005-06-23 19:05:36 +0200
commitf1085fb3bef15ffc49d01b7b7ab93f0e44efa15d (patch)
treee0afc2c296413ff6fa8f5eea640a265be1b2cc77 /sql/item_cmpfunc.cc
parent7e7987eed9fcae293e24bc204ca30c3a4582902e (diff)
parentef85deab927e73be671d2adc6d0b2bf72e2909a4 (diff)
downloadmariadb-git-f1085fb3bef15ffc49d01b7b7ab93f0e44efa15d.tar.gz
Merge
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 5a2e14eef2e..0442865b7f9 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1420,6 +1420,8 @@ Item *Item_func_case::find_item(String *str)
my_decimal *first_expr_dec, first_expr_dec_val;
longlong first_expr_int;
double first_expr_real;
+ char buff[MAX_FIELD_WIDTH];
+ String buff_str(buff,sizeof(buff),default_charset());
/* These will be initialized later */
LINT_INIT(first_expr_str);
@@ -1433,7 +1435,7 @@ Item *Item_func_case::find_item(String *str)
{
case STRING_RESULT:
// We can't use 'str' here as this may be overwritten
- if (!(first_expr_str= args[first_expr_num]->val_str(&str_value)))
+ if (!(first_expr_str= args[first_expr_num]->val_str(&buff_str)))
return else_expr_num != -1 ? args[else_expr_num] : 0; // Impossible
break;
case INT_RESULT: