Commit 2ee33520 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 1e770439
......@@ -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
......
......@@ -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);
......
......@@ -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;
}
......
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