-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Merge conflict resolution for MDEV-40365 & co. → 11.4 #5465
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
2
commits into
11.4
Choose a base branch
from
MDEV-40365.11.4
base: 11.4
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.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,14 @@ | ||
| # MDEV-39485 Heap-buffer-overflow upon read in `Rows_log_event` constructor | ||
| # | ||
| # This binlog file contains a normal Format Description | ||
| # Event followed by 3 malformed v2 Write Rows Events: | ||
| # 1. A tag followed by no data | ||
| # 2. An undersized tagged data followed by an unrecognized tag | ||
| # 3. A tag followed by a length longer than the entire event | ||
|
|
||
| --source include/not_embedded.inc | ||
|
|
||
| --let SEARCH_PATTERN= [Uu]nknown [Ee]vent | ||
| --let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/invalid_row_v2_tag.sql | ||
| --exec $MYSQL_BINLOG --force-read --verbose std_data/binlog_invalid_row_v2_tag.001 > $SEARCH_FILE | ||
| --source include/search_pattern_in_file.inc |
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 @@ | ||
| FOUND 3 /[Uu]nknown [Ee]vent/ in invalid_row_v2_tag.sql |
Binary file not shown.
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 @@ | ||
| SET @saved_dbug= @@GLOBAL.debug_dbug; | ||
| SET @@GLOBAL.debug_dbug= | ||
| '+d,truncate_fde_post_header_len,truncate_fde_used_checksum_alg'; | ||
| FLUSH BINARY LOGS; | ||
| ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error | ||
| SET @@GLOBAL.debug_dbug= '+d,truncate_fde_common_header_len'; | ||
| FLUSH BINARY LOGS; | ||
| ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error | ||
| SET @@GLOBAL.debug_dbug= @saved_dbug; | ||
| RESET MASTER; |
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 @@ | ||
| CREATE TABLE t (a INT); | ||
| INSERT INTO t VALUES (0); | ||
| DROP TABLE t; | ||
| FLUSH BINARY LOGS; | ||
| #mariadb_binlog --debug=d,corrupt_table_map_colcnt_read --start-position=#binlog_start --stop-position=#binlog_stop #binlog_file 2>&1 | ||
| FOUND 1 /CRC32 0x[[:xdigit:]]{8}.*\n# [Uu]nknown [Ee]vent/ in unknown_log_event.sql | ||
| #mariadb_binlog --debug=d,simulate_checksum_test_failure --stop-position=5 #binlog_file 2>&1 | ||
| FOUND 1 /CRC32 0x[[:xdigit:]]{8}.*\n# [Uu]nknown [Ee]vent/ in unknown_log_event.sql |
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,38 @@ | ||
| --source include/have_debug.inc | ||
| --source include/have_binlog_format_mixed.inc # format-agnostic | ||
|
|
||
| # OOB read on malformed `Format_description_log_event` | ||
| # | ||
| # Verify that Format Description Events with truncated contents fails gracefully | ||
| # rather than underflow the post-header count and lead to buffer over-read. | ||
|
|
||
| SET @saved_dbug= @@GLOBAL.debug_dbug; | ||
|
|
||
|
|
||
| # MDEV-40366: `used_checksum_alg` | ||
|
|
||
| SET @@GLOBAL.debug_dbug= | ||
| '+d,truncate_fde_post_header_len,truncate_fde_used_checksum_alg'; | ||
| FLUSH BINARY LOGS; | ||
|
|
||
| --let $binlog_file= query_get_value(SHOW BINLOG STATUS, File, 1) | ||
| --disable_query_log | ||
| --error ER_ERROR_WHEN_EXECUTING_COMMAND | ||
| --eval SHOW BINLOG EVENTS IN '$binlog_file' | ||
| --enable_query_log | ||
|
|
||
|
|
||
| # MDEV-40365: `common_header_len` & `post_header_len` | ||
|
|
||
| SET @@GLOBAL.debug_dbug= '+d,truncate_fde_common_header_len'; | ||
| FLUSH BINARY LOGS; | ||
|
|
||
| --let $binlog_file= query_get_value(SHOW BINLOG STATUS, File, 1) | ||
| --disable_query_log | ||
| --error ER_ERROR_WHEN_EXECUTING_COMMAND | ||
| --eval SHOW BINLOG EVENTS IN '$binlog_file' | ||
| --enable_query_log | ||
|
|
||
| # Clean-up | ||
| SET @@GLOBAL.debug_dbug= @saved_dbug; | ||
| RESET MASTER; |
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,37 @@ | ||
| # MDEV-40674: Test `mariadb-binlog --force`'s Unknown event output | ||
| # | ||
| # Also: MDEV-40542 | ||
| # MSAN use-of-uninitialized-value on Unknown_log_event::read_checksum_alg | ||
|
|
||
| --source include/have_debug.inc | ||
| --source include/have_binlog_format_row.inc # Testing with Table Map event | ||
|
|
||
| # Setup | ||
| CREATE TABLE t (a INT); | ||
| --let $binlog_file= query_get_value(SHOW BINLOG STATUS, File, 1) | ||
| --let $binlog_start= query_get_value(SHOW BINLOG STATUS, Position, 1) | ||
|
|
||
| # Generate an invalid Table Map event followed by an otherwise-valid Rows Event | ||
| INSERT INTO t VALUES (0); | ||
|
|
||
| --let $binlog_stop= query_get_value(SHOW BINLOG STATUS, Position, 1) | ||
| DROP TABLE t; | ||
| FLUSH BINARY LOGS; | ||
|
|
||
|
|
||
| --let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/unknown_log_event.sql | ||
| --let SEARCH_PATTERN= CRC32 0x[[:xdigit:]]{8}.*\\n# [Uu]nknown [Ee]vent | ||
| --let $mariadb_binlog= $MYSQL_BINLOG --result-file=$SEARCH_FILE --verify-binlog-checksum --force-read | ||
| --let $binlog_file= `SELECT CONCAT(@@datadir, '/$binlog_file')` | ||
|
|
||
| --echo #mariadb_binlog --debug=d,corrupt_table_map_colcnt_read --start-position=#binlog_start --stop-position=#binlog_stop #binlog_file 2>&1 | ||
| --exec $mariadb_binlog --debug=d,corrupt_table_map_colcnt_read --start-position=$binlog_start --stop-position=$binlog_stop $binlog_file 2>&1 | ||
| --source include/search_pattern_in_file.inc | ||
|
|
||
| # Test checksum failure | ||
| # | ||
| # Only test the first event since the rest of the binlog is unreadable | ||
| # without a valid Format Description, which is typically the first event. | ||
| --echo #mariadb_binlog --debug=d,simulate_checksum_test_failure --stop-position=5 #binlog_file 2>&1 | ||
| --exec $mariadb_binlog --debug=d,simulate_checksum_test_failure --stop-position=5 $binlog_file 2>&1 | ||
| --source include/search_pattern_in_file.inc |
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,19 @@ | ||
| SET @saved_dbug= @@GLOBAL.debug_dbug; | ||
| SET @@GLOBAL.debug_dbug= '+d,truncate_fde_post_header_len'; | ||
| include/master-slave.inc | ||
| [connection master] | ||
| FLUSH BINARY LOGS; | ||
| CALL mtr.add_suppression('Found invalid event in binary log'); | ||
| ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error | ||
| connection slave; | ||
| START SLAVE IO_THREAD; | ||
| CALL mtr.add_suppression('Slave I/O: Relay log write failure'); | ||
| include/wait_for_slave_io_error.inc [errno=1595] | ||
| connection master; | ||
| SET @@GLOBAL.debug_dbug= @saved_dbug; | ||
| RESET MASTER; | ||
| connection slave; | ||
| CHANGE MASTER TO master_use_gtid=SLAVE_POS; | ||
| SET @@GLOBAL.gtid_slave_pos=''; | ||
| include/start_slave.inc | ||
| include/rpl_end.inc |
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,51 @@ | ||
| # MDEV-40647 OOB read in IO Thread if the FDEv does not support Rotate Events | ||
|
|
||
| --source include/have_debug.inc | ||
| --source include/have_binlog_format_mixed.inc # should be format-agnostic | ||
|
|
||
| SET @saved_dbug= @@GLOBAL.debug_dbug; | ||
| SET @@GLOBAL.debug_dbug= '+d,truncate_fde_post_header_len'; | ||
| --let $rpl_skip_start_slave= 1 | ||
| # This setup will also RESET MASTER ... | ||
| --source include/master-slave.inc | ||
| # ... which means the binlog file is consistent. | ||
| --let $binlog_file= master-bin.000001 | ||
|
|
||
| # Use a specific binlog position to avoid the | ||
| # test failing early from other metadata events | ||
| --let $binlog_start= query_get_value(SHOW BINLOG STATUS, Position, 1) | ||
| # Generate the Rotate Event | ||
| FLUSH BINARY LOGS; | ||
|
|
||
|
|
||
| # Control: SHOW BINLOG EVENTS fails as expected. | ||
| CALL mtr.add_suppression('Found invalid event in binary log'); | ||
| --disable_query_log | ||
| --error ER_ERROR_WHEN_EXECUTING_COMMAND | ||
| --eval SHOW BINLOG EVENTS IN '$binlog_file' FROM $binlog_start | ||
| --enable_query_log | ||
|
|
||
| --connection slave | ||
| --disable_query_log | ||
| eval CHANGE MASTER TO master_use_gtid=NO, | ||
| master_log_file='$binlog_file', master_log_pos=$binlog_start; | ||
| --enable_query_log | ||
| START SLAVE IO_THREAD; | ||
| CALL mtr.add_suppression('Slave I/O: Relay log write failure'); | ||
| # ER_SLAVE_RELAY_LOG_WRITE_FAILURE | ||
| --let $slave_io_errno= 1595 | ||
| # Experiment: The IO thread should fail. | ||
| --source include/wait_for_slave_io_error.inc | ||
|
|
||
| # Clean-up | ||
| --connection master | ||
| SET @@GLOBAL.debug_dbug= @saved_dbug; | ||
| RESET MASTER; | ||
|
|
||
| --connection slave | ||
| CHANGE MASTER TO master_use_gtid=SLAVE_POS; # restore the default | ||
| --disable_warnings | ||
| SET @@GLOBAL.gtid_slave_pos=''; # for good measure | ||
| --enable_warnings | ||
| --source include/start_slave.inc | ||
| --source include/rpl_end.inc |
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
@vuvova
Looks like your MDEV-30128 purge also dropped MDEV-5115 «RBR from MySQL 5.6 to MariaDB 10.0 does not work»’s ‹Read binlog with v2 row events› test.