Commit a9458f49 authored by marko's avatar marko

branches/zip: log_reserve_and_write_fast(): Remove the redundant

output parameter "success".
Success is also indicated by a nonzero return value.
parent 59135ef3
...@@ -118,10 +118,9 @@ UNIV_INLINE ...@@ -118,10 +118,9 @@ UNIV_INLINE
ib_uint64_t ib_uint64_t
log_reserve_and_write_fast( log_reserve_and_write_fast(
/*=======================*/ /*=======================*/
byte* str, /*!< in: string */ const void* str, /*!< in: string */
ulint len, /*!< in: string length */ ulint len, /*!< in: string length */
ib_uint64_t* start_lsn,/*!< out: start lsn of the log record */ ib_uint64_t* start_lsn);/*!< out: start lsn of the log record */
ibool* success);/*!< out: TRUE if success */
/***********************************************************************//** /***********************************************************************//**
Releases the log mutex. */ Releases the log mutex. */
UNIV_INLINE UNIV_INLINE
......
...@@ -305,17 +305,14 @@ UNIV_INLINE ...@@ -305,17 +305,14 @@ UNIV_INLINE
ib_uint64_t ib_uint64_t
log_reserve_and_write_fast( log_reserve_and_write_fast(
/*=======================*/ /*=======================*/
byte* str, /*!< in: string */ const void* str, /*!< in: string */
ulint len, /*!< in: string length */ ulint len, /*!< in: string length */
ib_uint64_t* start_lsn,/*!< out: start lsn of the log record */ ib_uint64_t* start_lsn)/*!< out: start lsn of the log record */
ibool* success)/*!< out: TRUE if success */
{ {
log_t* log = log_sys; log_t* log = log_sys;
ulint data_len; ulint data_len;
ib_uint64_t lsn; ib_uint64_t lsn;
*success = TRUE;
mutex_enter(&(log->mutex)); mutex_enter(&(log->mutex));
data_len = len + log->buf_free % OS_FILE_LOG_BLOCK_SIZE; data_len = len + log->buf_free % OS_FILE_LOG_BLOCK_SIZE;
...@@ -325,8 +322,6 @@ log_reserve_and_write_fast( ...@@ -325,8 +322,6 @@ log_reserve_and_write_fast(
/* The string does not fit within the current log block /* The string does not fit within the current log block
or the log block would become full */ or the log block would become full */
*success = FALSE;
mutex_exit(&(log->mutex)); mutex_exit(&(log->mutex));
return(0); return(0);
......
...@@ -115,7 +115,6 @@ mtr_log_reserve_and_write( ...@@ -115,7 +115,6 @@ mtr_log_reserve_and_write(
dyn_array_t* mlog; dyn_array_t* mlog;
dyn_block_t* block; dyn_block_t* block;
ulint data_size; ulint data_size;
ibool success;
byte* first_data; byte* first_data;
ut_ad(mtr); ut_ad(mtr);
...@@ -134,8 +133,8 @@ mtr_log_reserve_and_write( ...@@ -134,8 +133,8 @@ mtr_log_reserve_and_write(
if (mlog->heap == NULL) { if (mlog->heap == NULL) {
mtr->end_lsn = log_reserve_and_write_fast( mtr->end_lsn = log_reserve_and_write_fast(
first_data, dyn_block_get_used(mlog), first_data, dyn_block_get_used(mlog),
&(mtr->start_lsn), &success); &mtr->start_lsn);
if (success) { if (mtr->end_lsn) {
return; return;
} }
......
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