From 135f5745f6ffb7587224813030bbc1e3eeb3b029 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 17 May 2002 10:50:57 +0300 Subject: 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 --- mysql-test/r/func_concat.result | 13 +++++++++++++ mysql-test/t/func_concat.test | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 mysql-test/r/func_concat.result create mode 100644 mysql-test/t/func_concat.test (limited to 'mysql-test') 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; -- cgit v1.2.1