Created by Lixun Peng (P.Linux) and last modified
Get this branch:
bzr branch lp:~maria-captains/maria/10.0-flashback
Members of Maria-captains can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information


Recent revisions

3510. By Lixun Peng (P.Linux)


How to use this feature?
I added several new arguments for mysqlbinlog: (binlog_format must be ROW)
--flashback (-B), it will let mysqlbinlog to work on FLASHBACK mode.
--table (-T), it likes -d, but this argument is for tables.
--review, it will let mysqlbinlog print the SQL for reviewing. Reviewing feature will create a new "review" table to record the data that will be modified by
FLASHBACK feature. If you aren't special the --review-dbname/tablename, "review" table will created on current DB, and the table name will be "__"+original_table_name. And for getting the original table struct, mysqlbinlog need to connect mysql, so --user/--host/--password is necessary if needed.
--review-dbname, the DB that you want to store the review table.
--review-tablename, the TABLE that you want to store the original data before modified. Only if you set -T, this argument is useful.

For example:
I have a table "t" in database "test", we can compare the output with --flashback and without.
#client/mysqlbinlog /data/mysqldata_10.0/binlog/mysql-bin.000001 -vv -d test -T t --start-datetime="2013-03-27 14:54:00" > /tmp/1.sql
#client/mysqlbinlog /data/mysqldata_10.0/binlog/mysql-bin.000001 -vv -uroot -d test -T t --start-datetime="2013-03-27 14:54:00" -B --review > /tmp/2.sql

Then, importing the flashback output can flashback database/table to the special time.

How to implement Flashback:
1. mysqlbinlog tool can parse the binlog files and print them, so we can use the most of code in mysqlbinlog.
2. Changing the event type (INSERT -> DELETE; DELETE -> INSERT).
3. Exchanging the SET/WHERE part in UPDATE event (UPDATE table SET x=1 WHERE y=2 -> UPDATE table SET y=2 WHERE x=1).
4. Invert the events in binlog files, from end to beginning (binlog: e1,e2,e3... -> flashback_log: en...e3,e2,e1).

3509. By Igor Babaev

Merge 5.5->10.0-base

3508. By Sergei Golubchik

5.5 merge

3507. By Vladislav Vaintroub

MDEV-4245 : Fix maintainer compilation flags.

-Wno-invalid-offsetoff is a C++ warnng, not C.

Patch by Pavel Ivanov.

3506. By Michael Widenius

Automatic merge

3505. By Kristian Nielsen

MDEV-4322: Race in binlog checkpointing during server shutdown.

During server shutdown, we need to wait for binlog checkpointing to
finish in the binlog background thread before closing the binlog.

This was not done, so we could get assert and failure to finish the
final binlog checkpoint if shutdown happened in the middle.

3504. By Michael Widenius

Patch by Hartmut Holzgraefe

STRAIGHT_JOIN couldn't be combined with NATURAL or USING(),
INNER JOIN not with NATURAL (MDEV-4271, MySQL Bug #35268)

Separate rules existed for "natural" (non-outer) joins and
for STRAIGHT_JOIN, with the only difference code wise being
that with STRAIGHT_JOIN the "straight" property of the right
side table was set before calling the appropriate add_...()

The "natural_join" parser rule has now been extended to also
accept STRAIGHT_JOIN, and the rule result value is set to
1 for straight joins, 0 otherwise, so acting as a "straight"
flag that can directly be assigned to the "straight" property
of the right side table.

The rule parsing NATURAL JOIN was hard coded to accept just
this keyword combination, without support for either
STRAIGHT_JOIN or the optional INNER.

The "natural_join" rule has now been split up in an inner
"inner_join" rule that matches the JOIN, INNER JOIN and
STRAIGHT_JOIN cases while "natural_join" also matches

The NATURAL rule has been changed to accept "inner_join"
instead of just JOIN, so now NATURAL STRAIGHT_JOIN and
NATURAL INNER JOIN also work as expected.

As a side effect the removal of the duplciated rules
for STRAIGHT_JOIN handling has reduced the shift/reduce
conflict count by one.

3503. By Michael Widenius

Don't show sphinx_error% as this may be a different set of variables in different SPHINX releases

3502. By Alexander Barkov

Performance improvements in "from latin1" and "to utf8" conversion.
Mini-benchmarking demonstrates up to 10% improvement in latin1->utf8

  @ strings/ctype-latin1.c
  redundant test in ctype-latin1.c removed

  @ strings/ctype-utf8.c
  my_uni_utf8 rewritten in a more efficient way

3501. By Sergey Petrunia

Fix buildbot failure:
Backport the code that runs cassandra.test only when Cassandra is
present and running from 10.0 to 10.0-base.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.