diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-01-03 13:09:41 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-01-03 13:09:41 +0100 |
commit | 6bb11efa4a7ba813eb4aa2548f95b7297d70f3d7 (patch) | |
tree | 3c2dfb2dfbbb0a2471bdcfb0f0c122f823cc80ab /sql/sql_db.cc | |
parent | ab4bc8442094a2be8cdb74bfcddfccede81ac03d (diff) | |
parent | 842402e4df35c230e7a416ce3ef8df3055f03d60 (diff) | |
download | mariadb-git-6bb11efa4a7ba813eb4aa2548f95b7297d70f3d7.tar.gz |
Merge branch '10.2' into 10.3
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 5f826e37a76..55c51dbe151 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -764,8 +764,7 @@ exit: } -int mysql_create_db(THD *thd, const LEX_CSTRING *db, - const DDL_options_st &options, +int mysql_create_db(THD *thd, const LEX_CSTRING *db, DDL_options_st options, const Schema_specification_st *create_info) { /* @@ -773,6 +772,9 @@ int mysql_create_db(THD *thd, const LEX_CSTRING *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); } @@ -1047,6 +1049,9 @@ exit: bool mysql_rm_db(THD *thd, const LEX_CSTRING *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); } |