Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6bbdd66e
Commit
6bbdd66e
authored
Sep 08, 2005
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
olap.result, olap.test:
Added a test case with VIEW for bug #12885.
parent
b2f0f908
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
mysql-test/r/olap.result
mysql-test/r/olap.result
+16
-0
mysql-test/t/olap.test
mysql-test/t/olap.test
+17
-2
No files found.
mysql-test/r/olap.result
View file @
6bbdd66e
...
...
@@ -602,3 +602,19 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using filesort
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (a int(11) NOT NULL);
INSERT INTO t1 VALUES (1),(2);
CREATE VIEW v1 AS
SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP;
DESC v1;
Field Type Null Key Default Extra
a bigint(11) YES NULL
LENGTH(a) bigint(10) YES NULL
COUNT(*) bigint(21) NO 0
SELECT * FROM v1;
a LENGTH(a) COUNT(*)
1 1 1
2 1 1
NULL NULL 2
DROP VIEW v1;
DROP TABLE t1;
mysql-test/t/olap.test
View file @
6bbdd66e
...
...
@@ -263,8 +263,8 @@ SELECT a, b, a AS c, COUNT(*) AS count FROM t1 GROUP BY a, b, c WITH ROLLUP;
DROP
TABLE
t1
;
#
# Bug #1
1885:
derived table specified by a subquery with
# ROLLUP over expressions on not nullable group by attributes
# Bug #1
2885(1):
derived table specified by a subquery with
#
ROLLUP over expressions on not nullable group by attributes
#
CREATE
TABLE
t1
(
a
int
(
11
)
NOT
NULL
);
...
...
@@ -294,4 +294,19 @@ EXPLAIN SELECT type FROM v1 GROUP BY type WITH ROLLUP;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
#
# Bug #12885(2): view 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
);
CREATE
VIEW
v1
AS
SELECT
a
,
LENGTH
(
a
),
COUNT
(
*
)
FROM
t1
GROUP
BY
a
WITH
ROLLUP
;
DESC
v1
;
SELECT
*
FROM
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment