summaryrefslogtreecommitdiff
path: root/sql/sql_alter.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2019-12-30 13:56:19 +0200
committerMonty <monty@mariadb.org>2020-03-24 21:00:02 +0200
commit6a9e24d0465fb0e67ba7bbc333263437e7227d8c (patch)
tree02bdd98c5cd807e55c185a6827558ddd6c9993b4 /sql/sql_alter.cc
parente5de1e26e723525aaab1cebc5c958c748eb36d9e (diff)
downloadmariadb-git-6a9e24d0465fb0e67ba7bbc333263437e7227d8c.tar.gz
Added support for replication for S3
MDEV-19964 S3 replication support Added new configure options: s3_slave_ignore_updates "If the slave has shares same S3 storage as the master" s3_replicate_alter_as_create_select "When converting S3 table to local table, log all rows in binary log" This allows on to configure slaves to have the S3 storage shared or independent from the master. Other thing: Added new session variable '@@sql_if_exists' to force IF_EXIST to DDL's.
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r--sql/sql_alter.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc
index 131f74c2753..9ac0ac7a551 100644
--- a/sql/sql_alter.cc
+++ b/sql/sql_alter.cc
@@ -376,6 +376,9 @@ bool Sql_cmd_alter_table::execute(THD *thd)
/* first table of first SELECT_LEX */
TABLE_LIST *first_table= (TABLE_LIST*) select_lex->table_list.first;
+ if (thd->variables.option_bits & OPTION_IF_EXISTS)
+ lex->create_info.set(DDL_options_st::OPT_IF_EXISTS);
+
const bool used_engine= lex->create_info.used_fields & HA_CREATE_USED_ENGINE;
DBUG_ASSERT((m_storage_engine_name.str != NULL) == used_engine);
if (used_engine)