summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Elkin <andrei.elkin@mariadb.com>2020-08-13 21:37:09 +0300
committerAndrei Elkin <andrei.elkin@mariadb.com>2020-09-07 18:25:24 +0300
commit92ffab382c3f5f000662c13c102c773fad6e636e (patch)
tree62e068ea4ccc334a9dd64439f4578077f7cb92b4
parent30ff61640375ab28abdf87e786d0ce9feb1a9027 (diff)
downloadmariadb-git-92ffab382c3f5f000662c13c102c773fad6e636e.tar.gz
MDEV-23473 Query_log_event::pack_info does not check flags2_inited
A mtr failure in rpl.rpl_mariadb_slave_capability mismatch: -slave-relay-bin.000005 # Query # # BEGIN +slave-relay-bin.000005 # Query # # set foreign_key_checks=1, check_constraint_checks=1; BEGIN was fixed by {{80544a5878ac}}, and without any check for {{flags_inited}} which is a pattern in the sources. This ticket therefore merely makes sure through an assert that a relation between the two remain in {{Query_log_event::pack_info}}.
-rw-r--r--sql/log_event_server.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc
index 49e818b3b97..dd7e166059a 100644
--- a/sql/log_event_server.cc
+++ b/sql/log_event_server.cc
@@ -1033,6 +1033,9 @@ void Query_log_event::pack_info(Protocol *protocol)
append_identifier(protocol->thd, &buf, db, db_len);
buf.append(STRING_WITH_LEN("; "));
}
+
+ DBUG_ASSERT(!flags2 || flags2_inited);
+
if (flags2 & (OPTION_NO_FOREIGN_KEY_CHECKS | OPTION_AUTO_IS_NULL |
OPTION_RELAXED_UNIQUE_CHECKS |
OPTION_NO_CHECK_CONSTRAINT_CHECKS |