Skip to content

Commit 17cb655

Browse files
vuvovagrooverdan
authored andcommitted
MDEV-22964: archive.archive and main.mysqlbinlog_{row,stmt}_compressed)
zlib-ng results in different compression length. The compression length isn't that important as the test output examines the uncompressed results. fixes for zlib-ng backport of 75488a5
1 parent d98ac85 commit 17cb655

File tree

5 files changed

+163
-165
lines changed

5 files changed

+163
-165
lines changed

mysql-test/main/mysqlbinlog_row_compressed.result

Lines changed: 96 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ FLUSH BINARY LOGS;
1515
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
1616
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
1717
DELIMITER /*!*/;
18-
# at 4
19-
#<date> server id 1 end_log_pos 256 CRC32 XXX Start: xxx
18+
# at <pos>
19+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Start: xxx
2020
ROLLBACK/*!*/;
21-
# at 256
22-
#<date> server id 1 end_log_pos 285 CRC32 XXX Gtid list []
23-
# at 285
24-
#<date> server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001
25-
# at 329
26-
#<date> server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl
21+
# at <pos>
22+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Gtid list []
23+
# at <pos>
24+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Binlog checkpoint master-bin.000001
25+
# at <pos>
26+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-1 ddl
2727
/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/;
2828
/*M!100001 SET @@session.gtid_domain_id=0*//*!*/;
2929
/*M!100001 SET @@session.server_id=1*//*!*/;
3030
/*M!100001 SET @@session.gtid_seq_no=1*//*!*/;
31-
# at 371
32-
#<date> server id 1 end_log_pos 533 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0
31+
# at <pos>
32+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0
3333
use `test`/*!*/;
3434
SET TIMESTAMP=X/*!*/;
3535
SET @@session.pseudo_thread_id=5/*!*/;
@@ -42,26 +42,26 @@ SET @@session.lc_time_names=0/*!*/;
4242
SET @@session.collation_database=DEFAULT/*!*/;
4343
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
4444
/*!*/;
45-
# at 533
46-
#<date> server id 1 end_log_pos 575 CRC32 XXX GTID 0-1-2 ddl
45+
# at <pos>
46+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-2 ddl
4747
/*M!100001 SET @@session.gtid_seq_no=2*//*!*/;
48-
# at 575
49-
#<date> server id 1 end_log_pos 727 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0
48+
# at <pos>
49+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0
5050
SET TIMESTAMP=X/*!*/;
5151
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1))
5252
/*!*/;
53-
# at 727
54-
#<date> server id 1 end_log_pos 769 CRC32 XXX GTID 0-1-3
53+
# at <pos>
54+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-3
5555
/*M!100001 SET @@session.gtid_seq_no=3*//*!*/;
5656
START TRANSACTION
5757
/*!*/;
58-
# at 769
59-
# at 843
60-
#<date> server id 1 end_log_pos 843 CRC32 XXX Annotate_rows:
58+
# at <pos>
59+
# at <pos>
60+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
6161
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
62-
#<date> server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num
63-
# at 899
64-
#<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
62+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
63+
# at <pos>
64+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
6565
### INSERT INTO `test`.`t1`
6666
### SET
6767
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -74,23 +74,23 @@ START TRANSACTION
7474
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
7575
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
7676
# Number of rows: 1
77-
# at 967
78-
#<date> server id 1 end_log_pos 1040 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
77+
# at <pos>
78+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0
7979
SET TIMESTAMP=X/*!*/;
8080
COMMIT
8181
/*!*/;
82-
# at 1040
83-
#<date> server id 1 end_log_pos 1082 CRC32 XXX GTID 0-1-4
82+
# at <pos>
83+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-4
8484
/*M!100001 SET @@session.gtid_seq_no=4*//*!*/;
8585
START TRANSACTION
8686
/*!*/;
87-
# at 1082
88-
# at 1158
89-
#<date> server id 1 end_log_pos 1158 CRC32 XXX Annotate_rows:
87+
# at <pos>
88+
# at <pos>
89+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
9090
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
91-
#<date> server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num
92-
# at 1214
93-
#<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
91+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
92+
# at <pos>
93+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
9494
### INSERT INTO `test`.`t1`
9595
### SET
9696
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@@ -103,23 +103,23 @@ START TRANSACTION
103103
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
104104
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
105105
# Number of rows: 1
106-
# at 1281
107-
#<date> server id 1 end_log_pos 1354 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
106+
# at <pos>
107+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0
108108
SET TIMESTAMP=X/*!*/;
109109
COMMIT
110110
/*!*/;
111-
# at 1354
112-
#<date> server id 1 end_log_pos 1396 CRC32 XXX GTID 0-1-5
111+
# at <pos>
112+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-5
113113
/*M!100001 SET @@session.gtid_seq_no=5*//*!*/;
114114
START TRANSACTION
115115
/*!*/;
116-
# at 1396
117-
# at 1474
118-
#<date> server id 1 end_log_pos 1474 CRC32 XXX Annotate_rows:
116+
# at <pos>
117+
# at <pos>
118+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
119119
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
120-
#<date> server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num
121-
# at 1530
122-
#<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
120+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
121+
# at <pos>
122+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
123123
### INSERT INTO `test`.`t1`
124124
### SET
125125
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@@ -132,23 +132,23 @@ START TRANSACTION
132132
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
133133
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
134134
# Number of rows: 1
135-
# at 1596
136-
#<date> server id 1 end_log_pos 1669 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
135+
# at <pos>
136+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0
137137
SET TIMESTAMP=X/*!*/;
138138
COMMIT
139139
/*!*/;
140-
# at 1669
141-
#<date> server id 1 end_log_pos 1711 CRC32 XXX GTID 0-1-6
140+
# at <pos>
141+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-6
142142
/*M!100001 SET @@session.gtid_seq_no=6*//*!*/;
143143
START TRANSACTION
144144
/*!*/;
145-
# at 1711
146-
# at 1786
147-
#<date> server id 1 end_log_pos 1786 CRC32 XXX Annotate_rows:
145+
# at <pos>
146+
# at <pos>
147+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
148148
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
149-
#<date> server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num
150-
# at 1842
151-
#<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
149+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
150+
# at <pos>
151+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
152152
### INSERT INTO `test`.`t1`
153153
### SET
154154
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@@ -161,23 +161,23 @@ START TRANSACTION
161161
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
162162
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
163163
# Number of rows: 1
164-
# at 1909
165-
#<date> server id 1 end_log_pos 1982 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
164+
# at <pos>
165+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0
166166
SET TIMESTAMP=X/*!*/;
167167
COMMIT
168168
/*!*/;
169-
# at 1982
170-
#<date> server id 1 end_log_pos 2024 CRC32 XXX GTID 0-1-7
169+
# at <pos>
170+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-7
171171
/*M!100001 SET @@session.gtid_seq_no=7*//*!*/;
172172
START TRANSACTION
173173
/*!*/;
174-
# at 2024
175-
# at 2078
176-
#<date> server id 1 end_log_pos 2078 CRC32 XXX Annotate_rows:
174+
# at <pos>
175+
# at <pos>
176+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
177177
#Q> INSERT INTO t2 SELECT * FROM t1
178-
#<date> server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num
179-
# at 2134
180-
#<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 33 flags: STMT_END_F
178+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t2` mapped to number num
179+
# at <pos>
180+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
181181
### INSERT INTO `test`.`t2`
182182
### SET
183183
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -223,23 +223,23 @@ START TRANSACTION
223223
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
224224
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
225225
# Number of rows: 4
226-
# at 2225
227-
#<date> server id 1 end_log_pos 2298 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
226+
# at <pos>
227+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0
228228
SET TIMESTAMP=X/*!*/;
229229
COMMIT
230230
/*!*/;
231-
# at 2298
232-
#<date> server id 1 end_log_pos 2340 CRC32 XXX GTID 0-1-8
231+
# at <pos>
232+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-8
233233
/*M!100001 SET @@session.gtid_seq_no=8*//*!*/;
234234
START TRANSACTION
235235
/*!*/;
236-
# at 2340
237-
# at 2406
238-
#<date> server id 1 end_log_pos 2406 CRC32 XXX Annotate_rows:
236+
# at <pos>
237+
# at <pos>
238+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
239239
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
240-
#<date> server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num
241-
# at 2462
242-
#<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 33 flags: STMT_END_F
240+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t2` mapped to number num
241+
# at <pos>
242+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Update_compressed_rows: table id <tblid> flags: STMT_END_F
243243
### UPDATE `test`.`t2`
244244
### WHERE
245245
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -304,23 +304,23 @@ START TRANSACTION
304304
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
305305
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
306306
# Number of rows: 3
307-
# at 2561
308-
#<date> server id 1 end_log_pos 2634 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
307+
# at <pos>
308+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0
309309
SET TIMESTAMP=X/*!*/;
310310
COMMIT
311311
/*!*/;
312-
# at 2634
313-
#<date> server id 1 end_log_pos 2676 CRC32 XXX GTID 0-1-9
312+
# at <pos>
313+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-9
314314
/*M!100001 SET @@session.gtid_seq_no=9*//*!*/;
315315
START TRANSACTION
316316
/*!*/;
317-
# at 2676
318-
# at 2713
319-
#<date> server id 1 end_log_pos 2713 CRC32 XXX Annotate_rows:
317+
# at <pos>
318+
# at <pos>
319+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
320320
#Q> DELETE FROM t1
321-
#<date> server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num
322-
# at 2769
323-
#<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 32 flags: STMT_END_F
321+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
322+
# at <pos>
323+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Delete_compressed_rows: table id <tblid> flags: STMT_END_F
324324
### DELETE FROM `test`.`t1`
325325
### WHERE
326326
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -366,23 +366,23 @@ START TRANSACTION
366366
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
367367
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
368368
# Number of rows: 4
369-
# at 2861
370-
#<date> server id 1 end_log_pos 2934 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
369+
# at <pos>
370+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0
371371
SET TIMESTAMP=X/*!*/;
372372
COMMIT
373373
/*!*/;
374-
# at 2934
375-
#<date> server id 1 end_log_pos 2976 CRC32 XXX GTID 0-1-10
374+
# at <pos>
375+
#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-10
376376
/*M!100001 SET @@session.gtid_seq_no=10*//*!*/;
377377
START TRANSACTION
378378
/*!*/;
379-
# at 2976
380-
# at 3013
381-
#<date> server id 1 end_log_pos 3013 CRC32 XXX Annotate_rows:
379+
# at <pos>
380+
# at <pos>
381+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
382382
#Q> DELETE FROM t2
383-
#<date> server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num
384-
# at 3069
385-
#<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 33 flags: STMT_END_F
383+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t2` mapped to number num
384+
# at <pos>
385+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Delete_compressed_rows: table id <tblid> flags: STMT_END_F
386386
### DELETE FROM `test`.`t2`
387387
### WHERE
388388
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -428,13 +428,13 @@ START TRANSACTION
428428
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
429429
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
430430
# Number of rows: 4
431-
# at 3154
432-
#<date> server id 1 end_log_pos 3227 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
431+
# at <pos>
432+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0
433433
SET TIMESTAMP=X/*!*/;
434434
COMMIT
435435
/*!*/;
436-
# at 3227
437-
#<date> server id 1 end_log_pos 3275 CRC32 XXX Rotate to master-bin.000002 pos: 4
436+
# at <pos>
437+
#<date> server id 1 end_log_pos <pos> CRC32 XXX Rotate to master-bin.000002 pos: 4
438438
DELIMITER ;
439439
# End of log file
440440
ROLLBACK /* added by mysqlbinlog */;

mysql-test/main/mysqlbinlog_row_compressed.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
--source include/have_log_bin.inc
66
--source include/have_binlog_format_row.inc
7-
--source include/have_normal_zlib.inc
87

98
#
109
#
@@ -30,7 +29,7 @@ DELETE FROM t2;
3029

3130
FLUSH BINARY LOGS;
3231
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
33-
--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=#/
32+
--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>/ /end_log_pos \d+/end_log_pos <pos>/ /# at \d+/# at <pos>/
3433
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
3534

3635
--echo

0 commit comments

Comments
 (0)