diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-04-12 14:11:37 +0300 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2021-04-21 10:21:46 +0400 |
commit | 4a10dd0253192bf84d8fe3e246d427eaf93ff376 (patch) | |
tree | 18ff3139a3ecd65e9c657784e15f3598c56d5668 /sql/json_table.h | |
parent | eb2550ee78898ff7129073a3ae5c6c17096fafca (diff) | |
download | mariadb-git-4a10dd0253192bf84d8fe3e246d427eaf93ff376.tar.gz |
MDEV-25380: JSON_TABLE: Assertion `join->best_read < double(1.797...) fails
The query used a subquery of this form:
SELECT ...
WHERE
EXISTS( SELECT ...
FROM JSON_TABLE(outer_ref, ..) as JT
WHERE trivial_correlation_cond)
EXISTS-to-IN conversion code was unable to see that the subquery will
still be correlated after the trivial_correlation is removed, which
eventually caused a crash due to inability to construct a query plan.
Fixed by making Item_subselect::walk() also walk arguments of Table
Functions.
Diffstat (limited to 'sql/json_table.h')
-rw-r--r-- | sql/json_table.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/json_table.h b/sql/json_table.h index 07d53c55638..90fc667731f 100644 --- a/sql/json_table.h +++ b/sql/json_table.h @@ -200,6 +200,9 @@ public: /*** Name resolution functions ***/ int setup(THD *thd, TABLE_LIST *sql_table, SELECT_LEX *s_lex); + int walk_items(Item_processor processor, bool walk_subquery, + void *argument); + /*** Functions for interaction with the Query Optimizer ***/ void fix_after_pullout(TABLE_LIST *sql_table, st_select_lex *new_parent, bool merge); |