mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
Potential fix for Bug#25645:
"Move innobase_release_stat_resources(trx) outside the 'if' in ha_innobase::external_lock(). That would add more safety that whatever MySQL does at a query end, there would be no risk of a hang on the btr search latch." Also call innobase_release_temporary_latches() in the beginning of ha_innobase::close(). Approved by: Heikki
This commit is contained in:
parent
0a0087ed76
commit
e2f51ed8e6
1 changed files with 8 additions and 6 deletions
|
@ -2570,6 +2570,8 @@ ha_innobase::close(void)
|
|||
{
|
||||
DBUG_ENTER("ha_innobase::close");
|
||||
|
||||
innobase_release_temporary_latches(ht, current_thd);
|
||||
|
||||
row_prebuilt_free(prebuilt);
|
||||
|
||||
my_free((gptr) upd_buff, MYF(0));
|
||||
|
@ -6409,6 +6411,12 @@ ha_innobase::external_lock(
|
|||
trx->n_mysql_tables_in_use--;
|
||||
prebuilt->mysql_has_locked = FALSE;
|
||||
|
||||
/* Release a possible FIFO ticket and search latch. Since we
|
||||
may reserve the kernel mutex, we have to release the search
|
||||
system latch first to obey the latching order. */
|
||||
|
||||
innobase_release_stat_resources(trx);
|
||||
|
||||
/* If the MySQL lock count drops to zero we know that the current SQL
|
||||
statement has ended */
|
||||
|
||||
|
@ -6417,12 +6425,6 @@ ha_innobase::external_lock(
|
|||
trx->mysql_n_tables_locked = 0;
|
||||
prebuilt->used_in_HANDLER = FALSE;
|
||||
|
||||
/* Release a possible FIFO ticket and search latch. Since we
|
||||
may reserve the kernel mutex, we have to release the search
|
||||
system latch first to obey the latching order. */
|
||||
|
||||
innobase_release_stat_resources(trx);
|
||||
|
||||
if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) {
|
||||
if (trx->active_trans != 0) {
|
||||
innobase_commit(ht, thd, TRUE);
|
||||
|
|
Loading…
Reference in a new issue