Skip to content

Commit f516b96

Browse files
author
Galina Shalygina
committed
Main patch for mdev-9864
1 parent 5703d26 commit f516b96

14 files changed

+856
-73
lines changed

sql/share/errmsg-utf8.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7154,6 +7154,10 @@ ER_WRONG_ORDER_IN_WITH_CLAUSE
71547154
eng "The definition of the table '%s' refers to the table '%s' defined later in a non-recursive WITH clause"
71557155
ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
71567156
eng "Recursive queries in WITH clause are not supported yet"
7157+
ER_RECURSIVE_WITHOUT_ANCHORS
7158+
eng "No anchors for recursive WITH element '%s'"
7159+
ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED
7160+
eng "Reference to recursive WITH table '%s' in materiazed derived"
71577161

71587162
#
71597163
# Internal errors, not used

sql/sql_class.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4196,6 +4196,7 @@ class select_result :public select_result_sink
41964196
/* Something used only by the parser: */
41974197
public:
41984198
select_result(THD *thd_arg): select_result_sink(thd_arg) {}
4199+
void set_unit(SELECT_LEX_UNIT *unit_arg) { unit= unit_arg; }
41994200
virtual ~select_result() {};
42004201
/**
42014202
Change wrapped select_result.
@@ -4637,6 +4638,7 @@ class TMP_TABLE_PARAM :public Sql_alloc
46374638
}
46384639
};
46394640

4641+
46404642
class select_union :public select_result_interceptor
46414643
{
46424644
public:
@@ -4674,6 +4676,25 @@ class select_union :public select_result_interceptor
46744676
};
46754677

46764678

4679+
class select_union_recursive :public select_union
4680+
{
4681+
public:
4682+
TABLE *incr_table;
4683+
List<TABLE> rec_tables;
4684+
4685+
select_union_recursive(THD *thd_arg):
4686+
select_union(thd_arg), incr_table(0) {};
4687+
4688+
int send_data(List<Item> &items);
4689+
bool create_result_table(THD *thd, List<Item> *column_types,
4690+
bool is_distinct, ulonglong options,
4691+
const char *alias,
4692+
bool bit_fields_as_long,
4693+
bool create_table,
4694+
bool keep_row_order= FALSE);
4695+
void cleanup();
4696+
};
4697+
46774698
/**
46784699
UNION result that is passed directly to the receiving select_result
46794700
without filling a temporary table.

0 commit comments

Comments
 (0)