diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-08-20 14:22:46 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-08-20 14:22:46 +0300 |
commit | c9d20d6c08fe85a852175887d5d361fe1d43b9c2 (patch) | |
tree | abdc965c92ac02057c93a78984ba3e9958312d87 /mysql-test | |
parent | 2aeb18313f6536432b50ba4a289f4254d8ca9d78 (diff) | |
parent | 97e8471599679b37b711f3de328b078250965440 (diff) | |
download | mariadb-git-c9d20d6c08fe85a852175887d5d361fe1d43b9c2.tar.gz |
merge
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_gconcat.result | 20 | ||||
-rw-r--r-- | mysql-test/r/func_misc.result | 15 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_drop.test | 1 | ||||
-rw-r--r-- | mysql-test/t/func_gconcat.test | 21 | ||||
-rw-r--r-- | mysql-test/t/func_misc.test | 14 |
5 files changed, 71 insertions, 0 deletions
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 1a393b3cdd5..302de9de9f7 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -1003,6 +1003,7 @@ SELECT 1 FROM 1 1 DROP TABLE t1; +End of 5.0 tests # # Bug #52397: another crash with explain extended and group_concat # @@ -1019,6 +1020,25 @@ Warnings: Note 1003 select 1 AS `1` from dual DROP TABLE t1; End of 5.0 tests +# +# Bug #54476: crash when group_concat and 'with rollup' in prepared statements +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2); +PREPARE stmt FROM "SELECT GROUP_CONCAT(t1.a ORDER BY t1.a) FROM t1 JOIN t1 t2 GROUP BY t1.a WITH ROLLUP"; +EXECUTE stmt; +GROUP_CONCAT(t1.a ORDER BY t1.a) +1,1 +2,2 +1,1,2,2 +EXECUTE stmt; +GROUP_CONCAT(t1.a ORDER BY t1.a) +1,1 +2,2 +1,1,2,2 +DEALLOCATE PREPARE stmt; +DROP TABLE t1; +End of 5.1 tests DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 (a VARCHAR(6), b INT); CREATE TABLE t2 (a VARCHAR(6), b INT); diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index e21e7903459..1eb4153eb8b 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -337,6 +337,21 @@ select connection_id() > 0; connection_id() > 0 1 # +# Bug #54461: crash with longblob and union or update with subquery +# +CREATE TABLE t1 (a INT, b LONGBLOB); +INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2'); +SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1; +LEAST(a, (SELECT b FROM t1 LIMIT 1)) +1 +2 +SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1; +GREATEST(a, (SELECT b FROM t1 LIMIT 1)) +2 +3 +1 +DROP TABLE t1; +# # Bug #52165: Assertion failed: file .\dtoa.c, line 465 # CREATE TABLE t1 (a SET('a'), b INT); diff --git a/mysql-test/suite/rpl/t/rpl_drop.test b/mysql-test/suite/rpl/t/rpl_drop.test index 6f586d90de3..7af325240ee 100644 --- a/mysql-test/suite/rpl/t/rpl_drop.test +++ b/mysql-test/suite/rpl/t/rpl_drop.test @@ -10,3 +10,4 @@ drop table t1, t2; sync_slave_with_master; # End of 4.1 tests + diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index e191b9750e3..36a8542f9eb 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -708,6 +708,7 @@ SELECT 1 FROM DROP TABLE t1; +--echo End of 5.0 tests --echo # --echo # Bug #52397: another crash with explain extended and group_concat @@ -722,6 +723,26 @@ DROP TABLE t1; --echo End of 5.0 tests + +--echo # +--echo # Bug #54476: crash when group_concat and 'with rollup' in prepared statements +--echo # + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2); + +PREPARE stmt FROM "SELECT GROUP_CONCAT(t1.a ORDER BY t1.a) FROM t1 JOIN t1 t2 GROUP BY t1.a WITH ROLLUP"; +EXECUTE stmt; +EXECUTE stmt; + +DEALLOCATE PREPARE stmt; +DROP TABLE t1; + + +--echo End of 5.1 tests + + + # # Bug#36785: Wrong error message when group_concat() exceeds max length # diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index a60eb9cf845..f6dd6478a93 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -468,6 +468,19 @@ select NAME_CONST('_id',1234) as id; select connection_id() > 0; --echo # +--echo # Bug #54461: crash with longblob and union or update with subquery +--echo # + +CREATE TABLE t1 (a INT, b LONGBLOB); +INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2'); + +SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1; +SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1; + +DROP TABLE t1; + + +--echo # --echo # Bug #52165: Assertion failed: file .\dtoa.c, line 465 --echo # @@ -478,4 +491,5 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1; DROP TABLE t1; + --echo End of tests |