mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-25595 DROP part of failed CREATE OR REPLACE is not written into binary log
Do log_drop_table() in case of failed mysql_prepare_create_table().
This commit is contained in:
@ -4386,8 +4386,18 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
create_table,
|
||||
alter_info, &values,
|
||||
&extra_lock, hook_ptr)))
|
||||
{
|
||||
if (create_info->or_replace())
|
||||
{
|
||||
/* Original table was deleted. We have to log it */
|
||||
log_drop_table(thd, create_table->db, create_table->db_length,
|
||||
create_table->table_name, create_table->table_name_length,
|
||||
thd->lex->tmp_table());
|
||||
}
|
||||
|
||||
/* abort() deletes table */
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
if (create_info->tmp_table())
|
||||
{
|
||||
|
Reference in New Issue
Block a user