diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-09-24 12:35:16 +0200 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-09-24 12:35:16 +0200 |
commit | 626bac84719e8c30890e22806c1075f64b34ed5b (patch) | |
tree | 0718249009da3fd00d987bef459d1617571e454e /mysql-test/t/func_gconcat.test | |
parent | 2b2ef99ebf63634d6da81f27aa2ee94e09e5b197 (diff) | |
parent | b0220ff9ff6fbc9fc65a9b04f25e337951edd259 (diff) | |
download | mariadb-git-626bac84719e8c30890e22806c1075f64b34ed5b.tar.gz |
merge mysql-next-mr-alik
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; |