Permalink
Browse files

BUG#21121164 - IB_TABLE_TRUNCATE() DOESN'T RELEASE TRX AND CAUSE HANG…

…UP OF

SHUTDOWNING MYSQLD

We should call ib_trx_release() in both case.

Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
Approved over IM

(cherry picked from commit db9cbe5a557506a922b6ed5754b5501186abfeed)

Conflicts:
	storage/innobase/api/api0api.cc
  • Loading branch information...
Bin Su
Bin Su committed May 21, 2015
1 parent a2353c5 commit aeef8dc2c7af8be4f8ac91be6963e5252e8a9d3f
Showing with 4 additions and 5 deletions.
  1. +4 −5 storage/innobase/api/api0api.cc
@@ -3739,16 +3739,15 @@ ib_table_truncate(
}
if (trunc_err == DB_SUCCESS) {
ut_a(ib_trx_state(ib_trx) == static_cast<ib_trx_state_t>(
TRX_STATE_NOT_STARTED));
err = ib_trx_release(ib_trx);
ut_a(err == DB_SUCCESS);
ut_a(!trx_is_started(static_cast<trx_t*>(ib_trx)));
} else {
err = ib_trx_rollback(ib_trx);
ut_a(err == DB_SUCCESS);
}
err = ib_trx_release(ib_trx);
ut_a(err == DB_SUCCESS);
/* Set the memcached_sync_count back. */
if (table != NULL && memcached_sync != 0) {
dict_mutex_enter_for_mysql();

0 comments on commit aeef8dc

Please sign in to comment.