1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed the bug mdev-12563.

The bug happened when the specification of a recursive CTE had
no recursive references at the top level of the specification.
In this case the regular processing of derived table references
of the select containing a non-recursive reference to this
recursive CTE misses handling the specification unit.
At the preparation stage any non-recursive reference to a
recursive CTE must be handled after the preparation of the
specification unit for this CTE. So we have to force this
preparation when regular handling of derived tables does not
do it.
This commit is contained in:
Igor Babaev
2017-04-28 21:58:04 -07:00
parent 4b24467ff3
commit 7a29ca2776
6 changed files with 209 additions and 6 deletions

View File

@ -39,10 +39,6 @@ bool mysql_derived_cleanup(THD *thd, LEX *lex, TABLE_LIST *derived);
Item *delete_not_needed_parts(THD *thd, Item *cond);
#if 0
bool pushdown_cond_for_derived(THD *thd, Item **cond, TABLE_LIST *derived);
#else
bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived);
#endif
#endif /* SQL_DERIVED_INCLUDED */