mirror of
https://github.com/MariaDB/server.git
synced 2025-11-16 20:23:18 +03:00
ha_innobase.cc:
Backport from 4.0 of the btr0sea.c latch hang fix sql/ha_innobase.cc: Backport from 4.0 of the btr0sea.c latch hang fix
This commit is contained in:
@@ -718,23 +718,21 @@ innobase_commit(
|
|||||||
|
|
||||||
trx = check_trx_exists(thd);
|
trx = check_trx_exists(thd);
|
||||||
|
|
||||||
|
/* Release possible statement level resources */
|
||||||
|
innobase_release_stat_resources(trx);
|
||||||
|
|
||||||
if (trx->auto_inc_lock) {
|
if (trx->auto_inc_lock) {
|
||||||
|
|
||||||
/* If we had reserved the auto-inc lock for
|
/* If we had reserved the auto-inc lock for
|
||||||
some table in this SQL statement, we release it now */
|
some table in this SQL statement, we release it now */
|
||||||
|
|
||||||
srv_conc_enter_innodb(trx);
|
|
||||||
row_unlock_table_autoinc_for_mysql(trx);
|
row_unlock_table_autoinc_for_mysql(trx);
|
||||||
srv_conc_exit_innodb(trx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trx_handle != (void*)&innodb_dummy_stmt_trx_handle) {
|
if (trx_handle != (void*)&innodb_dummy_stmt_trx_handle) {
|
||||||
innobase_commit_low(trx);
|
innobase_commit_low(trx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Release possible statement level resources */
|
|
||||||
innobase_release_stat_resources(trx);
|
|
||||||
|
|
||||||
trx_mark_sql_stat_end(trx);
|
trx_mark_sql_stat_end(trx);
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
@@ -797,29 +795,23 @@ innobase_rollback(
|
|||||||
|
|
||||||
trx = check_trx_exists(thd);
|
trx = check_trx_exists(thd);
|
||||||
|
|
||||||
|
/* Release possible statement level resources */
|
||||||
|
innobase_release_stat_resources(trx);
|
||||||
|
|
||||||
if (trx->auto_inc_lock) {
|
if (trx->auto_inc_lock) {
|
||||||
|
|
||||||
/* If we had reserved the auto-inc lock for
|
/* If we had reserved the auto-inc lock for
|
||||||
some table in this SQL statement, we release it now */
|
some table in this SQL statement, we release it now */
|
||||||
|
|
||||||
srv_conc_enter_innodb(trx);
|
|
||||||
row_unlock_table_autoinc_for_mysql(trx);
|
row_unlock_table_autoinc_for_mysql(trx);
|
||||||
srv_conc_exit_innodb(trx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
srv_conc_enter_innodb(trx);
|
|
||||||
|
|
||||||
if (trx_handle != (void*)&innodb_dummy_stmt_trx_handle) {
|
if (trx_handle != (void*)&innodb_dummy_stmt_trx_handle) {
|
||||||
error = trx_rollback_for_mysql(trx);
|
error = trx_rollback_for_mysql(trx);
|
||||||
} else {
|
} else {
|
||||||
error = trx_rollback_last_sql_stat_for_mysql(trx);
|
error = trx_rollback_last_sql_stat_for_mysql(trx);
|
||||||
}
|
}
|
||||||
|
|
||||||
srv_conc_exit_innodb(trx);
|
|
||||||
|
|
||||||
/* Release possible statement level resources */
|
|
||||||
innobase_release_stat_resources(trx);
|
|
||||||
|
|
||||||
trx_mark_sql_stat_end(trx);
|
trx_mark_sql_stat_end(trx);
|
||||||
|
|
||||||
DBUG_RETURN(convert_error_code_to_mysql(error, NULL));
|
DBUG_RETURN(convert_error_code_to_mysql(error, NULL));
|
||||||
|
|||||||
Reference in New Issue
Block a user