MySQL Forums
Forum List  »  Data Recovery

Re: Recovery from binlog
Posted by: Adam Warnowski
Date: August 05, 2018 11:04PM

I read carefully this article, but I can't see solution.
If I run:
mysqlbinlog -d mydb -s -v --base64-output=DECODE-ROWS mysql-bin.00000*
it skips every line started with # as a comment

If I run without -s ( -short-form )
mysqlbinlog -d mydb -v --base64-output=DECODE-ROWS mysql-bin.00000*
I show you what it does for one of tables:
CREATE TABLE IF NOT EXISTS `p_utf8_conversion` (`converted` tinyint(4) NOT NULL DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci
...
### INSERT INTO `mydb`.`p_utf8_conversion`
### SET
### @1=0
...
### UPDATE `mydb`.`p_utf8_conversion`
### WHERE
### @1=0
### SET
### @1=2

Only first command is normal. I don't know why it comments with ###.
Converting those INSERTs could be simple to create sql script, but the worst thing is why mysqlbinlog prints UPDATEs with exchanged WHERE and SET.
Maybe there is a tool to convert it to normal UPDATEs.

Options: ReplyQuote


Subject
Views
Written By
Posted
938
August 05, 2018 06:50AM
485
August 05, 2018 12:49PM
Re: Recovery from binlog
633
August 05, 2018 11:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.