Commit eff4a5d2 authored by Sunny Bains's avatar Sunny Bains

Fix Bug #55027: assertion: mutex_own(&dict_sys->mutex) in dict_table_get_on_id()

The callers should indicate that the dictionary is locked or not using
the trx->dict_operation_lock_mode == RW_X_LATCH mode. Checking explicitly
for system tables is unnecessary.

Approved by Marko on IRC.
parent 73c92b14
...@@ -616,8 +616,7 @@ dict_table_get_on_id( ...@@ -616,8 +616,7 @@ dict_table_get_on_id(
{ {
dict_table_t* table; dict_table_t* table;
if (ut_dulint_cmp(table_id, DICT_FIELDS_ID) <= 0 if (trx->dict_operation_lock_mode == RW_X_LATCH) {
|| trx->dict_operation_lock_mode == RW_X_LATCH) {
/* Note: An X latch implies that the transaction /* Note: An X latch implies that the transaction
already owns the dictionary mutex. */ already owns the dictionary mutex. */
......
...@@ -568,8 +568,7 @@ dict_table_get_on_id( ...@@ -568,8 +568,7 @@ dict_table_get_on_id(
{ {
dict_table_t* table; dict_table_t* table;
if (ut_dulint_cmp(table_id, DICT_FIELDS_ID) <= 0 if (trx->dict_operation_lock_mode == RW_X_LATCH) {
|| trx->dict_operation_lock_mode == RW_X_LATCH) {
/* Note: An X latch implies that the transaction /* Note: An X latch implies that the transaction
already owns the dictionary mutex. */ already owns the dictionary mutex. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment