Commit 81334fe6 authored by marko's avatar marko

branches/zip: trx_prepare_off_kernel(): Eliminate the local variable

must_flush_log, and remove warning about lsn being possibly uninitialized.
parent 1b8f466c
...@@ -1813,8 +1813,7 @@ trx_prepare_off_kernel( ...@@ -1813,8 +1813,7 @@ trx_prepare_off_kernel(
{ {
page_t* update_hdr_page; page_t* update_hdr_page;
trx_rseg_t* rseg; trx_rseg_t* rseg;
ibool must_flush_log = FALSE; ib_uint64_t lsn = 0;
ib_uint64_t lsn;
mtr_t mtr; mtr_t mtr;
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
...@@ -1829,8 +1828,6 @@ trx_prepare_off_kernel( ...@@ -1829,8 +1828,6 @@ trx_prepare_off_kernel(
mtr_start(&mtr); mtr_start(&mtr);
must_flush_log = TRUE;
/* Change the undo log segment states from TRX_UNDO_ACTIVE /* Change the undo log segment states from TRX_UNDO_ACTIVE
to TRX_UNDO_PREPARED: these modifications to the file data to TRX_UNDO_PREPARED: these modifications to the file data
structure define the transaction as prepared in the structure define the transaction as prepared in the
...@@ -1873,7 +1870,7 @@ trx_prepare_off_kernel( ...@@ -1873,7 +1870,7 @@ trx_prepare_off_kernel(
trx->conc_state = TRX_PREPARED; trx->conc_state = TRX_PREPARED;
/*--------------------------------------*/ /*--------------------------------------*/
if (must_flush_log) { if (lsn) {
/* Depending on the my.cnf options, we may now write the log /* Depending on the my.cnf options, we may now write the log
buffer to the log files, making the prepared state of the buffer to the log files, making the prepared state of the
transaction durable if the OS does not crash. We may also transaction durable if the OS does not crash. We may also
......
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