summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2023-01-18 16:52:16 +0300
committerAleksey Midenkov <midenok@gmail.com>2023-01-26 17:15:21 +0300
commitd23566996702989a484bb0b2393afa91d39e10d4 (patch)
treea9d29ddfb310b9f4b31c76bce0cf799bc7b86b27
parent718fd11fcc65feecc2126c1fb1179b335ed01cb2 (diff)
downloadmariadb-git-d23566996702989a484bb0b2393afa91d39e10d4.tar.gz
MDEV-29767 Cleanup: removed create_like_options()
That filter only adds problems not making any useful feature.
-rw-r--r--sql/sql_table.cc2
-rw-r--r--sql/structs.h7
2 files changed, 3 insertions, 6 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index cf8ec9260c5..db00b66f575 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -5745,7 +5745,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
Set OR REPLACE and IF NOT EXISTS option as in the CREATE TABLE LIKE
statement.
*/
- local_create_info.init(create_info->create_like_options());
+ local_create_info.init(create_info->get_options());
local_create_info.db_type= src_table->table->s->db_type();
local_create_info.row_type= src_table->table->s->row_type;
local_create_info.alter_info= &local_alter_info;
diff --git a/sql/structs.h b/sql/structs.h
index 5185210b403..a32e25e31c7 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -546,12 +546,9 @@ private:
Options m_options;
public:
- Options create_like_options() const
+ Options get_options() const
{
- return (DDL_options_st::Options)
- /* TODO: that filter is only adding problems, remove it */
- (((uint) m_options) & (OPT_IF_NOT_EXISTS | OPT_OR_REPLACE |
- OPT_OR_REPLACE_SLAVE_GENERATED));
+ return m_options;
}
void init() { m_options= OPT_NONE; }
void init(Options options) { m_options= options; }