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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4c39f75c
Commit
4c39f75c
authored
Sep 07, 2016
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-10057: Crash with EXPLAIN + WITH + constant query
Add the testcase
parent
06ba09d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
mysql-test/r/cte_nonrecursive.result
mysql-test/r/cte_nonrecursive.result
+13
-0
mysql-test/t/cte_nonrecursive.test
mysql-test/t/cte_nonrecursive.test
+9
-0
No files found.
mysql-test/r/cte_nonrecursive.result
View file @
4c39f75c
...
@@ -851,3 +851,16 @@ a
...
@@ -851,3 +851,16 @@ a
9
9
drop view v1;
drop view v1;
drop table ten, one_k;
drop table ten, one_k;
#
# MDEV-10057 : Crash with EXPLAIN + WITH + constant query
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
1
1
EXPLAIN SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
DROP TABLE t1;
mysql-test/t/cte_nonrecursive.test
View file @
4c39f75c
...
@@ -535,3 +535,12 @@ select * from v1;
...
@@ -535,3 +535,12 @@ select * from v1;
drop
view
v1
;
drop
view
v1
;
drop
table
ten
,
one_k
;
drop
table
ten
,
one_k
;
--
echo
#
--
echo
# MDEV-10057 : Crash with EXPLAIN + WITH + constant query
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
);
SELECT
*
FROM
(
WITH
a
AS
(
SELECT
*
FROM
t1
)
SELECT
1
)
AS
t1
;
EXPLAIN
SELECT
*
FROM
(
WITH
a
AS
(
SELECT
*
FROM
t1
)
SELECT
1
)
AS
t1
;
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