diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-12-30 15:50:20 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-12-30 18:30:29 +0100 |
commit | 67240858b2bfa0afc436d88fc9da0595e1391b60 (patch) | |
tree | 27dc23ebefa72cb2fd7aaa02722da3ba424bbf9e /sql/sql_db.cc | |
parent | cf9070a8f7dec309878e464b277db7dbb3556cf0 (diff) | |
parent | aeefd26ecb1089678e343c64998749e9f2e3a1e4 (diff) | |
download | mariadb-git-67240858b2bfa0afc436d88fc9da0595e1391b60.tar.gz |
Merge branch '10.1' into 10.2mariadb-10.2.21
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index e3f0506e65a..e94303f7e62 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -771,8 +771,7 @@ exit: } -int mysql_create_db(THD *thd, char *db, - const DDL_options_st &options, +int mysql_create_db(THD *thd, char *db, DDL_options_st options, const Schema_specification_st *create_info) { /* @@ -780,6 +779,9 @@ int mysql_create_db(THD *thd, char *db, to it, we need to use a copy to make execution prepared statement- safe. */ Schema_specification_st tmp(*create_info); + if (thd->slave_thread && + slave_ddl_exec_mode_options == SLAVE_EXEC_MODE_IDEMPOTENT) + options.add(DDL_options::OPT_IF_NOT_EXISTS); return mysql_create_db_internal(thd, db, options, &tmp, false); } @@ -1063,6 +1065,9 @@ exit: bool mysql_rm_db(THD *thd,char *db, bool if_exists) { + if (thd->slave_thread && + slave_ddl_exec_mode_options == SLAVE_EXEC_MODE_IDEMPOTENT) + if_exists= true; return mysql_rm_db_internal(thd, db, if_exists, false); } |