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
45f11a72
Commit
45f11a72
authored
Jan 18, 2017
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-10773: ANALYZE FORMAT=JSON query_with_CTE crashes
Added testcase
parent
6a65de6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
mysql-test/r/cte_recursive.result
mysql-test/r/cte_recursive.result
+65
-0
mysql-test/t/cte_recursive.test
mysql-test/t/cte_recursive.test
+12
-0
No files found.
mysql-test/r/cte_recursive.result
View file @
45f11a72
...
@@ -2343,3 +2343,68 @@ select id + 1, uuid() from data_generator where id < 150000
...
@@ -2343,3 +2343,68 @@ select id + 1, uuid() from data_generator where id < 150000
select * from data_generator
select * from data_generator
) as a;
) as a;
drop table t1;
drop table t1;
#
# MDEV-10773: ANALYZE FORMAT=JSON query_with_CTE crashes
#
analyze format=json
with recursive src(counter) as
(select 1
union
select counter+1 from src where counter<10
) select * from src;
ANALYZE
{
"query_block": {
"select_id": 1,
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"table": {
"table_name": "<derived2>",
"access_type": "ALL",
"r_loops": 1,
"rows": 2,
"r_rows": 10,
"r_total_time_ms": "REPLACED"e-4,
"filtered": 100,
"r_filtered": 100,
"materialized": {
"query_block": {
"recursive_union": {
"table_name": "<union2,3>",
"access_type": "ALL",
"r_loops": 0,
"r_rows": null,
"query_specifications": [
{
"query_block": {
"select_id": 2,
"table": {
"message": "No tables used"
}
}
},
{
"query_block": {
"select_id": 3,
"r_loops": 10,
"r_total_time_ms": "REPLACED",
"table": {
"table_name": "<derived2>",
"access_type": "ALL",
"r_loops": 10,
"rows": 2,
"r_rows": 1,
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 90,
"attached_condition": "src.counter < 10"
}
}
}
]
}
}
}
}
}
}
mysql-test/t/cte_recursive.test
View file @
45f11a72
...
@@ -1505,3 +1505,15 @@ select id, test_data
...
@@ -1505,3 +1505,15 @@ select id, test_data
)
as
a
;
)
as
a
;
drop
table
t1
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-10773: ANALYZE FORMAT=JSON query_with_CTE crashes
--
echo
#
--
replace_regex
/
"r_total_time_ms"
:
[
0
-
9
]
*
[
.
]
?
[
0
-
9
]
*/
"r_total_time_ms"
:
"REPLACED"
/
analyze
format
=
json
with
recursive
src
(
counter
)
as
(
select
1
union
select
counter
+
1
from
src
where
counter
<
10
)
select
*
from
src
;
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