1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-17720 slave_ddl_exec_mode=IDEMPOTENT does not handle DROP DATABASE

Relevant if exists flag are added for create database and drop database.
This commit is contained in:
Sachin
2018-12-19 16:33:00 +05:30
parent 7e606a2d5c
commit f16d4d4c6e
3 changed files with 39 additions and 0 deletions

View File

@ -3884,6 +3884,9 @@ end_with_restore_list:
my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
break;
}
if (slave_ddl_exec_mode_options == SLAVE_EXEC_MODE_IDEMPOTENT &&
!(lex->create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS))
create_info.options|= HA_LEX_CREATE_IF_NOT_EXISTS;
}
#endif
if (check_access(thd, CREATE_ACL, lex->name.str, NULL, NULL, 1, 0))
@ -3915,6 +3918,9 @@ end_with_restore_list:
my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
break;
}
if (!thd->slave_expected_error &&
slave_ddl_exec_mode_options == SLAVE_EXEC_MODE_IDEMPOTENT)
lex->check_exists= 1;
}
#endif
if (check_access(thd, DROP_ACL, lex->name.str, NULL, NULL, 1, 0))