From 91d2150dd69ce62f7aef3cc2855ddb975cde82da Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Sep 2005 12:37:16 -0700 Subject: 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. --- mysql-test/r/olap.result | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/r/olap.result') diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index 7178895cf80..65f7c649624 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -516,3 +516,16 @@ a b c count 1 NULL NULL 2 NULL NULL NULL 2 DROP TABLE t1; +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; +a a + 1 COUNT(*) +1 2 1 +2 3 1 +NULL NULL 2 +SELECT * FROM (SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP) t; +a LENGTH(a) COUNT(*) +1 1 1 +2 1 1 +NULL NULL 2 +DROP TABLE t1; -- cgit v1.2.1