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

Fixed bug mdev-10889

The bug was in the code of the recursive method
With_element::check_unrestricted_recursive. For recursive
calls of this method sel->get_with_element()->owner != owner.
This commit is contained in:
Igor Babaev
2016-09-26 10:40:44 -07:00
parent 1f1990a161
commit b91bd822fa
3 changed files with 71 additions and 2 deletions

View File

@ -1106,7 +1106,7 @@ bool With_element::check_unrestricted_recursive(st_select_lex *sel,
table_map &unrestricted,
table_map &encountered)
{
/* Check conditions 1-for restricted specification*/
/* Check conditions 1 for restricted specification*/
List_iterator<TABLE_LIST> ti(sel->leaf_tables);
TABLE_LIST *tbl;
while ((tbl= ti++))
@ -1141,7 +1141,7 @@ bool With_element::check_unrestricted_recursive(st_select_lex *sel,
encountered|= with_elem->get_elem_map();
}
}
for (With_element *with_elem= sel->get_with_element()->owner->with_list.first;
for (With_element *with_elem= owner->with_list.first;
with_elem;
with_elem= with_elem->next)
{