mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed the bug mdev-12440.
When a CTE referring to another CTE from the same with clause was used twice then the server could not find the second CTE and reported a bogus error message. This happened because for any unit that was created as a clone of a CTE specification the pointer to the WITH clause that owned this CTE was not set.
This commit is contained in:
@ -780,6 +780,7 @@ st_select_lex_unit *With_element::clone_parsed_spec(THD *thd,
|
||||
with_table->next_global= spec_tables;
|
||||
}
|
||||
res= &lex->unit;
|
||||
res->set_with_clause(owner);
|
||||
|
||||
lex->unit.include_down(with_table->select_lex);
|
||||
lex->unit.set_slave(with_select);
|
||||
|
Reference in New Issue
Block a user