diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-09-23 17:57:39 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-09-23 17:57:39 +0400 |
commit | ff83a4285376c8f259fea451d92e5909ddb5049e (patch) | |
tree | c148b3632f4b93b84d5f1e31dd3669612181702e /mysql-test/t/func_gconcat.test | |
parent | 7947948c5225b5e48dfeb18a17f0c170620bfc89 (diff) | |
parent | 1ecaf1bc1e589a7246b2a4c18490ecf96209154e (diff) | |
download | mariadb-git-ff83a4285376c8f259fea451d92e5909ddb5049e.tar.gz |
Merge mysql-trunk-signal (into mysql-next-mr-alik, which is mysql-next-mr).
Diffstat (limited to 'mysql-test/t/func_gconcat.test')
-rw-r--r-- | mysql-test/t/func_gconcat.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index e92f3e96303..71d3d5a140b 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -694,3 +694,35 @@ SELECT 1 FROM t1 WHERE t1.a NOT IN DROP TABLE t1, t2; --echo End of 5.0 tests + +# +# Bug#36785: Wrong error message when group_concat() exceeds max length +# + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +CREATE TABLE t1 (a VARCHAR(6), b INT); +CREATE TABLE t2 (a VARCHAR(6), b INT); + +INSERT INTO t1 VALUES ('111111', 1); +INSERT INTO t1 VALUES ('222222', 2); +INSERT INTO t1 VALUES ('333333', 3); +INSERT INTO t1 VALUES ('444444', 4); +INSERT INTO t1 VALUES ('555555', 5); + +SET group_concat_max_len = 5; +SET @old_sql_mode = @@sql_mode, @@sql_mode = 'traditional'; + +SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b LIMIT 3; +--error ER_CUT_VALUE_GROUP_CONCAT +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; +UPDATE t1 SET a = '11111' WHERE b = 1; +UPDATE t1 SET a = '22222' WHERE b = 2; +--error ER_CUT_VALUE_GROUP_CONCAT +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; + +SET group_concat_max_len = DEFAULT; +SET @@sql_mode = @old_sql_mode; +DROP TABLE t1, t2; |