Log and page printers for XtraBackup
Blueprint
Log and page printers for XtraBackup.
=======
Log printer is an utility for printing log records in human-readable format.
It's possible to specify following options for this tool:
logdir - Log file directory.
startlsn - Parse start LSN.
The parse will start at the first record starting at
or past this LSN. Specifying this value is only safe if you are
certain that a log record actually starts at the given LSN. If the
value falls in the middle of record, the utility will attempt to skip
the incomplete record data before starting the parse but there is no
correctness guarantee. Safe alternatives are to skip this option or a
special value of "START_LSN_LAST_CP" that will read the LSN of
last checkpoint from the log header. This is the same LSN log recovery
would start from. The default is to start parsing the log from the
beginning.
endlsn - Parse end LSN.
The parse will stop at the first record starting at
or past this LSN. If omitted, the log will be parsed to the end.
space - Space ID to filter records on.
The default is no filtering.
or past this LSN. If omitted, the log will be parsed to the end.
page - Page ID to filter records on.
The default is no filtering.
numeric - Output log item type byte values instead of mnemonics.
skipbodies - Do not print the log record body contents.
There is also entry point for log printer which could be called from GDB.
ibool
ib_log_sys_print(
ib_uint64_t start_lsn, /*!< in: parse start LSN. 0 for START_LSN_LAST_CP */
ib_uint64_t end_lsn, /*!< in: parse end LSN. IB_ULONGLONG_MAX for log to be parsed to the end */
ulint filter_space, /*!< in: Space ID to filter records on or ULINT_UNDEFINED */
ulint filter_page, /*!< in: Page ID to filter records on or ULINT_UNDEFINED */
ibool numeric, /*!< in: TRUE for output log item type byte values instead of mnemonics */
ibool print_rec_bodies /*!< in: TRUE for print log record body contents */
);
=======
Page printer is an utility for printing pages of InnoDB database file.
It's possible to specify following options for this tool:
datadir - InnoDB data directory.
file - Tablespace file path.
page - Page number to print.
print-contents - Print page contents. The default is to print header only.
There is also two entry points for page printer which could be called from GDB.
Print page with specified ID which is stored in file
ib_err_t
ib_page_print_file(
const char* ibd_file_name, /*!< in: file path */
ulint page_no, /*!< in: page number */
ibool print_contents); /*!< in: TRUE if print page contents */
Print page which is stored in memory
ib_err_t
ib_page_print_mem(
const page_t* page, /*!< in: page */
ulint zip_size, /*!< in: zip size, 0 for uncompressed page */
ibool print_contents); /*!< in: TRUE if print page contents */
=======
The purpose of this work is to provide log printer and page printer as a patch
for InnoDB Plugin 5.1 and make them a part of XtraBackup source tree. Entry
points which described above should be linked to XtraBackup binary and be
callable from GDB.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- High
- Drafter:
- Sergei Glushchenko
- Direction:
- Approved
- Assignee:
- Sergei Glushchenko
- Definition:
- New
- Series goal:
- None
- Implementation:
- Deferred
- Milestone target:
- None
- Started by
- Completed by
Whiteboard
Please be more explicit in tool binary names and how the options are specified in the command line (or that indeed these are the command line options). The "START_LSN_LAST_CP" option does not need the "start" part, so maybe LAST_CP_LSN.