diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-10-30 19:16:25 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-10-30 19:16:25 +0300 |
commit | 7f9656369f97803bb10a1111f60d60db295b82a4 (patch) | |
tree | b4c253853e8d3148ab0c1065dbbfd2cc398db47e /mysql-test | |
parent | ecef6c3308b3f92e0250d071b23ef0f74ffadef4 (diff) | |
parent | b67cdaa351122ca0d8badd2f8fb4ec9085c58933 (diff) | |
download | mariadb-git-7f9656369f97803bb10a1111f60d60db295b82a4.tar.gz |
Automerge.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/olap.result | 20 | ||||
-rw-r--r-- | mysql-test/t/olap.test | 15 |
2 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index ad04e7304c9..56e06f03378 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -733,4 +733,24 @@ SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP; 1 1 DROP TABLE t1; +# +# Bug #48131: crash group by with rollup, distinct, +# filesort, with temporary tables +# +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY); +INSERT INTO t1 VALUES (1), (2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (100); +SELECT a, b FROM t1, t2 GROUP BY a, b WITH ROLLUP; +a b +1 100 +1 NULL +2 100 +2 NULL +NULL NULL +SELECT DISTINCT b FROM t1, t2 GROUP BY a, b WITH ROLLUP; +b +100 +NULL +DROP TABLE t1, t2; End of 5.0 tests diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test index d1e40024733..8f672af40a3 100644 --- a/mysql-test/t/olap.test +++ b/mysql-test/t/olap.test @@ -375,4 +375,19 @@ INSERT INTO t1 VALUES(0); SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP; DROP TABLE t1; +--echo # +--echo # Bug #48131: crash group by with rollup, distinct, +--echo # filesort, with temporary tables +--echo # + +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY); +INSERT INTO t1 VALUES (1), (2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (100); + +SELECT a, b FROM t1, t2 GROUP BY a, b WITH ROLLUP; +SELECT DISTINCT b FROM t1, t2 GROUP BY a, b WITH ROLLUP; + +DROP TABLE t1, t2; + --echo End of 5.0 tests |