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
d0d073b1
Commit
d0d073b1
authored
Jul 20, 2018
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected and added back the test case for MDEV-15151.
parent
9827c5e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
mysql-test/r/cte_recursive_not_embedded.result
mysql-test/r/cte_recursive_not_embedded.result
+23
-0
mysql-test/t/cte_recursive_not_embedded.test
mysql-test/t/cte_recursive_not_embedded.test
+42
-0
No files found.
mysql-test/r/cte_recursive_not_embedded.result
0 → 100644
View file @
d0d073b1
#
# MDEV-15151: function with recursive CTE using no base tables
# (duplicate of MDEV-16661)
#
connection default;
CREATE TABLE t1 (id int KEY);
INSERT INTO t1 VALUES (0), (1),(2);
CREATE OR REPLACE FUNCTION func() RETURNS int
RETURN
(
WITH recursive cte AS
(SELECT 1 a UNION SELECT cte.* FROM cte natural join t1)
SELECT * FROM cte limit 1
);
connect con1,localhost,root,,test;
SELECT func();
connect con2,localhost,root,,test;
disconnect con2;
connection con1;
disconnect con1;
connection default;
DROP FUNCTION func;
DROP TABLE t1;
mysql-test/t/cte_recursive_not_embedded.test
0 → 100644
View file @
d0d073b1
--
source
include
/
not_embedded
.
inc
--
echo
#
--
echo
# MDEV-15151: function with recursive CTE using no base tables
--
echo
# (duplicate of MDEV-16661)
--
echo
#
--
connection
default
CREATE
TABLE
t1
(
id
int
KEY
);
INSERT
INTO
t1
VALUES
(
0
),
(
1
),(
2
);
CREATE
OR
REPLACE
FUNCTION
func
()
RETURNS
int
RETURN
(
WITH
recursive
cte
AS
(
SELECT
1
a
UNION
SELECT
cte
.*
FROM
cte
natural
join
t1
)
SELECT
*
FROM
cte
limit
1
);
--
connect
(
con1
,
localhost
,
root
,,
test
)
--
let
$conid
=
`SELECT CONNECTION_ID()`
--
send
SELECT
func
()
--
connect
(
con2
,
localhost
,
root
,,
test
)
--
disable_query_log
--
eval
KILL
QUERY
$conid
--
enable_query_log
--
disconnect
con2
--
disable_result_log
--
connection
con1
--
error
0
,
ER_QUERY_INTERRUPTED
--
reap
--
disconnect
con1
--
enable_result_log
--
connection
default
DROP
FUNCTION
func
;
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