Commit 63ac87c1 authored by Sergei Golubchik's avatar Sergei Golubchik

make main.mysqlbinlog_row_compressed independent from the environment

don't depend on the thread ids, table ids, and current binlog content
parent 06a884a5
set pseudo_thread_id=5;
reset master;
SET GLOBAL log_bin_compress=on;
SET GLOBAL log_bin_compress_min_len=10;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1));
......@@ -61,7 +63,7 @@ START TRANSACTION
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 917 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 917
#<date> server id 1 end_log_pos 985 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
#<date> server id 1 end_log_pos 985 CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
......@@ -90,7 +92,7 @@ START TRANSACTION
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1232 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1232
#<date> server id 1 end_log_pos 1299 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
#<date> server id 1 end_log_pos 1299 CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
......@@ -119,7 +121,7 @@ START TRANSACTION
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1548 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1548
#<date> server id 1 end_log_pos 1614 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
#<date> server id 1 end_log_pos 1614 CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
......@@ -148,7 +150,7 @@ START TRANSACTION
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1860 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1860
#<date> server id 1 end_log_pos 1927 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
#<date> server id 1 end_log_pos 1927 CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
......@@ -177,7 +179,7 @@ START TRANSACTION
#Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2152 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2152
#<date> server id 1 end_log_pos 2243 CRC32 XXX Write_compressed_rows: table id 33 flags: STMT_END_F
#<date> server id 1 end_log_pos 2243 CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
......@@ -239,7 +241,7 @@ START TRANSACTION
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2480 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2480
#<date> server id 1 end_log_pos 2579 CRC32 XXX Update_compressed_rows: table id 33 flags: STMT_END_F
#<date> server id 1 end_log_pos 2579 CRC32 XXX Update_compressed_rows: table id <tblid> flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
......@@ -320,7 +322,7 @@ START TRANSACTION
#Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2787 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2787
#<date> server id 1 end_log_pos 2879 CRC32 XXX Delete_compressed_rows: table id 32 flags: STMT_END_F
#<date> server id 1 end_log_pos 2879 CRC32 XXX Delete_compressed_rows: table id <tblid> flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
......@@ -382,7 +384,7 @@ START TRANSACTION
#Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3087 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3087
#<date> server id 1 end_log_pos 3172 CRC32 XXX Delete_compressed_rows: table id 33 flags: STMT_END_F
#<date> server id 1 end_log_pos 3172 CRC32 XXX Delete_compressed_rows: table id <tblid> flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
......
......@@ -11,6 +11,8 @@
# mysqlbinlog: compressed row event
#
#
set pseudo_thread_id=5;
reset master;
SET GLOBAL log_bin_compress=on;
SET GLOBAL log_bin_compress_min_len=10;
......@@ -30,7 +32,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/ /xid=\d*/xid=<xid>/
--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/ /xid=\d*/xid=<xid>/ /table id \d+/table id <tblid>/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
--echo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment