Bug #78058 | recv_parse_log_rec violates its contract re. incomplete recs for MLOG_CHECKPOINT | ||
---|---|---|---|
Submitted: | 13 Aug 2015 16:21 | Modified: | 17 Aug 2015 14:17 |
Reporter: | Laurynas Biveinis (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | code quality, log, mlog_checkpoint, mtr, recovery |
[13 Aug 2015 16:21]
Laurynas Biveinis
[14 Aug 2015 14:31]
MySQL Verification Team
Hi, Thank you for your bug report. Can you confirm something for me. This is actually not a report about a bug, but a request that function recv_parse_log_rec() always returns the results of the same meaning for all record types , so that records of the type MLOG_CHECKPOINT do not return always SIZE_OF_MLOG_CHECKPOINT, but the real length. Is this what you are requesting ??? If you confirm your request than we will have to check whether a design of this function is intended to be inconsistent or not.
[14 Aug 2015 14:36]
Laurynas Biveinis
Yes, that is my request (except that instead "do not return always SIZE_OF_MLOG_CHECKPOINT, but the real length" it should say "return SIZE_OF_MLOG_CHECKPOINT only if there are at least that many bytes in the buffer available, zero otherwise", because MLOG_CHECKPOINT is a fixed-size record). In the case this inconsistency is by design, the bug should become about an incorrect function header comment (which should then describe exceptional MLOG_CHECKPOINT handling explicitly).
[17 Aug 2015 6:00]
Marko Mäkelä
Hi Laurynas, thanks for the report! I am glad that someone is reading my code. :) You are right, it looks like I forgot to adjust this piece of code when I changed the size of the MLOG_CHECKPOINT record so that it would include the LSN of the checkpoint that it is referring to.
[17 Aug 2015 14:17]
Daniel Price
Posted by developer: Fixed as of the upcoming 5.7.9, 5.8.0 releases, and here's the changelog entry: The recv_parse_log_rec function returned the length of the redo log record instead of 0 when encountering an incomplete MLOG_CHECKPOINT record. Thank you for the bug report.