summaryrefslogtreecommitdiff
path: root/sql/structs.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2021-06-11 15:34:23 +0300
committerMonty <monty@mariadb.org>2021-06-14 17:03:19 +0300
commitaf33202af753da93e48f30b83c959c5a587f2458 (patch)
treec07af0078f547d4d493a1a8ed4192c3608d91b35 /sql/structs.h
parent4ea1c48abe3087a38a6260c8e21084de5e1a105b (diff)
downloadmariadb-git-af33202af753da93e48f30b83c959c5a587f2458.tar.gz
Added DDL_options_st *thd_ddl_options(const MYSQL_THD thd)
This is used by InnoDB to detect if CREATE...SELECT is used Other things: - Changed InnoDB to use thd_ddl_options() - Removed lock checking code for create...select (Approved by Marko)
Diffstat (limited to 'sql/structs.h')
-rw-r--r--sql/structs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/structs.h b/sql/structs.h
index fa0da6e0dbb..59bab6c6f18 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -537,7 +537,8 @@ public:
OPT_OR_REPLACE= 16, // CREATE OR REPLACE TABLE
OPT_OR_REPLACE_SLAVE_GENERATED= 32,// REPLACE was added on slave, it was
// not in the original query on master.
- OPT_IF_EXISTS= 64
+ OPT_IF_EXISTS= 64,
+ OPT_CREATE_SELECT= 128 // CREATE ... SELECT
};
private:
@@ -565,6 +566,8 @@ public:
{ return m_options & OPT_OR_REPLACE_SLAVE_GENERATED; }
bool like() const { return m_options & OPT_LIKE; }
bool if_exists() const { return m_options & OPT_IF_EXISTS; }
+ bool is_create_select() const { return m_options & OPT_CREATE_SELECT; }
+
void add(const DDL_options_st::Options other)
{
m_options= (Options) ((uint) m_options | (uint) other);