summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_str.result
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-09-10 15:24:07 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-09-10 15:24:07 +0500
commit5fbc2904bccbcd5e3609a4a660105ccab117c7c6 (patch)
treed57eb47198b5b9ed74be5982062200f2cbb5efd7 /mysql-test/r/func_str.result
parent54847efffd20a6550813cf543d48bacc9e3e9a1a (diff)
downloadmariadb-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.result9
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