diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-09-10 15:24:07 +0500 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-09-10 15:24:07 +0500 |
commit | 5fbc2904bccbcd5e3609a4a660105ccab117c7c6 (patch) | |
tree | d57eb47198b5b9ed74be5982062200f2cbb5efd7 /mysql-test/r/func_str.result | |
parent | 54847efffd20a6550813cf543d48bacc9e3e9a1a (diff) | |
download | mariadb-git-5fbc2904bccbcd5e3609a4a660105ccab117c7c6.tar.gz |
Bug#46815 CONCAT_WS returning wrong data
The problem is that argument buffer can be used as result buffer
and it leads to argument value change.
The fix is to use 'old buffer' as result buffer only
if first argument is not constant item.
Diffstat (limited to 'mysql-test/r/func_str.result')
-rw-r--r-- | mysql-test/r/func_str.result | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 75f8983e838..bf2a9ca8901 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2196,4 +2196,13 @@ SELECT LOAD_FILE(a) FROM t1; LOAD_FILE(a) NULL DROP TABLE t1; +CREATE TABLE t1 (f2 VARCHAR(20)); +CREATE TABLE t2 (f2 VARCHAR(20)); +INSERT INTO t1 VALUES ('MIN'),('MAX'); +INSERT INTO t2 VALUES ('LOAD'); +SELECT CONCAT_WS('_', (SELECT t2.f2 FROM t2), t1.f2) AS concat_name FROM t1; +concat_name +LOAD_MIN +LOAD_MAX +DROP TABLE t1, t2; End of 5.0 tests |