-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
MDEV-39788: Fix master.info not upgrading master_use_gtid
#5301
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
3
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.
+127
−87
Open
Changes from all commits
Commits
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,10 @@ | ||
| CHANGE MASTER TO master_host='127.0.0.1'; | ||
| # restart: --skip-slave-start | ||
| Master_Log_File = 'mysqld-bin.000002' | ||
| Read_Master_Log_Pos = '2147483648' | ||
| Master_SSL_Key = '' | ||
| Using_Gtid = 'Current_Pos' | ||
| Relay_Master_Log_File = 'mysqld-bin.000001' | ||
| Exec_Master_Log_Pos = '2147483648' | ||
| SQL_Delay = '5' | ||
| 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Verify that the post-WL#344 format of `*.info` can be parsed. | ||
| # * Verify that the line count includes the line-count line in | ||
| # `@@master_info_file` while excludes it in `@@relay_log_info_file` | ||
| # (Reference: MDEV-39788 master.info is read and | ||
| # written one line too many compared to before) | ||
| # * Verify that position values > 2^31 can be read | ||
| # (MDEV-38020: Master & relay log info files read 2^31 and above incorrectly) | ||
|
|
||
| --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` | ||
|
|
||
| # the new version of relay_log.info comes in two versions: with path | ||
| # separator '/' (most systems) and with path separator '\' (windows) | ||
| if ($SYSTEM_PATH_SEPARATOR != /) { | ||
| --let $file_suffix= -win | ||
| } | ||
|
|
||
|
|
||
| --source include/shutdown_mysqld.inc | ||
|
|
||
| --remove_file $MYSQLD_DATADIR/master.info | ||
| # `Using_Gtid` is the key-value section, not the 33rd option. | ||
| --copy_file $MYSQL_TEST_DIR/std_data/new-format-master.info $MYSQLD_DATADIR/master.info | ||
|
|
||
| # Check that the 5th option (`SQL_Delay`) is included. | ||
| --remove_file $MYSQLD_DATADIR/relay-log.info | ||
| --copy_file $MYSQL_TEST_DIR/std_data/new-format-relay-log$file_suffix.info $MYSQLD_DATADIR/relay-log.info | ||
|
|
||
| --let $restart_parameters= --skip-slave-start | ||
| --source include/start_mysqld.inc | ||
|
|
||
| --let $status_items= Master_Log_File, Read_Master_Log_Pos, Master_SSL_Key, Using_Gtid, Relay_Master_Log_File, Exec_Master_Log_Pos, SQL_Delay | ||
| --source include/show_slave_status.inc | ||
|
|
||
|
|
||
| # Reset | ||
| --disable_warnings | ||
| RESET SLAVE ALL; | ||
| --enable_warnings |
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,34 @@ | ||
| 33 | ||
| mysqld-bin.000002 | ||
| 2147483648 | ||
| 127.0.0.1 | ||
| root | ||
|
|
||
| 3306 | ||
| 60 | ||
| 1 | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| 1 | ||
| 60.000 | ||
|
|
||
| 0 | ||
|
|
||
| 100000 | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| using_gtid=1 |
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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| 5 | ||
| .\slave-relay-bin.000001 | ||
| .\mysqld-relay-bin.000001 | ||
| 4 | ||
|
|
||
| 0 | ||
| 0 | ||
| mysqld-bin.000001 | ||
| 2147483648 | ||
| 5 |
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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| 5 | ||
| ./slave-relay-bin.000001 | ||
| ./mysqld-relay-bin.000001 | ||
| 4 | ||
|
|
||
| 0 | ||
| 0 | ||
| mysqld-bin.000001 | ||
| 2147483648 | ||
| 5 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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.
Naming the unnamed struct
Line_count_fix_timproves code readability and avoids potential compiler-specific issues with unnamed classes overriding virtual functions or being used in template-based pointer-to-member wrappers. Additionally, there is a minor typo in the comment: 'use common code' should be 'use of common code'.