Commit e1c50287 authored by vinchen's avatar vinchen Committed by Kristian Nielsen

test suite for compressed binlog event

parent d4b2c9bb
...@@ -10,19 +10,19 @@ ...@@ -10,19 +10,19 @@
# #
# Format_description_log_event length = # Format_description_log_event length =
# 19 /* event common header */ + # 19 /* event common header */ +
# 58 /* misc stuff in the Format description header */ + # 57 /* misc stuff in the Format description header */ +
# number of events + # number of events +
# 1 /* Checksum algorithm */ + # 1 /* Checksum algorithm */ +
# 4 /* CRC32 length */ # 4 /* CRC32 length */
# #
# With current number of events = 164, # With current number of events = 171,
# #
# binlog_start_pos = 4 + 19 + 57 + 163 + 1 + 4 = 249. # binlog_start_pos = 4 + 19 + 57 + 171 + 1 + 4 = 256.
# #
############################################################################## ##############################################################################
let $binlog_start_pos=249; let $binlog_start_pos=256;
--disable_query_log --disable_query_log
SET @binlog_start_pos=249; SET @binlog_start_pos=256;
--enable_query_log --enable_query_log
...@@ -4,7 +4,7 @@ if ($binlog_start) ...@@ -4,7 +4,7 @@ if ($binlog_start)
} }
if (!$binlog_start) if (!$binlog_start)
{ {
--let $_binlog_start=249 --let $_binlog_start=256
} }
if ($binlog_file) if ($binlog_file)
{ {
......
...@@ -4,6 +4,8 @@ show variables like 'log_bin%'; ...@@ -4,6 +4,8 @@ show variables like 'log_bin%';
Variable_name Value Variable_name Value
log_bin OFF log_bin OFF
log_bin_basename log_bin_basename
log_bin_compress OFF
log_bin_compress_min_len 256
log_bin_index log_bin_index
log_bin_trust_function_creators ON log_bin_trust_function_creators ON
show variables like 'relay_log%'; show variables like 'relay_log%';
...@@ -20,6 +22,8 @@ show variables like 'log_bin%'; ...@@ -20,6 +22,8 @@ show variables like 'log_bin%';
Variable_name Value Variable_name Value
log_bin OFF log_bin OFF
log_bin_basename log_bin_basename
log_bin_compress OFF
log_bin_compress_min_len 256
log_bin_index log_bin_index
log_bin_trust_function_creators ON log_bin_trust_function_creators ON
show variables like 'relay_log%'; show variables like 'relay_log%';
......
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));
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1));
INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "");
INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL);
INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A");
INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A");
INSERT INTO t2 SELECT * FROM t1;
UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL;
DELETE FROM t1;
DELETE FROM t2;
FLUSH BINARY LOGS;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#<date> server id 1 end_log_pos 256 CRC32 XXX Start: xxx
ROLLBACK/*!*/;
# at 256
#<date> server id 1 end_log_pos 285 CRC32 XXX Gtid list []
# at 285
#<date> server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001
# at 329
#<date> server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at 371
#<date> server id 1 end_log_pos 533 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=4/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=1342177280/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
# at 533
#<date> server id 1 end_log_pos 575 CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
# at 575
#<date> server id 1 end_log_pos 727 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
# at 727
#<date> server id 1 end_log_pos 769 CRC32 XXX GTID 0-1-3
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN
/*!*/;
# at 769
#<date> server id 1 end_log_pos 825 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 825
#<date> server id 1 end_log_pos 893 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* TINYINT meta=0 nullable=1 is_null=0 */
### @5=4 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @6=5 /* LONGINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 893
#<date> server id 1 end_log_pos 966 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 966
#<date> server id 1 end_log_pos 1008 CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at 1008
#<date> server id 1 end_log_pos 1064 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1064
#<date> server id 1 end_log_pos 1131 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* TINYINT meta=0 nullable=1 is_null=0 */
### @5=4 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @6=5 /* LONGINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
# at 1131
#<date> server id 1 end_log_pos 1204 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1204
#<date> server id 1 end_log_pos 1246 CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at 1246
#<date> server id 1 end_log_pos 1302 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1302
#<date> server id 1 end_log_pos 1368 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* TINYINT meta=0 nullable=1 is_null=0 */
### @5=NULL /* MEDIUMINT meta=0 nullable=1 is_null=1 */
### @6=5 /* LONGINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1368
#<date> server id 1 end_log_pos 1441 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1441
#<date> server id 1 end_log_pos 1483 CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN
/*!*/;
# at 1483
#<date> server id 1 end_log_pos 1539 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1539
#<date> server id 1 end_log_pos 1606 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* TINYINT meta=0 nullable=1 is_null=0 */
### @5=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @6=5 /* LONGINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1606
#<date> server id 1 end_log_pos 1679 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1679
#<date> server id 1 end_log_pos 1721 CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at 1721
#<date> server id 1 end_log_pos 1777 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 1777
#<date> server id 1 end_log_pos 1868 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=4 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### INSERT INTO `test`.`t2`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=4 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
### INSERT INTO `test`.`t2`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=NULL /* INT meta=0 nullable=1 is_null=1 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### INSERT INTO `test`.`t2`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=0 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1868
#<date> server id 1 end_log_pos 1941 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1941
#<date> server id 1 end_log_pos 1983 CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at 1983
#<date> server id 1 end_log_pos 2039 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2039
#<date> server id 1 end_log_pos 2138 CRC32 XXX Update_compressed_rows: table id 31 flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=4 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### UPDATE `test`.`t2`
### WHERE
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=4 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
### UPDATE `test`.`t2`
### WHERE
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=NULL /* INT meta=0 nullable=1 is_null=1 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 2138
#<date> server id 1 end_log_pos 2211 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2211
#<date> server id 1 end_log_pos 2253 CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at 2253
#<date> server id 1 end_log_pos 2309 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2309
#<date> server id 1 end_log_pos 2401 CRC32 XXX Delete_compressed_rows: table id 30 flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* TINYINT meta=0 nullable=1 is_null=0 */
### @5=4 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @6=5 /* LONGINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### DELETE FROM `test`.`t1`
### WHERE
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* TINYINT meta=0 nullable=1 is_null=0 */
### @5=4 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @6=5 /* LONGINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
### DELETE FROM `test`.`t1`
### WHERE
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* TINYINT meta=0 nullable=1 is_null=0 */
### @5=NULL /* MEDIUMINT meta=0 nullable=1 is_null=1 */
### @6=5 /* LONGINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### DELETE FROM `test`.`t1`
### WHERE
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* TINYINT meta=0 nullable=1 is_null=0 */
### @5=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @6=5 /* LONGINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 2401
#<date> server id 1 end_log_pos 2474 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2474
#<date> server id 1 end_log_pos 2516 CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN
/*!*/;
# at 2516
#<date> server id 1 end_log_pos 2572 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2572
#<date> server id 1 end_log_pos 2657 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### DELETE FROM `test`.`t2`
### WHERE
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
### DELETE FROM `test`.`t2`
### WHERE
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
### DELETE FROM `test`.`t2`
### WHERE
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
### @3=2 /* INT meta=0 nullable=1 is_null=0 */
### @4=3 /* INT meta=0 nullable=1 is_null=0 */
### @5=0 /* INT meta=0 nullable=1 is_null=0 */
### @6=5 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 2657
#<date> server id 1 end_log_pos 2730 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2730
#<date> server id 1 end_log_pos 2778 CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
DROP TABLE t1,t2;
SET GLOBAL log_bin_compress=off;
SET GLOBAL log_bin_compress_min_len=256;
...@@ -14,20 +14,20 @@ FLUSH BINARY LOGS; ...@@ -14,20 +14,20 @@ FLUSH BINARY LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/; DELIMITER /*!*/;
# at 4 # at 4
#<date> server id 1 end_log_pos 249 CRC32 XXX Start: xxx #<date> server id 1 end_log_pos 256 CRC32 XXX Start: xxx
ROLLBACK/*!*/; ROLLBACK/*!*/;
# at 249 # at 256
#<date> server id 1 end_log_pos 278 CRC32 XXX Gtid list [] #<date> server id 1 end_log_pos 285 CRC32 XXX Gtid list []
# at 278 # at 285
#<date> server id 1 end_log_pos 322 CRC32 XXX Binlog checkpoint master-bin.000001 #<date> server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001
# at 322 # at 329
#<date> server id 1 end_log_pos 364 CRC32 XXX GTID 0-1-1 ddl #<date> server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at 364 # at 371
#<date> server id 1 end_log_pos 548 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 555 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
use `test`/*!*/; use `test`/*!*/;
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=4/*!*/; SET @@session.pseudo_thread_id=4/*!*/;
...@@ -40,23 +40,23 @@ SET @@session.lc_time_names=0/*!*/; ...@@ -40,23 +40,23 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/; SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1)) CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
/*!*/; /*!*/;
# at 548 # at 555
#<date> server id 1 end_log_pos 590 CRC32 XXX GTID 0-1-2 ddl #<date> server id 1 end_log_pos 597 CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/; /*!100001 SET @@session.gtid_seq_no=2*//*!*/;
# at 590 # at 597
#<date> server id 1 end_log_pos 767 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 774 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1)) CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1))
/*!*/; /*!*/;
# at 767 # at 774
#<date> server id 1 end_log_pos 809 CRC32 XXX GTID 0-1-3 #<date> server id 1 end_log_pos 816 CRC32 XXX GTID 0-1-3
/*!100001 SET @@session.gtid_seq_no=3*//*!*/; /*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN BEGIN
/*!*/; /*!*/;
# at 809 # at 816
#<date> server id 1 end_log_pos 865 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 872 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 865 # at 872
#<date> server id 1 end_log_pos 934 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 941 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
...@@ -68,20 +68,20 @@ BEGIN ...@@ -68,20 +68,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */ ### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 934 # at 941
#<date> server id 1 end_log_pos 1007 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 1014 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
COMMIT COMMIT
/*!*/; /*!*/;
# at 1007 # at 1014
#<date> server id 1 end_log_pos 1049 CRC32 XXX GTID 0-1-4 #<date> server id 1 end_log_pos 1056 CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/; /*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN BEGIN
/*!*/; /*!*/;
# at 1049 # at 1056
#<date> server id 1 end_log_pos 1105 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1112 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1105 # at 1112
#<date> server id 1 end_log_pos 1173 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1180 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */ ### @1=11 /* INT meta=0 nullable=0 is_null=0 */
...@@ -93,20 +93,20 @@ BEGIN ...@@ -93,20 +93,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */ ### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
# at 1173 # at 1180
#<date> server id 1 end_log_pos 1246 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 1253 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
COMMIT COMMIT
/*!*/; /*!*/;
# at 1246 # at 1253
#<date> server id 1 end_log_pos 1288 CRC32 XXX GTID 0-1-5 #<date> server id 1 end_log_pos 1295 CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/; /*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN BEGIN
/*!*/; /*!*/;
# at 1288 # at 1295
#<date> server id 1 end_log_pos 1344 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1351 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1344 # at 1351
#<date> server id 1 end_log_pos 1411 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1418 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */ ### @1=12 /* INT meta=0 nullable=0 is_null=0 */
...@@ -118,20 +118,20 @@ BEGIN ...@@ -118,20 +118,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1411 # at 1418
#<date> server id 1 end_log_pos 1484 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 1491 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
COMMIT COMMIT
/*!*/; /*!*/;
# at 1484 # at 1491
#<date> server id 1 end_log_pos 1526 CRC32 XXX GTID 0-1-6 #<date> server id 1 end_log_pos 1533 CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/; /*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN BEGIN
/*!*/; /*!*/;
# at 1526 # at 1533
#<date> server id 1 end_log_pos 1582 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1589 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1582 # at 1589
#<date> server id 1 end_log_pos 1652 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1659 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */ ### @1=13 /* INT meta=0 nullable=0 is_null=0 */
...@@ -143,20 +143,20 @@ BEGIN ...@@ -143,20 +143,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1652 # at 1659
#<date> server id 1 end_log_pos 1725 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 1732 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
COMMIT COMMIT
/*!*/; /*!*/;
# at 1725 # at 1732
#<date> server id 1 end_log_pos 1767 CRC32 XXX GTID 0-1-7 #<date> server id 1 end_log_pos 1774 CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/; /*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN BEGIN
/*!*/; /*!*/;
# at 1767 # at 1774
#<date> server id 1 end_log_pos 1823 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 1830 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 1823 # at 1830
#<date> server id 1 end_log_pos 1990 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 1997 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t2` ### INSERT INTO `test`.`t2`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
...@@ -201,20 +201,20 @@ BEGIN ...@@ -201,20 +201,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1990 # at 1997
#<date> server id 1 end_log_pos 2063 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 2070 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
COMMIT COMMIT
/*!*/; /*!*/;
# at 2063 # at 2070
#<date> server id 1 end_log_pos 2105 CRC32 XXX GTID 0-1-8 #<date> server id 1 end_log_pos 2112 CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/; /*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN BEGIN
/*!*/; /*!*/;
# at 2105 # at 2112
#<date> server id 1 end_log_pos 2161 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2168 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2161 # at 2168
#<date> server id 1 end_log_pos 2235 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2242 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F
### UPDATE `test`.`t2` ### UPDATE `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
...@@ -233,20 +233,20 @@ BEGIN ...@@ -233,20 +233,20 @@ BEGIN
### @5=NULL /* INT meta=0 nullable=1 is_null=1 */ ### @5=NULL /* INT meta=0 nullable=1 is_null=1 */
### SET ### SET
### @5=5 /* INT meta=0 nullable=1 is_null=0 */ ### @5=5 /* INT meta=0 nullable=1 is_null=0 */
# at 2235 # at 2242
#<date> server id 1 end_log_pos 2308 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 2315 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
COMMIT COMMIT
/*!*/; /*!*/;
# at 2308 # at 2315
#<date> server id 1 end_log_pos 2350 CRC32 XXX GTID 0-1-9 #<date> server id 1 end_log_pos 2357 CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/; /*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN BEGIN
/*!*/; /*!*/;
# at 2350 # at 2357
#<date> server id 1 end_log_pos 2406 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 2413 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2406 # at 2413
#<date> server id 1 end_log_pos 2460 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 2467 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F
### DELETE FROM `test`.`t1` ### DELETE FROM `test`.`t1`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
...@@ -259,20 +259,20 @@ BEGIN ...@@ -259,20 +259,20 @@ BEGIN
### DELETE FROM `test`.`t1` ### DELETE FROM `test`.`t1`
### WHERE ### WHERE
### @1=13 /* INT meta=0 nullable=0 is_null=0 */ ### @1=13 /* INT meta=0 nullable=0 is_null=0 */
# at 2460 # at 2467
#<date> server id 1 end_log_pos 2533 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 2540 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
COMMIT COMMIT
/*!*/; /*!*/;
# at 2533 # at 2540
#<date> server id 1 end_log_pos 2575 CRC32 XXX GTID 0-1-10 #<date> server id 1 end_log_pos 2582 CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/; /*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN BEGIN
/*!*/; /*!*/;
# at 2575 # at 2582
#<date> server id 1 end_log_pos 2631 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2638 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2631 # at 2638
#<date> server id 1 end_log_pos 2685 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2692 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t2` ### DELETE FROM `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
...@@ -285,13 +285,13 @@ BEGIN ...@@ -285,13 +285,13 @@ BEGIN
### DELETE FROM `test`.`t2` ### DELETE FROM `test`.`t2`
### WHERE ### WHERE
### @1=13 /* INT meta=0 nullable=0 is_null=0 */ ### @1=13 /* INT meta=0 nullable=0 is_null=0 */
# at 2685 # at 2692
#<date> server id 1 end_log_pos 2758 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 #<date> server id 1 end_log_pos 2765 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/; SET TIMESTAMP=X/*!*/;
COMMIT COMMIT
/*!*/; /*!*/;
# at 2758 # at 2765
#<date> server id 1 end_log_pos 2806 CRC32 XXX Rotate to master-bin.000002 pos: 4 #<date> server id 1 end_log_pos 2813 CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ; DELIMITER ;
# End of log file # End of log file
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
......
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));
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1));
INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "");
INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL);
INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A");
INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A");
INSERT INTO t2 SELECT * FROM t1;
UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL;
DELETE FROM t1;
DELETE FROM t2;
FLUSH BINARY LOGS;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#<date> server id 1 end_log_pos 256 CRC32 XXX Start: xxx
ROLLBACK/*!*/;
# at 256
#<date> server id 1 end_log_pos 285 CRC32 XXX Gtid list []
# at 285
#<date> server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001
# at 329
#<date> server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at 371
#<date> server id 1 end_log_pos 533 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=4/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=1342177280/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
# at 533
#<date> server id 1 end_log_pos 575 CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
# at 575
#<date> server id 1 end_log_pos 727 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
# at 727
#<date> server id 1 end_log_pos 769 CRC32 XXX GTID 0-1-3
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN
/*!*/;
# at 769
#<date> server id 1 end_log_pos 897 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
/*!*/;
# at 897
#<date> server id 1 end_log_pos 970 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 970
#<date> server id 1 end_log_pos 1012 CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at 1012
#<date> server id 1 end_log_pos 1140 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
/*!*/;
# at 1140
#<date> server id 1 end_log_pos 1213 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1213
#<date> server id 1 end_log_pos 1255 CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at 1255
#<date> server id 1 end_log_pos 1385 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
/*!*/;
# at 1385
#<date> server id 1 end_log_pos 1458 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1458
#<date> server id 1 end_log_pos 1500 CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN
/*!*/;
# at 1500
#<date> server id 1 end_log_pos 1627 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
/*!*/;
# at 1627
#<date> server id 1 end_log_pos 1700 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1700
#<date> server id 1 end_log_pos 1742 CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at 1742
#<date> server id 1 end_log_pos 1850 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
INSERT INTO t2 SELECT * FROM t1
/*!*/;
# at 1850
#<date> server id 1 end_log_pos 1923 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1923
#<date> server id 1 end_log_pos 1965 CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at 1965
#<date> server id 1 end_log_pos 2082 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
/*!*/;
# at 2082
#<date> server id 1 end_log_pos 2155 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2155
#<date> server id 1 end_log_pos 2197 CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at 2197
#<date> server id 1 end_log_pos 2288 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
DELETE FROM t1
/*!*/;
# at 2288
#<date> server id 1 end_log_pos 2361 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2361
#<date> server id 1 end_log_pos 2403 CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN
/*!*/;
# at 2403
#<date> server id 1 end_log_pos 2494 CRC32 XXX Query_compressed thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
DELETE FROM t2
/*!*/;
# at 2494
#<date> server id 1 end_log_pos 2567 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2567
#<date> server id 1 end_log_pos 2615 CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
DROP TABLE t1,t2;
SET GLOBAL log_bin_compress=off;
SET GLOBAL log_bin_compress_min_len=256;
...@@ -344,6 +344,10 @@ The following options may be given as the first argument: ...@@ -344,6 +344,10 @@ The following options may be given as the first argument:
We strongly recommend to use either --log-basename or We strongly recommend to use either --log-basename or
specify a filename to ensure that replication doesn't specify a filename to ensure that replication doesn't
stop if the real hostname of the computer changes. stop if the real hostname of the computer changes.
--log-bin-compress Whether the binary log can be compressed
--log-bin-compress-min-len[=#]
Minimum length of sql statement(in statement mode) or
record(in row mode)that can be compressed.
--log-bin-index=name --log-bin-index=name
File that holds the names for last binary log files. File that holds the names for last binary log files.
--log-bin-trust-function-creators --log-bin-trust-function-creators
...@@ -1264,6 +1268,8 @@ lc-time-names en_US ...@@ -1264,6 +1268,8 @@ lc-time-names en_US
local-infile TRUE local-infile TRUE
lock-wait-timeout 31536000 lock-wait-timeout 31536000
log-bin (No default value) log-bin (No default value)
log-bin-compress FALSE
log-bin-compress-min-len 256
log-bin-index (No default value) log-bin-index (No default value)
log-bin-trust-function-creators FALSE log-bin-trust-function-creators FALSE
log-error log-error
......
...@@ -3,6 +3,10 @@ Variable_name log_bin ...@@ -3,6 +3,10 @@ Variable_name log_bin
Value ON Value ON
Variable_name log_bin_basename Variable_name log_bin_basename
Value MYSQLTEST_VARDIR/mysqld.1/data/other Value MYSQLTEST_VARDIR/mysqld.1/data/other
Variable_name log_bin_compress
Value OFF
Variable_name log_bin_compress_min_len
Value 256
Variable_name log_bin_index Variable_name log_bin_index
Value MYSQLTEST_VARDIR/mysqld.1/data/mysqld-bin.index Value MYSQLTEST_VARDIR/mysqld.1/data/mysqld-bin.index
Variable_name log_bin_trust_function_creators Variable_name log_bin_trust_function_creators
......
...@@ -3,6 +3,10 @@ Variable_name log_bin ...@@ -3,6 +3,10 @@ Variable_name log_bin
Value ON Value ON
Variable_name log_bin_basename Variable_name log_bin_basename
Value MYSQLTEST_VARDIR/mysqld.1/data/other Value MYSQLTEST_VARDIR/mysqld.1/data/other
Variable_name log_bin_compress
Value OFF
Variable_name log_bin_compress_min_len
Value 256
Variable_name log_bin_index Variable_name log_bin_index
Value MYSQLTEST_VARDIR/tmp/something.index Value MYSQLTEST_VARDIR/tmp/something.index
Variable_name log_bin_trust_function_creators Variable_name log_bin_trust_function_creators
......
include/master-slave.inc
[connection master]
set @old_log_bin_compress=@@log_bin_compress;
set @old_log_bin_compress_min_len=@@log_bin_compress_min_len;
set @old_binlog_format=@@binlog_format;
set @old_binlog_row_image=@@binlog_row_image;
set global log_bin_compress=on;
set global log_bin_compress_min_len=10;
drop table if exists t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (pr_id int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, pr_page int(11) NOT NULL, pr_type varbinary(60) NOT NULL, test int, UNIQUE KEY pr_pagetype (pr_page,pr_type)) ENGINE=myisam AUTO_INCREMENT=136;
set binlog_format=statement;
insert into t1 (pr_page, pr_type, test) values(1,"one",0),(2,"two",0);
replace into t1 (pr_page, pr_type,test) values(1,"one",2);
update t1 set test=test+1 where pr_page > 1;
delete from t1 where test=1;
select * from t1;
pr_id pr_page pr_type test
138 1 one 2
connection slave;
connection slave;
select * from t1;
pr_id pr_page pr_type test
138 1 one 2
connection master;
set binlog_format=row;
insert into t1 (pr_page, pr_type, test) values(3,"three",0),(4,"four",4),(5, "five", 0);
replace into t1 (pr_page, pr_type,test) values(3,"one",2);
update t1 set test=test+1 where pr_page > 3;
delete from t1 where test=1;
select * from t1;
pr_id pr_page pr_type test
138 1 one 2
140 4 four 5
139 3 three 0
142 3 one 2
connection slave;
connection slave;
select * from t1;
pr_id pr_page pr_type test
138 1 one 2
140 4 four 5
139 3 three 0
142 3 one 2
connection master;
set binlog_row_image=minimal;
insert into t1 (pr_page, pr_type, test) values(6,"six",0),(7,"seven",7),(8, "eight", 0);
replace into t1 (pr_page, pr_type,test) values(6,"six",2);
update t1 set test=test+1 where pr_page > 6;
delete from t1 where test=1;
select * from t1;
pr_id pr_page pr_type test
138 1 one 2
140 4 four 5
139 3 three 0
144 7 seven 8
142 3 one 2
146 6 six 2
connection slave;
connection slave;
select * from t1;
pr_id pr_page pr_type test
138 1 one 2
140 4 four 5
139 3 three 0
144 7 seven 8
142 3 one 2
146 6 six 2
connection master;
drop table t1;
set global log_bin_compress=@old_log_bin_compress;
set global log_bin_compress_min_len=@old_log_bin_compress_min_len;
set binlog_format=@old_binlog_format;
set binlog_row_image=@old_binlog_row_image;
include/rpl_end.inc
#
# Test of compressed binlog with replication
#
source include/master-slave.inc;
set @old_log_bin_compress=@@log_bin_compress;
set @old_log_bin_compress_min_len=@@log_bin_compress_min_len;
set @old_binlog_format=@@binlog_format;
set @old_binlog_row_image=@@binlog_row_image;
set global log_bin_compress=on;
set global log_bin_compress_min_len=10;
drop table if exists t1;
CREATE TABLE t1 (pr_id int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, pr_page int(11) NOT NULL, pr_type varbinary(60) NOT NULL, test int, UNIQUE KEY pr_pagetype (pr_page,pr_type)) ENGINE=myisam AUTO_INCREMENT=136;
set binlog_format=statement;
insert into t1 (pr_page, pr_type, test) values(1,"one",0),(2,"two",0);
replace into t1 (pr_page, pr_type,test) values(1,"one",2);
update t1 set test=test+1 where pr_page > 1;
delete from t1 where test=1;
select * from t1;
sync_slave_with_master;
connection slave;
select * from t1;
connection master;
set binlog_format=row;
insert into t1 (pr_page, pr_type, test) values(3,"three",0),(4,"four",4),(5, "five", 0);
replace into t1 (pr_page, pr_type,test) values(3,"one",2);
update t1 set test=test+1 where pr_page > 3;
delete from t1 where test=1;
select * from t1;
sync_slave_with_master;
connection slave;
select * from t1;
connection master;
set binlog_row_image=minimal;
insert into t1 (pr_page, pr_type, test) values(6,"six",0),(7,"seven",7),(8, "eight", 0);
replace into t1 (pr_page, pr_type,test) values(6,"six",2);
update t1 set test=test+1 where pr_page > 6;
delete from t1 where test=1;
select * from t1;
sync_slave_with_master;
connection slave;
select * from t1;
connection master;
drop table t1;
set global log_bin_compress=@old_log_bin_compress;
set global log_bin_compress_min_len=@old_log_bin_compress_min_len;
set binlog_format=@old_binlog_format;
set binlog_row_image=@old_binlog_row_image;
--source include/rpl_end.inc
...@@ -1759,6 +1759,34 @@ NUMERIC_BLOCK_SIZE NULL ...@@ -1759,6 +1759,34 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL ENUM_VALUE_LIST NULL
READ_ONLY YES READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOG_BIN_COMPRESS
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether the binary log can be compressed
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_BIN_COMPRESS_MIN_LEN
SESSION_VALUE NULL
GLOBAL_VALUE 256
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Minimum length of sql statement(in statement mode) or record(in row mode)that can be compressed.
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 1024
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_BIN_INDEX VARIABLE_NAME LOG_BIN_INDEX
SESSION_VALUE NULL SESSION_VALUE NULL
GLOBAL_VALUE GLOBAL_VALUE
......
#
# Test for compressed row event
#
--source include/have_log_bin.inc
--source include/have_binlog_format_row.inc
#
#
# mysqlbinlog: comprssed row event
#
#
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));
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1));
INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "");
INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL);
INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A");
INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A");
INSERT INTO t2 SELECT * FROM t1;
UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL;
DELETE FROM t1;
DELETE FROM t2;
--let $binlog = query_get_value(SHOW MASTER STATUS, File, 1)
--let $datadir = `SELECT @@datadir`
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/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
DROP TABLE t1,t2;
SET GLOBAL log_bin_compress=off;
SET GLOBAL log_bin_compress_min_len=256;
#
# Test for compressed query event
#
--source include/have_log_bin.inc
--source include/have_binlog_format_statement.inc
#
#
# mysqlbinlog: comprssed query event
#
#
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));
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1));
INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "");
INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL);
INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A");
INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A");
INSERT INTO t2 SELECT * FROM t1;
UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL;
DELETE FROM t1;
DELETE FROM t2;
--let $binlog = query_get_value(SHOW MASTER STATUS, File, 1)
--let $datadir = `SELECT @@datadir`
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/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
DROP TABLE t1,t2;
SET GLOBAL log_bin_compress=off;
SET GLOBAL log_bin_compress_min_len=256;
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