summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index f516219c01a..a07121b9a58 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1293,6 +1293,8 @@ public:
bool no_wrap_view_item;
/* exclude this select from check of unique_table() */
bool exclude_from_table_unique_test;
+ /* the select is "service-select" and can not have tables*/
+ bool is_service_select;
/* index in the select list of the expression currently being fixed */
int cur_pos_in_select_list;
@@ -3701,8 +3703,9 @@ public:
if (unlikely(!select_stack_top))
{
current_select= &builtin_select;
- DBUG_PRINT("info", ("Top Select is empty -> sel builtin: %p",
- current_select));
+ DBUG_PRINT("info", ("Top Select is empty -> sel builtin: %p service: %u",
+ current_select, builtin_select.is_service_select));
+ builtin_select.is_service_select= false;
}
else
current_select= select_stack[select_stack_top - 1];
@@ -4528,7 +4531,7 @@ public:
wild= 0;
exchange= 0;
}
- bool main_select_push();
+ bool main_select_push(bool service= false);
bool insert_select_hack(SELECT_LEX *sel);
SELECT_LEX *create_priority_nest(SELECT_LEX *first_in_nest);
@@ -4678,6 +4681,14 @@ public:
void mark_first_table_as_inserting();
+ bool fields_are_impossible()
+ {
+ // no select or it is last select with no tables (service select)
+ return !select_stack_head() ||
+ (select_stack_top == 1 &&
+ select_stack[0]->is_service_select);
+ }
+
bool add_table_foreign_key(const LEX_CSTRING *name,
const LEX_CSTRING *constraint_name,
Table_ident *table_name,