Commit 5afcf2e8 authored by marko's avatar marko

branches/zip: trx_commit_for_mysql(): Call trx_start_if_not_started() earlier.

Return DB_SUCCESS.  Do not release and reacquire kernel_mutex.
parent 5288876e
......@@ -193,7 +193,7 @@ Does the transaction commit for MySQL. */
ulint
trx_commit_for_mysql(
/*=================*/
/* out: 0 or error number */
/* out: DB_SUCCESS or error number */
trx_t* trx); /* in: trx handle */
/**************************************************************************
Does the transaction prepare for MySQL. */
......
......@@ -1552,7 +1552,7 @@ Does the transaction commit for MySQL. */
ulint
trx_commit_for_mysql(
/*=================*/
/* out: 0 or error number */
/* out: DB_SUCCESS or error number */
trx_t* trx) /* in: trx handle */
{
/* Because we do not do the commit by sending an Innobase
......@@ -1561,6 +1561,8 @@ trx_commit_for_mysql(
ut_a(trx);
trx_start_if_not_started(trx);
if (trx->sync_cb) {
ulint err;
......@@ -1587,19 +1589,13 @@ trx_commit_for_mysql(
trx->sess = trx_dummy_sess;
}
mutex_exit(&kernel_mutex);
trx_start_if_not_started(trx);
mutex_enter(&kernel_mutex);
trx_commit_off_kernel(trx);
mutex_exit(&kernel_mutex);
trx->op_info = "";
return(0);
return(DB_SUCCESS);
}
/**************************************************************************
......
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