diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-06-22 11:40:40 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-06-22 11:40:40 +0200 |
commit | 9fe317ffd6e3545e7896389641b74c2977a5e4b4 (patch) | |
tree | 3de62fd1aa8fec81afc26656d4b0adbcb4e5f776 /client | |
parent | c562c7447814f727893a5243efad9c2d00324f6f (diff) | |
download | mariadb-git-9fe317ffd6e3545e7896389641b74c2977a5e4b4.tar.gz |
MDEV-225: Replace with dummy events an event that is not understood by a slave to which it should be sent
Add function to replace arbitrary event with dummy event.
Add code which uses this to fix the bug that enabling row_annotate events
on the master breaks slaves which do not request such events.
Add that slaves set a variable @mariadb_slave_capability to inform the
master in a robust way about which events it can, and cannot, handle.
Add tests.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index d10504425f5..f604b8bc84f 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1807,6 +1807,19 @@ static Exit_status check_master_version() "Master returned '%s'", mysql_error(mysql)); goto err; } + + /* + Announce our capabilities to the server, so it will send us all the events + that we know about. + */ + if (mysql_query(mysql, "SET @mariadb_slave_capability=" + STRINGIFY_ARG(MARIA_SLAVE_CAPABILITY_MINE))) + { + error("Could not inform master about capability. Master returned '%s'", + mysql_error(mysql)); + goto err; + } + delete glob_description_event; switch (version) { case 3: |