maria-docs team mailing list archive
-
maria-docs team
-
Mailing list archive
-
Message #00003
Re: new mysqlbinlog option in MariaDB 5.2
On Fri, 7 May 2010 14:56:24 +0400
Sergey Petrunya <psergey@xxxxxxxxxxxx> wrote:
Sergey> Hi Daniel,
Sergey>
Sergey> Here it is at last:
Sergey>
Sergey> On Fri, Apr 02, 2010 at 04:44:22PM -0400, Daniel Bartholomew
Sergey> wrote:
Daniel> I'm preparing documentation on mysqlbinlog for the MariaDB
Daniel> 5.2. reference manual.
Daniel>
Daniel> From looking at the 'mysqlbinlog --help' output and comparing
Daniel> it to the output of the version in 5.1.44 it looks like the
Daniel> only command-line option that was added was
Daniel> '--rewrite-db=name' (unless I'm missing something). Were any
Daniel> other options added to mysqlbinlog?
Sergey> None that I know of.
Daniel> From the worklog
Daniel> ( http://askmonty.org/worklog/Server-Sprint/?tid=36 ), it
Daniel> looks like you were the MP developer who worked on it. Let me
Daniel> know if I should ask someone else.
Sergey> Yes, it was me from MP side.
Sergey>
Sergey> The net result is as follows: mysqlbinlog got a new option,
Sergey>
Sergey> --rewrite-db='db_from->db_to'
Sergey>
Sergey> which is very similar to replication slave option
Sergey>
Sergey> --replicate-rewrite-db=”from->to”
Sergey>
Sergey> Everything that is said about replicate-rewrite-db here:
Sergey> http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#option_mysqld_replicate-rewrite-db
Sergey> applies to --rewrite-db.
Sergey> To rephrase it: for both options the following holds:
Sergey>
Sergey> - for events that are binlogged as statements, rewriting the
Sergey> database constitutes changing statement's default database from
Sergey> db1 to db2. There is no statement analysis or rewrite of any
Sergey> kind, that is, if one specifies "db1.tbl" in the statement
Sergey> explicitly, that occurence won't be changed to "db2.tbl".
Sergey>
Sergey> - Row-based events are rewritten correctly.
Sergey>
Sergey> For both slave and mysqlbinlog, filtering applies after the
Sergey> database rewrites have been performed. By filtering, I mean
Sergey> - --replicate-[do|ignore]-xxx options for slave
Sergey> - --database option for mysqlbinlog.
Sergey>
Sergey> See also http://askmonty.org/wiki/Scratch/ReplicationOption for
Sergey> a 'map' of various relevant options.
Sergey>
Sergey> Please ask more questions if the above is unclear.
Sergey>
Thanks for the information!
I've used it to update the mysqlbinlog page on the wiki:
http://askmonty.org/wiki/Manual:Mysqlbinlog
The part dealing with --rewrite-db is at the bottom of the page (it's
the last row in the big mysqlbinlog options table).
Let me know if there are any errors or if you think something more
should be added.
Thanks again!
--
Daniel Bartholomew
Monty Program - http://askmonty.org