diff options
Diffstat (limited to 'storage/innobase/include/log0log.ic')
-rw-r--r-- | storage/innobase/include/log0log.ic | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.ic index ca7531783a2..898a8f3b6e3 100644 --- a/storage/innobase/include/log0log.ic +++ b/storage/innobase/include/log0log.ic @@ -61,7 +61,7 @@ log_block_set_flush_bit( } mach_write_to_4(log_block + LOG_BLOCK_HDR_NO, field); -} +} /**************************************************************** Gets a log block number stored in the header. */ @@ -73,7 +73,7 @@ log_block_get_hdr_no( header */ byte* log_block) /* in: log block */ { - return(~LOG_BLOCK_FLUSH_BIT_MASK + return(~LOG_BLOCK_FLUSH_BIT_MASK & mach_read_from_4(log_block + LOG_BLOCK_HDR_NO)); } @@ -90,7 +90,7 @@ log_block_set_hdr_no( { ut_ad(n > 0); ut_ad(n < LOG_BLOCK_FLUSH_BIT_MASK); - + mach_write_to_4(log_block + LOG_BLOCK_HDR_NO, n); } @@ -183,7 +183,7 @@ log_block_convert_lsn_to_no( no = ut_dulint_get_low(lsn) / OS_FILE_LOG_BLOCK_SIZE; no += (ut_dulint_get_high(lsn) % OS_FILE_LOG_BLOCK_SIZE) * 2 * (0x80000000UL / OS_FILE_LOG_BLOCK_SIZE); - + no = no & 0x3FFFFFFFUL; return(no + 1); @@ -201,10 +201,10 @@ log_block_calc_checksum( ulint sum; ulint sh; ulint i; - + sum = 1; sh = 0; - + for (i = 0; i < OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE; i++) { sum = sum & 0x7FFFFFFFUL; sum += (((ulint)(*(block + i))) << sh) + (ulint)(*(block + i)); @@ -260,7 +260,7 @@ log_block_init( #endif /* UNIV_SYNC_DEBUG */ no = log_block_convert_lsn_to_no(lsn); - + log_block_set_hdr_no(log_block, no); log_block_set_data_len(log_block, LOG_BLOCK_HDR_SIZE); @@ -284,14 +284,14 @@ log_block_init_in_old_format( #endif /* UNIV_SYNC_DEBUG */ no = log_block_convert_lsn_to_no(lsn); - + log_block_set_hdr_no(log_block, no); mach_write_to_4(log_block + OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_CHECKSUM, no); log_block_set_data_len(log_block, LOG_BLOCK_HDR_SIZE); log_block_set_first_rec_group(log_block, 0); } - + /**************************************************************** Writes to the log the string given. The log must be released with log_release. */ @@ -318,29 +318,29 @@ log_reserve_and_write_fast( if (data_len >= OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE) { - /* The string does not fit within the current log block - or the log block would become full */ + /* The string does not fit within the current log block + or the log block would become full */ - *success = FALSE; + *success = FALSE; mutex_exit(&(log->mutex)); - return(ut_dulint_zero); + return(ut_dulint_zero); } *start_lsn = log->lsn; - + ut_memcpy(log->buf + log->buf_free, str, len); log_block_set_data_len(ut_align_down(log->buf + log->buf_free, - OS_FILE_LOG_BLOCK_SIZE), + OS_FILE_LOG_BLOCK_SIZE), data_len); #ifdef UNIV_LOG_DEBUG log->old_buf_free = log->buf_free; log->old_lsn = log->lsn; #endif log->buf_free += len; - + ut_ad(log->buf_free <= log->buf_size); lsn = ut_dulint_add(log->lsn, len); |