Commit 92b3d4a3 authored by marko's avatar marko

ha_innobase::external_lock(): Update prebuilt->mysql_has_locked and

trx->n_mysql_tables_in_use only after row_lock_table_for_mysql()
returns DB_SUCCESS.  A timeout on LOCK TABLES would lead to an
inconsistent state, which would cause trx_free() to print a warning.

This was later reported as Bug #31444.
parent 8560a820
......@@ -6456,9 +6456,6 @@ ha_innobase::external_lock(
innobase_register_stmt(ht, thd);
}
trx->n_mysql_tables_in_use++;
prebuilt->mysql_has_locked = TRUE;
if (trx->isolation_level == TRX_ISO_SERIALIZABLE
&& prebuilt->select_lock_type == LOCK_NONE
&& thd_test_options(thd,
......@@ -6507,6 +6504,9 @@ ha_innobase::external_lock(
trx->mysql_n_tables_locked++;
}
trx->n_mysql_tables_in_use++;
prebuilt->mysql_has_locked = TRUE;
DBUG_RETURN(0);
}
......
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