Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-21216 InnoDB does dirty read of TRX_SYS page before recovery
InnoDB startup was discovering undo tablespaces in a dirty way. It was reading a possibly stale copy of the TRX_SYS page before processing any redo log records. srv_start(): Do not call buf_pool_invalidate(). Invoke trx_rseg_get_n_undo_tablespaces() after the recovery has been initiated. recv_recovery_from_checkpoint_start(): Assert that the buffer pool is empty. This used to be guaranteed by the buf_pool_invalidate() call. trx_rseg_get_n_undo_tablespaces(): Move to the calling compilation unit, and reimplement in a simpler way. srv_undo_tablespace_create(): Remove the constant parameter size=SRV_UNDO_TABLESPACE_SIZE_IN_PAGES. srv_undo_tablespace_open(): Reimplement in a cleaner way, with more robust error handling. srv_all_undo_tablespaces_open(): Split from srv_undo_tablespaces_init(). srv_undo_tablespaces_init(): Read all "undo001","undo002" tablespace files directly, without consulting the TRX_SYS page via calling trx_rseg_get_n_undo_tablespaces(). This is joint work with Thirunarayanan Balathandayuthapani.
- Loading branch information
Showing
8 changed files
with
291 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| # Create 2 UNDO TABLESPACE(UNDO003, UNDO004) | ||
| # Create 2 UNDO TABLESPACE(UNDO001(space_id =3), UNDO002(space_id =4)) | ||
| CREATE TABLE t1(a varchar(60)) ENGINE INNODB; | ||
| start transaction; | ||
| INSERT INTO t1 VALUES(1); | ||
| # xtrabackup backup | ||
| # Display undo log files from target directory | ||
| undo003 | ||
| undo004 | ||
| undo001 | ||
| undo002 | ||
| # xtrabackup prepare | ||
| # Display undo log files from targer directory | ||
| undo003 | ||
| undo004 | ||
| undo001 | ||
| undo002 | ||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.