1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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)
This commit is contained in:
Monty
2021-06-11 15:34:23 +03:00
parent 4ea1c48abe
commit af33202af7
12 changed files with 42 additions and 14 deletions

View File

@ -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);