1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

mdev-9864: cleanup, re-factoring.

Added comments.
Added reaction for exceeding maximum number of elements in with clause.
Added a test case to check this reaction.
Added a test case where the specification of a recursive table
uses two non-recursive with tables.
This commit is contained in:
Igor Babaev
2016-08-29 22:45:17 -07:00
parent c8f85bf263
commit 9ac235ab7d
10 changed files with 341 additions and 79 deletions

View File

@ -100,6 +100,7 @@ int select_union::send_data(List<Item> &values)
return 0;
}
int select_union_recursive::send_data(List<Item> &values)
{
int rc= select_union::send_data(values);
@ -1166,7 +1167,29 @@ err:
}
// One step of recursive execution
/**
@brief
Execute the union of the specification of a recursive with table
@details
The method is performed only for the units that are specifications
if recursive with table T. If the specification contains an anchor
part then the first call of this method executes only this part
while the following calls execute the recursive part. If there are
no anchors each call executes the whole unit.
Before the excution the method cleans up the temporary table
to where the new rows of the recursive table are sent.
After the execution the unit these rows are copied to the
temporary tables created for recursive references of T.
If the specification if T is restricted (standards compliant)
then these temporary tables are cleaned up before new rows
are copied into them.
@retval
false on success
true on failure
*/
bool st_select_lex_unit::exec_recursive()
{
st_select_lex *lex_select_save= thd->lex->current_select;