1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-17 12:02:09 +03:00

Merge branch bb-10.2-release into bb-10.3-release

This commit is contained in:
Nikita Malyavin
2021-05-04 14:49:31 +03:00
88 changed files with 1696 additions and 469 deletions

View File

@ -5818,11 +5818,18 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
/*
Ensure that we have an exclusive lock on target table if we are creating
non-temporary table.
If we're creating non-temporary table, then either
- there is an exclusive lock on the table
or
- there was CREATE IF EXIST, and the table was not created
(it existed), and was previously locked
*/
DBUG_ASSERT((create_info->tmp_table()) ||
thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db.str,
table->table_name.str,
MDL_EXCLUSIVE));
MDL_EXCLUSIVE) ||
(thd->locked_tables_mode && pos_in_locked_tables &&
create_info->if_not_exists()));
}
DEBUG_SYNC(thd, "create_table_like_before_binlog");
@ -7788,6 +7795,8 @@ static bool mysql_inplace_alter_table(THD *thd,
goto rollback;
}
DEBUG_SYNC(thd, "alter_table_inplace_after_commit");
thd->drop_temporary_table(altered_table, NULL, false);
}