1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

MDEV-40760: Remove Format_description_log_event::event_type_permutation

The only use of this member was removed back in 2013 (!), but some (now
dead) code remains that accesses the member. This patch removes the member
and the related dead code properly.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2026-08-26 12:54:50 +02:00
parent 723ea87e2e
commit 8d176901ee
3 changed files with 2 additions and 40 deletions

View File

@@ -1095,25 +1095,6 @@ Log_event* Log_event::read_log_event(const uchar *buf, uint event_len,
}
{
/*
In some previuos versions (see comment in
Format_description_log_event::Format_description_log_event(char*,...)),
event types were assigned different id numbers than in the
present version. In order to replicate from such versions to the
present version, we must map those event type id's to our event
type id's. The mapping is done with the event_type_permutation
array, which was set up when the Format_description_log_event
was read.
*/
if (fdle->event_type_permutation)
{
int new_event_type= fdle->event_type_permutation[event_type];
DBUG_PRINT("info", ("converting event type %d to %d (%s)",
event_type, new_event_type,
get_type_str((Log_event_type)new_event_type)));
event_type= new_event_type;
}
if (alg != BINLOG_CHECKSUM_ALG_UNDEF &&
(event_type == FORMAT_DESCRIPTION_EVENT ||
alg != BINLOG_CHECKSUM_ALG_OFF))
@@ -2141,7 +2122,7 @@ uint8 Format_description_log_event::byte_data_for_post_header_len[256]= {
Format_description_log_event::
Format_description_log_event(uint8 binlog_ver, const char* server_ver)
:Start_log_event_v3(), event_type_permutation(0)
:Start_log_event_v3()
{
binlog_version= binlog_ver;
switch (binlog_ver) {
@@ -2203,8 +2184,7 @@ Format_description_log_event(uint8 binlog_ver, const char* server_ver)
Format_description_log_event::
Format_description_log_event(const uchar *buf, uint event_len)
:Start_log_event_v3(buf, event_len),
event_type_permutation(0)
:Start_log_event_v3(buf, event_len)
{
DBUG_ENTER("Format_description_log_event::Format_description_log_event(char*,...)");
if (unlikely(

View File

@@ -2900,7 +2900,6 @@ public:
}
};
master_version_split server_version_split;
const uint8 *event_type_permutation;
uint32 options_written_to_bin_log;
Format_description_log_event(uint8 binlog_ver, const char* server_ver=0);

View File

@@ -36,23 +36,6 @@ static int check_event_type(int type, Relay_log_info *rli)
{
Format_description_log_event *fd_event=
rli->relay_log.description_event_for_exec;
/*
Convert event type id of certain old versions (see comment in
Format_description_log_event::Format_description_log_event(char*,...)).
*/
if (fd_event && fd_event->event_type_permutation)
{
#ifdef DBUG_TRACE
int new_type= fd_event->event_type_permutation[type];
DBUG_PRINT("info",
("converting event type %d to %d (%s)",
type, new_type,
Log_event::get_type_str((Log_event_type)new_type)));
#endif
type= fd_event->event_type_permutation[type];
}
switch (type)
{
case START_EVENT_V3: