summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-02-01 18:29:10 -0800
committerunknown <jimw@mysql.com>2005-02-01 18:29:10 -0800
commit6d0d03dab9a74fb512f03ea0275d84d34657ce2a (patch)
tree1a47b163b367a84db2059d5242ae787ed3350c89 /sql/item_strfunc.h
parentfaca00b5d5a7214dc380bb5b0fd89ea2648d41d2 (diff)
downloadmariadb-git-6d0d03dab9a74fb512f03ea0275d84d34657ce2a.tar.gz
Fix QUOTE() to not reuse the input field for output, which resulted in
incorrect results when the input was a constant across a multi-row SELECT statement. (Bug #8248) sql/item_strfunc.h: Add tmp_value member sql/item_strfunc.cc: Always allocate a new string for QUOTE(), in case the field is being reused for multiple rows. mysql-test/t/func_str.test: Add regression test mysql-test/r/func_str.result: Add test results
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index fc98ebfe67d..ece15484fd9 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -535,6 +535,7 @@ public:
class Item_func_quote :public Item_str_func
{
+ String tmp_value;
public:
Item_func_quote(Item *a) :Item_str_func(a) {}
const char *func_name() const { return "quote"; }