diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-07-31 00:47:20 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-07-31 00:47:20 +0300 |
commit | 39ee64cd7e7504b7958953b554c8eccf87c7e754 (patch) | |
tree | c292c07f8ce5669e3036ef6b705c347df3e64c0c /innobase/log/log0log.c | |
parent | da35a07477a643beea0c1335fbf4fcf72ea9e333 (diff) | |
download | mariadb-git-39ee64cd7e7504b7958953b554c8eccf87c7e754.tar.gz |
Many files:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
sql/ha_innobase.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
sql/ha_innobase.cc:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/buf/buf0buf.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/dict/dict0dict.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/fil/fil0fil.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/fsp/fsp0fsp.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/ha/ha0ha.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/dict0dict.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/dict0mem.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/dyn0dyn.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/fsp0fsp.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/log0log.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/log0recv.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/trx0sys.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/trx0trx.h:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/include/log0log.ic:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/lock/lock0lock.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/log/log0log.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/log/log0recv.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/mem/mem0dbg.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/row/row0mysql.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/srv/srv0srv.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/srv/srv0start.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/trx/trx0sys.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
innobase/trx/trx0trx.c:
Merge InnoDB-3.23.52c; improve AUTO-INC algorithm with SHOW TABLE STATUS; new checksum in log
Diffstat (limited to 'innobase/log/log0log.c')
-rw-r--r-- | innobase/log/log0log.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/innobase/log/log0log.c b/innobase/log/log0log.c index 9d79c19a586..644d53ac273 100644 --- a/innobase/log/log0log.c +++ b/innobase/log/log0log.c @@ -270,7 +270,7 @@ part_loop: log->lsn = ut_dulint_add(log->lsn, len); - /* Initialize the next block header and trailer */ + /* Initialize the next block header */ log_block_init(log_block + OS_FILE_LOG_BLOCK_SIZE, log->lsn); } else { log->lsn = ut_dulint_add(log->lsn, len); @@ -1070,28 +1070,16 @@ log_group_file_header_flush( } /********************************************************** -Stores a 1-byte checksum to the trailer checksum field of a log block +Stores a 4-byte checksum to the trailer checksum field of a log block before writing it to a log file. This checksum is used in recovery to -check the consistency of a log block. The checksum is simply the 8 low -bits of 1 + the sum of the bytes in the log block except the trailer bytes. */ +check the consistency of a log block. */ static void log_block_store_checksum( /*=====================*/ byte* block) /* in/out: pointer to a log block */ { - ulint i; - ulint sum; - - sum = 1; - - for (i = 0; i < OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE; i++) { - sum += (ulint)(*(block + i)); - } - - mach_write_to_1(block + OS_FILE_LOG_BLOCK_SIZE - - LOG_BLOCK_TRL_CHECKSUM, - 0xFF & sum); + log_block_set_checksum(block, log_block_calc_checksum(block)); } /********************************************************** |