summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-07-02 00:08:29 +0300
committerunknown <heikki@hundin.mysql.fi>2003-07-02 00:08:29 +0300
commit00bd7de97a6f8a2f18b3d321e192f7f3ec4e777d (patch)
tree48241711e5f9c343427dc0f0f339184f452bbd69 /sql
parent1726ae86be52bc129b5788406d60808b15b8bd9f (diff)
downloadmariadb-git-00bd7de97a6f8a2f18b3d321e192f7f3ec4e777d.tar.gz
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
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innobase.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index d1db50dfa89..bafd41ff566 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -718,22 +718,20 @@ innobase_commit(
trx = check_trx_exists(thd);
+ /* Release possible statement level resources */
+ innobase_release_stat_resources(trx);
+
if (trx->auto_inc_lock) {
/* If we had reserved the auto-inc lock for
some table in this SQL statement, we release it now */
- srv_conc_enter_innodb(trx);
row_unlock_table_autoinc_for_mysql(trx);
- srv_conc_exit_innodb(trx);
}
if (trx_handle != (void*)&innodb_dummy_stmt_trx_handle) {
innobase_commit_low(trx);
}
-
- /* Release possible statement level resources */
- innobase_release_stat_resources(trx);
trx_mark_sql_stat_end(trx);
@@ -797,29 +795,23 @@ innobase_rollback(
trx = check_trx_exists(thd);
+ /* Release possible statement level resources */
+ innobase_release_stat_resources(trx);
+
if (trx->auto_inc_lock) {
/* If we had reserved the auto-inc lock for
some table in this SQL statement, we release it now */
- srv_conc_enter_innodb(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) {
error = trx_rollback_for_mysql(trx);
} else {
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);
DBUG_RETURN(convert_error_code_to_mysql(error, NULL));