mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-22618 Assertion !dict_index_is_online_ddl ... in lock_table_locks_lookup
lock_table_locks_lookup(): Relax the assertion. Locks must not exist while online secondary index creation is in progress. However, if CREATE UNIQUE INDEX has not been committed yet, but the index creation has been completed, concurrent DML transactions may acquire record locks on the index. Furthermore, such concurrent DML may cause duplicate key violation, causing the DDL operation to be rolled back. After that, the online_status may be ONLINE_INDEX_ABORTED or ONLINE_INDEX_ABORTED_DROPPED. So, the debug assertion may only forbid the state ONLINE_INDEX_CREATION.
This commit is contained in:
parent
141cf43e61
commit
c93f8aca65
1 changed files with 2 additions and 1 deletions
|
@ -6636,7 +6636,8 @@ lock_table_locks_lookup(
|
|||
ut_a(lock->trx == trx);
|
||||
|
||||
if (lock_get_type_low(lock) == LOCK_REC) {
|
||||
ut_ad(!dict_index_is_online_ddl(lock->index)
|
||||
ut_ad(lock->index->online_status
|
||||
!= ONLINE_INDEX_CREATION
|
||||
|| dict_index_is_clust(lock->index));
|
||||
if (lock->index->table == table) {
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue