mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-14632 Assertion `!((new_col->prtype ^ col->prtype) & ~256U)' failed in row_log_table_apply_convert_mrec
SQL: add exclusive lock to ADD/DROP SYSTEM VERSIONING clauses This is needed because Online DDL is not working yet for such queries.
This commit is contained in:
parent
bc4a86699d
commit
a83fcbaa3b
1 changed files with 12 additions and 0 deletions
|
@ -7098,6 +7098,18 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
|
|||
if (!need_check() && !share->versioned)
|
||||
return false;
|
||||
|
||||
if (with_system_versioning || without_system_versioning)
|
||||
{
|
||||
// Disable Online DDL which is not implemented yet for ADD/DROP SYSTEM VERSIONING.
|
||||
if (thd->mdl_context.upgrade_shared_lock(table->mdl_ticket, MDL_EXCLUSIVE,
|
||||
thd->variables.lock_wait_timeout))
|
||||
{
|
||||
my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0));
|
||||
return true;
|
||||
}
|
||||
alter_info->requested_lock= Alter_info::ALTER_TABLE_LOCK_EXCLUSIVE;
|
||||
}
|
||||
|
||||
if (with_system_versioning && table->versioned())
|
||||
{
|
||||
my_error(ER_VERS_ALREADY_VERSIONED, MYF(0), table_name);
|
||||
|
|
Loading…
Reference in a new issue