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.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index b5b39feca91..710c17a51d8 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2019, Oracle and/or its affiliates.
- Copyright (c) 2010, 2019, MariaDB Corporation
+ Copyright (c) 2010, 2021, MariaDB Corporation
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -4011,6 +4011,23 @@ public:
return false;
}
+ bool create_like() const
+ {
+ DBUG_ASSERT(!create_info.like() || !select_lex.item_list.elements);
+ return create_info.like();
+ }
+
+ bool create_select() const
+ {
+ DBUG_ASSERT(!create_info.like() || !select_lex.item_list.elements);
+ return select_lex.item_list.elements;
+ }
+
+ bool create_simple() const
+ {
+ return !create_like() && !create_select();
+ }
+
SELECT_LEX *exclude_last_select();
bool add_unit_in_brackets(SELECT_LEX *nselect);
void check_automatic_up(enum sub_select_type type);