diff options
author | Nuno Carvalho <nuno.carvalho@oracle.com> | 2012-11-20 12:37:23 +0000 |
---|---|---|
committer | Nuno Carvalho <nuno.carvalho@oracle.com> | 2012-11-20 12:37:23 +0000 |
commit | fb313032a65a044e18eba0dbcd4a653112500c8c (patch) | |
tree | d1ecf48b3c9b6cdff5f784b7d154a1833295ea97 /client | |
parent | fe1bb698622e707b2443758711cba48f81a28d4d (diff) | |
download | mariadb-git-fb313032a65a044e18eba0dbcd4a653112500c8c.tar.gz |
BUG#15891524: RLI_FAKE MODE IS NOT UNSET AFTER BINLOG REPLAY
When a binlog is replayed into a server, e.g.:
$ mysqlbinlog binlog.000001 | mysql
it sets a pseudo slave mode on the client connection in order to server
be able to read binlog events, there is, a format description event is
needed to correctly read following events.
Also this pseudo slave mode applies to the current connection
replication rules that are needed to correctly apply binlog events.
If a binlog dump is sourced on a connection, this pseudo slave mode will
remains after it, what will apply unexpected rules from customer
perspective to following commands.
Added a new SET statement to binlog dump that will unset pseudo slave
mode at the end of dump file.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index a58aa65207d..461e704a1f8 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -2118,6 +2118,8 @@ int main(int argc, char** argv) else load_processor.init_by_cur_dir(); + fprintf(result_file, "/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;\n"); + fprintf(result_file, "/*!40019 SET @@session.max_insert_delayed_threads=0*/;\n"); @@ -2168,6 +2170,8 @@ int main(int argc, char** argv) "/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n" "/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n"); + fprintf(result_file, "/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;\n"); + if (tmpdir.list) free_tmpdir(&tmpdir); if (result_file != stdout) |