mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 10:15:29 +02:00
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
This commit is contained in:
parent
faca00b5d5
commit
6d0d03dab9
4 changed files with 18 additions and 10 deletions
|
|
@ -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"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue