-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
MDEV-39694 innodb_log_archive=ON recovery fails if no tablespaces exist #5108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
dr-m
wants to merge
5
commits into
main
Choose a base branch
from
MDEV-39694
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b360831
WIP MDEV-39694 innodb_log_archive=ON recovery fails if no tablespaces…
dr-m 19a6e22
WIP: Write FILE_ records for undo tablespaces if innodb_log_archive=ON
dr-m ac3a4ab
Fix regressions in some innodb_log_archive=OFF tests
dr-m c2bed2d
Re-enable 3 tests
dr-m 03addb3
Fix a regression in mtr_t::is_named_space
dr-m File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| doublewrite_debug : FIXME | ||
| log_archive_recovery : FIXME | ||
| log_file_size_online : FIXME | ||
| undo_upgrade_debug : FIXME | ||
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --source include/have_innodb.inc | ||
|
|
||
| let bugdir= $MYSQLTEST_VARDIR/tmp/log_archive_recovery; | ||
| --mkdir $bugdir | ||
| --let $dirs= --innodb-data-home-dir=$bugdir --innodb-log-group-home-dir=$bugdir | ||
| --let $dirs=$dirs --innodb-undo-directory=$bugdir | ||
|
|
||
| --let $restart_parameters= $dirs --innodb-log-archive --innodb-undo-tablespaces=3 --innodb-log-recovery-start=12288 | ||
| --source include/restart_mysqld.inc | ||
| CREATE TABLE t(a INT)ENGINE=InnoDB; | ||
| --source include/shutdown_mysqld.inc | ||
|
|
||
| --remove_file $bugdir/ibdata1 | ||
| --source include/start_mysqld.inc | ||
| --error ER_UNKNOWN_STORAGE_ENGINE | ||
| SELECT * FROM t; | ||
| --write_file $bugdir/ibdata1 | ||
| EOF | ||
| --source include/restart_mysqld.inc | ||
| SELECT * FROM t; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix
innodb.log_file_size_online, inlog_t::set_archive()we must adjust thefil_space_t::max_lsnbetween the special values 0 and 1 whenever the state oflog_sys.archiveis changed. The new special value 1 indicates that noFILE_MODIFYrecords must be written, which is the case withinnodb_log_archive=OFF.