diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-04 18:44:44 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-04 18:44:44 +0300 |
commit | 5ff7e68c7eaf2a2daacb0c1ea07b21c8a7bd2639 (patch) | |
tree | f0dac9f004764d37c81ef781707163bf105c0bc1 /sql/sql_lex.h | |
parent | 938db04898ee9029421f5251751239255dd81c15 (diff) | |
parent | 7f8cd326c68ce15961a84abbc844dfe72aa05a93 (diff) | |
download | mariadb-git-5ff7e68c7eaf2a2daacb0c1ea07b21c8a7bd2639.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 17 |
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, |