Skip to content

Commit c8f85bf

Browse files
committed
mdev-9864: cleanup, re-factoring.
Added comments.
1 parent f33c352 commit c8f85bf

File tree

11 files changed

+547
-207
lines changed

11 files changed

+547
-207
lines changed

sql/item_subselect.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ class Item_subselect :public Item_result_field,
128128
/* TRUE <=> The underlying SELECT is correlated w.r.t some ancestor select */
129129
bool is_correlated;
130130

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

133138
enum subs_type {UNKNOWN_SUBS, SINGLEROW_SUBS,

sql/share/errmsg-utf8.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7157,7 +7157,7 @@ ER_RECURSIVE_WITHOUT_ANCHORS
71577157
ER_UNACCEPTABLE_MUTUAL_RECURSION
71587158
eng "Unacceptable mutual recursion with anchored table '%s'"
71597159
ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED
7160-
eng "Reference to recursive WITH table '%s' in materiazed derived"
7160+
eng "Reference to recursive WITH table '%s' in materialized derived"
71617161
ER_NOT_STANDARDS_COMPLIANT_RECURSIVE
71627162
eng "Restrictions imposed on recursive definitions are violated for table '%s'"
71637163
#

sql/sql_class.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4682,10 +4682,12 @@ class select_union_recursive :public select_union
46824682
{
46834683
public:
46844684
TABLE *incr_table;
4685+
TABLE *first_rec_table_to_update;
46854686
List<TABLE> rec_tables;
46864687

46874688
select_union_recursive(THD *thd_arg):
4688-
select_union(thd_arg), incr_table(0) {};
4689+
select_union(thd_arg),
4690+
incr_table(0), first_rec_table_to_update(0) {};
46894691

46904692
int send_data(List<Item> &items);
46914693
bool create_result_table(THD *thd, List<Item> *column_types,

0 commit comments

Comments
 (0)