diff options
author | unknown <igor@rurik.mysql.com> | 2005-09-08 12:37:16 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-09-08 12:37:16 -0700 |
commit | 91d2150dd69ce62f7aef3cc2855ddb975cde82da (patch) | |
tree | 9393527c9e720464d7ebb01d185ba3e6ad37cec2 /mysql-test/t/olap.test | |
parent | 110230beeca54c76d142b184a35b08029fa3a91b (diff) | |
download | mariadb-git-91d2150dd69ce62f7aef3cc2855ddb975cde82da.tar.gz |
sql_select.cc:
Fixed bug #12885.
Forced inheritence of the maybe_null flag for the expressions
containing GROUP BY attributes in selects with ROLLUP.
olap.test, olap.result:
Added test case for bug #12885.
mysql-test/r/olap.result:
Added test case for bug #12885.
mysql-test/t/olap.test:
Added test case for bug #12885.
sql/sql_select.cc:
Fixed bug #12885.
Forced inheritence of the maybe_null flag for the expressions
containing GROUP BY attributes in selects with ROLLUP.
Diffstat (limited to 'mysql-test/t/olap.test')
-rw-r--r-- | mysql-test/t/olap.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test index c9a16b897c6..76c62d14621 100644 --- a/mysql-test/t/olap.test +++ b/mysql-test/t/olap.test @@ -250,4 +250,17 @@ SELECT a, b, a AS c, COUNT(*) AS count FROM t1 GROUP BY a, b, c WITH ROLLUP; DROP TABLE t1; +# +# Bug #11885: derived table specified by a subquery with +# ROLLUP over expressions on not nullable group by attributes +# + +CREATE TABLE t1 (a int(11) NOT NULL); +INSERT INTO t1 VALUES (1),(2); + +SELECT * FROM (SELECT a, a + 1, COUNT(*) FROM t1 GROUP BY a WITH ROLLUP) t; +SELECT * FROM (SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP) t; + +DROP TABLE t1; + # End of 4.1 tests |