mirror of
https://github.com/MariaDB/server.git
synced 2025-08-16 18:19:41 +00:00
11.5 Fix Merge Conflict Between MDEV-7850 and MDEV-33672
MDEV-33672 (10.6) added checks/tests for malformed events which end before the flags describe (which would lead to reading of un-owned memory). MDEV-7850 (11.5) extended all GTID events with a thread id at the end of the event. This GTID event extension invalidates the tests added in MDEV-33672 because the thread id is appended after the event (and thereby the event isn't cut short). This patch fixes these MDEV-33672 tests by not writing the GTID thread id when writing the Gtid events just for these tests. This preserves tests for backwards compatibility, rather than getting rid of the tests altogether.
This commit is contained in:

committed by
Oleksandr Byelkin

parent
dd7d9d7fb1
commit
aee03ea56b
@ -2970,6 +2970,19 @@ Gtid_log_event::write(Log_event_writer *writer)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
/*
|
||||
The following debug_dbug flags which simulate invalid events are only
|
||||
valid for pre-FL_EXTRA_THREAD_ID events (i.e. before 11.5). So do not write
|
||||
the thread id attribute when simulating these invalid events.
|
||||
*/
|
||||
if (DBUG_IF("negate_xid_from_gtid") ||
|
||||
DBUG_IF("negate_xid_data_from_gtid") ||
|
||||
DBUG_IF("inject_fl_extra_multi_engine_into_gtid") ||
|
||||
DBUG_IF("negate_alter_fl_from_gtid"))
|
||||
flags_extra&= ~FL_EXTRA_THREAD_ID;
|
||||
#endif
|
||||
|
||||
DBUG_EXECUTE_IF("inject_fl_extra_multi_engine_into_gtid", {
|
||||
flags_extra|= FL_EXTRA_MULTI_ENGINE_E1;
|
||||
});
|
||||
|
Reference in New Issue
Block a user