diff options
author | unknown <sergefp@mysql.com> | 2005-06-23 19:05:36 +0200 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2005-06-23 19:05:36 +0200 |
commit | 0021ec52c607ac2f87c8e2c6dfc0f89a711f608a (patch) | |
tree | e0afc2c296413ff6fa8f5eea640a265be1b2cc77 /sql/item_cmpfunc.cc | |
parent | 309a7e679f4b75574949085abbd3ea56fafa33cb (diff) | |
parent | ef920b28793302a532b87b4babfc224bb732941e (diff) | |
download | mariadb-git-0021ec52c607ac2f87c8e2c6dfc0f89a711f608a.tar.gz |
Merge
mysql-test/r/case.result:
SCCS merged
mysql-test/t/case.test:
SCCS merged
sql/item_cmpfunc.cc:
SCCS merged
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 4 |
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: |