mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-25664 Potential hang in purge for virtual columns
ha_innobase::open(): If the table is only being opened by purge for evaluating virtual column values, avoid invoking initialize_auto_increment(), because the purge thread may already be holding an shared latch on the clustered index root page. Shared latches are not recursive. The additional request would lead to a hang if another thread has started waiting for an exclusive latch.
This commit is contained in:
parent
2087d47aae
commit
9739cf1859
1 changed files with 4 additions and 2 deletions
|
@ -6488,7 +6488,9 @@ no_such_table:
|
|||
dict_table_get_format(m_prebuilt->table));
|
||||
}
|
||||
|
||||
if (m_prebuilt->table == NULL
|
||||
const my_bool for_vc_purge = THDVAR(thd, background_thread);
|
||||
|
||||
if (for_vc_purge || m_prebuilt->table == NULL
|
||||
|| dict_table_is_temporary(m_prebuilt->table)
|
||||
|| m_prebuilt->table->persistent_autoinc
|
||||
|| !m_prebuilt->table->is_readable()) {
|
||||
|
@ -6512,7 +6514,7 @@ no_such_table:
|
|||
}
|
||||
}
|
||||
|
||||
if (!THDVAR(thd, background_thread)) {
|
||||
if (!for_vc_purge) {
|
||||
info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue