diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2017-01-18 00:56:24 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2017-01-18 00:56:24 +0300 |
commit | 45f11a729c9ccacd57a82a3b523ba73e4113311b (patch) | |
tree | be311bc6a7b958c4f1c62310be807b819bee93c7 /mysql-test/r/cte_recursive.result | |
parent | 6a65de6cda17cc955d73b992f91acb76e8ef7512 (diff) | |
download | mariadb-git-45f11a729c9ccacd57a82a3b523ba73e4113311b.tar.gz |
MDEV-10773: ANALYZE FORMAT=JSON query_with_CTE crashes
Added testcase
Diffstat (limited to 'mysql-test/r/cte_recursive.result')
-rw-r--r-- | mysql-test/r/cte_recursive.result | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/mysql-test/r/cte_recursive.result b/mysql-test/r/cte_recursive.result index d5476aec1c4..e68d5a38283 100644 --- a/mysql-test/r/cte_recursive.result +++ b/mysql-test/r/cte_recursive.result @@ -2343,3 +2343,68 @@ select id + 1, uuid() from data_generator where id < 150000 select * from data_generator ) as a; 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" + } + } + } + ] + } + } + } + } + } +} |