maria-docs team mailing list archive
Mailing list archive
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> Here it is at last:
Sergey> On Fri, Apr 02, 2010 at 04:44:22PM -0400, Daniel Bartholomew
Daniel> I'm preparing documentation on mysqlbinlog for the MariaDB
Daniel> 5.2. reference manual.
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> The net result is as follows: mysqlbinlog got a new option,
Sergey> which is very similar to replication slave option
Sergey> Everything that is said about replicate-rewrite-db here:
Sergey> applies to --rewrite-db.
Sergey> To rephrase it: for both options the following holds:
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> - Row-based events are rewritten correctly.
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> See also http://askmonty.org/wiki/Scratch/ReplicationOption for
Sergey> a 'map' of various relevant options.
Sergey> Please ask more questions if the above is unclear.
Thanks for the information!
I've used it to update the mysqlbinlog page on the wiki:
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.
Monty Program - http://askmonty.org