-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
MDEV-39788 CHANGE MASTER savefiles read and write one line to many #5148
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
Open
ParadoxV5
wants to merge
10
commits into
12.3
Choose a base branch
from
MDEV-39788
base: 12.3
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.
+90
−6
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b6921bb
Test for MDEV-39788
ParadoxV5 7fdd381
Merge branch 'MDEV-39788.test' into MDEV-39788
ParadoxV5 cef52e2
fixup
ParadoxV5 5f01ae4
Merge branch 'MDEV-39788.test' into MDEV-39788
ParadoxV5 ea00d4c
MDEV-39788 CHANGE MASTER savefiles read and write one line to many
ParadoxV5 78ac3f8
ye smol problem with test-result pairs is that it’s easy to forget to…
ParadoxV5 7860722
Merge branch 'MDEV-39788.test' into MDEV-39788
ParadoxV5 df587c1
whoops. (RIP our CI today)
ParadoxV5 0d654f6
didn’t notice that null lists were allowed in pre-12.3
ParadoxV5 e64544e
Merge branch 'MDEV-39788.test' into MDEV-39788
ParadoxV5 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| CHANGE MASTER TO master_host='127.0.0.1'; | ||
| # restart: --skip-slave-start | ||
| Master_SSL_Key = '' | ||
| Using_Gtid = 'Current_Pos' | ||
| SQL_Delay = '0' | ||
| RESET SLAVE ALL; | ||
| Warnings: | ||
| Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos' |
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,74 @@ | ||
| # Line count / upgrading test for `@@master_info_file` & `@@relay_log_info_file` | ||
| # | ||
| # This regression test reminds that the line count includes the line count line. | ||
| # | ||
| # Reference: | ||
| # MDEV-39788 CHANGE MASTER savefiles read and write one line to many | ||
|
|
||
| --source include/have_binlog_format_mixed.inc # format-agnostic | ||
| CHANGE MASTER TO master_host='127.0.0.1'; # have_info_files | ||
|
|
||
| --let $MYSQLD_DATADIR= `SELECT @@datadir` | ||
|
|
||
|
|
||
| # `using_gtid` is the key-value section, not the 33rd option. | ||
| --remove_file $MYSQLD_DATADIR/master.info | ||
| --write_file $MYSQLD_DATADIR/master.info | ||
| 33 | ||
|
|
||
| 4 | ||
| 127.0.0.1 | ||
| root | ||
|
|
||
| 3306 | ||
| 60 | ||
| 1 | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| 1 | ||
| 60.000 | ||
|
|
||
| 0 | ||
|
|
||
| 100000 | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| using_gtid=1 | ||
| EOF | ||
|
|
||
| # This file does not have the 6th option | ||
| # (neither does the current `@@relay_log_info_file`). | ||
| --remove_file $MYSQLD_DATADIR/relay-log.info | ||
| --write_file $MYSQLD_DATADIR/relay-log.info | ||
| 6 | ||
| ./mysqld-relay-bin.000001 | ||
| 4 | ||
|
|
||
| 0 | ||
| 0 | ||
| EOF | ||
|
|
||
|
|
||
| --let $restart_parameters= --skip-slave-start | ||
| --source include/restart_mysqld.inc | ||
|
Comment on lines
+66
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| --let $status_items= Master_SSL_Key, Using_Gtid, SQL_Delay | ||
| --source include/show_slave_status.inc | ||
|
|
||
|
|
||
| # Reset | ||
| RESET SLAVE ALL; | ||
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.
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.
Modifying
master.infoandrelay-log.infowhile the server is running can cause test flakiness and failures:mysqldprocess may hold active file locks on these files, causing--remove_fileor--write_fileto fail with permission errors.restart_mysqld.inc, it first performs a shutdown. During shutdown,mysqldmay flush its active replication state and overwrite the custommaster.infoandrelay-log.infofiles you just wrote.To avoid these issues, shut down the server before modifying the files, and then start it back up.