1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-11065: Compressed binary log. Fix BINLOG statement.

BINLOG statement output by mysqlbinlog actually has the base64 of the
non-compressed event. So remove my previous incorrect review change,
which allowed compressed event types for BINLOG statement.

Also add a couple test cases for this, running mysqlbinlog | mysql.
This commit is contained in:
Kristian Nielsen
2016-11-03 13:37:15 +01:00
parent 3c0ff6153f
commit 56a041cde6
5 changed files with 122 additions and 10 deletions

View File

@ -177,6 +177,31 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
DROP TABLE t1,t2;
Test mysqlbinlog | mysql type point-in-time recovery with compressed events.
FLUSH BINARY LOGS;
CREATE TABLE t3 (a INT PRIMARY KEY, b INT, c VARCHAR(100));
INSERT INTO t3 VALUES (0, 10, "hello");
BEGIN;
INSERT INTO t3 VALUES (1, 10, "cat"), (2, 10, "mouse"), (3, 10, "dog");
INSERT INTO t3 VALUES (4, 10, "goodbye");
COMMIT;
DELETE FROM t3 WHERE a=2;
SELECT * FROM t3 ORDER BY a;
a b c
0 10 hello
1 10 cat
3 10 dog
4 10 goodbye
FLUSH LOGS;
DROP TABLE t3;
SELECT * FROM t3 ORDER BY a;
a b c
0 10 hello
1 10 cat
3 10 dog
4 10 goodbye
DROP TABLE t1,t2,t3;
SET GLOBAL log_bin_compress=off;
SET GLOBAL log_bin_compress_min_len=256;