Skip to content

Commit

Permalink
mdev-9864: cleanup, re-factoring.
Browse files Browse the repository at this point in the history
Added comments.
  • Loading branch information
igorbabaev committed Aug 26, 2016
1 parent f33c352 commit c8f85bf
Show file tree
Hide file tree
Showing 11 changed files with 547 additions and 207 deletions.
5 changes: 5 additions & 0 deletions sql/item_subselect.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ class Item_subselect :public Item_result_field,
/* TRUE <=> The underlying SELECT is correlated w.r.t some ancestor select */
bool is_correlated;

/*
TRUE <=> the subquery contains a recursive reference in the FROM list
of one of its selects. In this case some of subquery optimization
strategies cannot be applied for the subquery;
*/
bool with_recursive_reference;

enum subs_type {UNKNOWN_SUBS, SINGLEROW_SUBS,
Expand Down
2 changes: 1 addition & 1 deletion sql/share/errmsg-utf8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7157,7 +7157,7 @@ ER_RECURSIVE_WITHOUT_ANCHORS
ER_UNACCEPTABLE_MUTUAL_RECURSION
eng "Unacceptable mutual recursion with anchored table '%s'"
ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED
eng "Reference to recursive WITH table '%s' in materiazed derived"
eng "Reference to recursive WITH table '%s' in materialized derived"
ER_NOT_STANDARDS_COMPLIANT_RECURSIVE
eng "Restrictions imposed on recursive definitions are violated for table '%s'"
#
Expand Down
4 changes: 3 additions & 1 deletion sql/sql_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -4682,10 +4682,12 @@ class select_union_recursive :public select_union
{
public:
TABLE *incr_table;
TABLE *first_rec_table_to_update;
List<TABLE> rec_tables;

select_union_recursive(THD *thd_arg):
select_union(thd_arg), incr_table(0) {};
select_union(thd_arg),
incr_table(0), first_rec_table_to_update(0) {};

int send_data(List<Item> &items);
bool create_result_table(THD *thd, List<Item> *column_types,
Expand Down
Loading

0 comments on commit c8f85bf

Please sign in to comment.