summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-17 10:50:57 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-17 10:50:57 +0300
commit135f5745f6ffb7587224813030bbc1e3eeb3b029 (patch)
tree53716b6b5be964e8361d93b88f41f9313444e34c /mysql-test
parent167eb02c8020386cfd063391b74777fc0b4a44ad (diff)
downloadmariadb-git-135f5745f6ffb7587224813030bbc1e3eeb3b029.tar.gz
Fix bug in CONCAT_WS()
Update of glibc patch from MySQL 4.0 Docs/glibc-2.2.5.patch: Update of patch from MySQL 4.0 Docs/manual.texi: ChangeLog sql/item_strfunc.cc: Fix bug in CONCAT_WS() sql/share/italian/errmsg.txt: Update of new error messages
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_concat.result13
-rw-r--r--mysql-test/t/func_concat.test24
2 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/r/func_concat.result b/mysql-test/r/func_concat.result
new file mode 100644
index 00000000000..75ee8f2bf79
--- /dev/null
+++ b/mysql-test/r/func_concat.result
@@ -0,0 +1,13 @@
+number alpha new
+1413006 idlfmv 1413006<---->idlfmv
+1413065 smpsfz 1413065<---->smpsfz
+1413127 sljrhx 1413127<---->sljrhx
+1413304 qerfnd 1413304<---->qerfnd
+new
+1413006<---->idlfmv
+number alpha new
+1413006 idlfmv 1413006<->idlfmv
+number alpha new
+1413006 idlfmv 1413006-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv
+number alpha new
+1413006 idlfmv 1413006<------------------>idlfmv
diff --git a/mysql-test/t/func_concat.test b/mysql-test/t/func_concat.test
new file mode 100644
index 00000000000..d6da1d6a603
--- /dev/null
+++ b/mysql-test/t/func_concat.test
@@ -0,0 +1,24 @@
+#
+# Test of problem with CONCAT_WS() and long separators.
+#
+
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
+INSERT INTO t1 VALUES (1413006,'idlfmv'),
+(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');
+
+SELECT number, alpha, CONCAT_WS('<---->',number,alpha) AS new
+FROM t1 GROUP BY number;
+
+SELECT CONCAT_WS('<---->',number,alpha) AS new
+FROM t1 GROUP BY new LIMIT 1;
+
+SELECT number, alpha, CONCAT_WS('<->',number,alpha) AS new
+FROM t1 GROUP BY new LIMIT 1;
+
+SELECT number, alpha, CONCAT_WS('-',number,alpha,alpha,alpha,alpha,alpha,alpha,alpha) AS new
+FROM t1 GROUP BY new LIMIT 1;
+
+SELECT number, alpha, CONCAT_WS('<------------------>',number,alpha) AS new
+FROM t1 GROUP BY new LIMIT 1;
+drop table t1;