[MDEV-28970] Some tests that show binlog events will fail if run after a test with binlogging on Created: 2022-06-28 Updated: 2022-11-09 Resolved: 2022-11-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Tests |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 |
| Fix Version/s: | 10.11.2, 10.3.38, 10.4.28, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Angelique Sklavounos (Inactive) | Assignee: | Angelique Sklavounos (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Some tests that call --source include/show_binlog_events.inc will fail if run after a test with binary logging. For example:
Tests with this problem include: |
| Comments |
| Comment by Elena Stepanova [ 2022-07-26 ] | ||||||||||||
|
Note that there are likely to be many MTR test cases, specifically among those which enable binary log, which reliably fail upon the 2nd repeat after the first success. It happens because they rely on specific contents of binary logs, but don't ensure that the log is clean at the start of the test; and MTR itself, in turn, doesn't do it in its post-test check. It would be very good to do a sweep to fix such tests, because the problem isn't as innocent as a failure on repeat. In reality it will happen whenever MTR sorts the test cases in such a way that the guilty test case is run after another one before the server restart. It's pure luck that it isn't happening with this one. For example, if you do something like
You will surely get the failure too. In most cases it can be fixed by just adding RESET MASTER at the beginning of the test. | ||||||||||||
| Comment by Angelique Sklavounos (Inactive) [ 2022-08-25 ] | ||||||||||||
|
Thanks for the tips, Elena!
I will do this, so for now the Affects and Fix versions are for binlog.binlog_empty_xa_prepared only. | ||||||||||||
| Comment by Angelique Sklavounos (Inactive) [ 2022-10-27 ] | ||||||||||||
|
Testing shows a RESET MASTER at the start of the culprit tests solves the issue, as suggested by Elena. I considered a RESET MASTER at the end of the test (binlog.binlog_table_map_optional_metadata_binary has one), but for binlog.binlog_empty_xa_prepared, a RESET MASTER at the end of the test does not completely eliminate the Result mismatch:
|