From 2ee335208228949edf7816a7b8456d80342c1266 Mon Sep 17 00:00:00 2001 From: marko <> Date: Thu, 3 Sep 2009 05:36:12 +0000 Subject: [PATCH] branches/zip: log_reserve_and_write_fast(): Remove the redundant output parameter "success". Success is also indicated by a nonzero return value. --- include/log0log.h | 5 ++--- include/log0log.ic | 9 ++------- mtr/mtr0mtr.c | 5 ++--- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/include/log0log.h b/include/log0log.h index 5897067798d..299b4a05b40 100644 --- a/include/log0log.h +++ b/include/log0log.h @@ -118,10 +118,9 @@ UNIV_INLINE ib_uint64_t log_reserve_and_write_fast( /*=======================*/ - byte* str, /*!< in: string */ + const void* str, /*!< in: string */ ulint len, /*!< in: string length */ - ib_uint64_t* start_lsn,/*!< out: start lsn of the log record */ - ibool* success);/*!< out: TRUE if success */ + ib_uint64_t* start_lsn);/*!< out: start lsn of the log record */ /***********************************************************************//** Releases the log mutex. */ UNIV_INLINE diff --git a/include/log0log.ic b/include/log0log.ic index d071985982a..f4a74252a2a 100644 --- a/include/log0log.ic +++ b/include/log0log.ic @@ -305,17 +305,14 @@ UNIV_INLINE ib_uint64_t log_reserve_and_write_fast( /*=======================*/ - byte* str, /*!< in: string */ + const void* str, /*!< in: string */ ulint len, /*!< in: string length */ - ib_uint64_t* start_lsn,/*!< out: start lsn of the log record */ - ibool* success)/*!< out: TRUE if success */ + ib_uint64_t* start_lsn)/*!< out: start lsn of the log record */ { log_t* log = log_sys; ulint data_len; ib_uint64_t lsn; - *success = TRUE; - mutex_enter(&(log->mutex)); data_len = len + log->buf_free % OS_FILE_LOG_BLOCK_SIZE; @@ -325,8 +322,6 @@ log_reserve_and_write_fast( /* The string does not fit within the current log block or the log block would become full */ - *success = FALSE; - mutex_exit(&(log->mutex)); return(0); diff --git a/mtr/mtr0mtr.c b/mtr/mtr0mtr.c index be31c5df801..0c4bec8c82c 100644 --- a/mtr/mtr0mtr.c +++ b/mtr/mtr0mtr.c @@ -115,7 +115,6 @@ mtr_log_reserve_and_write( dyn_array_t* mlog; dyn_block_t* block; ulint data_size; - ibool success; byte* first_data; ut_ad(mtr); @@ -134,8 +133,8 @@ mtr_log_reserve_and_write( if (mlog->heap == NULL) { mtr->end_lsn = log_reserve_and_write_fast( first_data, dyn_block_get_used(mlog), - &(mtr->start_lsn), &success); - if (success) { + &mtr->start_lsn); + if (mtr->end_lsn) { return; } -- 2.30.9