diff options
-rw-r--r-- | storage/maria/ma_loghandler.c | 3 | ||||
-rw-r--r-- | storage/maria/ma_loghandler_lsn.h | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index 1dc4e9171e3..1e9afc7571d 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -4679,8 +4679,6 @@ translog_read_record_header_from_buffer(byte *page, buff log record header buffer NOTE - - lsn can point to TRANSLOG_HEADER_BUFFER::lsn and it will be processed - correctly. - Some type of record can be read completely by this call - "Decoded" header stored in TRANSLOG_HEADER_BUFFER::header (relative LSN can be translated to absolute one), some fields can be added @@ -4786,6 +4784,7 @@ translog_read_record_header_scan(TRANSLOG_SCANNER_DATA its NOTES. - in case of end of the log buff->lsn will be set to (CONTROL_FILE_IMPOSSIBLE_LSN) + RETURN 0 error TRANSLOG_RECORD_HEADER_MAX_SIZE + 1 End of the log diff --git a/storage/maria/ma_loghandler_lsn.h b/storage/maria/ma_loghandler_lsn.h index 9625f109864..1789d3ce61b 100644 --- a/storage/maria/ma_loghandler_lsn.h +++ b/storage/maria/ma_loghandler_lsn.h @@ -1,7 +1,12 @@ #ifndef _ma_loghandler_lsn_h #define _ma_loghandler_lsn_h -/* Transaction log record address (file_no is int24 on the disk) */ +/* + Transaction log record address: + file_no << 32 | offset + file_no is only 3 bytes so we can use signed integer to make + comparison more simple. +*/ typedef int64 TRANSLOG_ADDRESS; /* |