| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# This test ensures that binary log events are properly written to the |
| 4 |
# binary log when compression is enabled and the size of the compressed |
| 5 |
# event is higher than it's uncompressed counter-part. |
| 6 |
# |
| 7 |
# ==== Requirements ==== |
| 8 |
# |
| 9 |
# R1. The compressed version of the event must be properly written to the |
| 10 |
# binary log. |
| 11 |
# |
| 12 |
# ==== Implementation ==== |
| 13 |
# |
| 14 |
# 1. Ensure server is freshly initialized. |
| 15 |
# 2. Create a table with a blob column. |
| 16 |
# 3. Prepare an insert statement and populate the blob columns with |
| 17 |
# uncompressable data. |
| 18 |
# 4. Ensure that the compressed event is in the binary log. |
| 19 |
# |
| 20 |
# ==== References ==== |
| 21 |
# |
| 22 |
# BUG#32174715 STUCK "COMPRESSING TRANSACTION CHANGES." WHEN |
| 23 |
# BINLOG_TRANSACTION_COMPRESSION |
| 24 |
# |
| 25 |
|
| 26 |
# 1. Ensure server is freshly initialized. |
| 27 |
RESET MASTER; |
| 28 |
|
| 29 |
# 2. Create a table with a blob column. |
| 30 |
CREATE TABLE t1 (id bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, |
| 31 |
x mediumblob NOT NULL) ENGINE=InnoDB; |
| 32 |
|
| 33 |
# 3. Prepare an insert statement and populate the blob columns with |
| 34 |
# uncompressable data. |
| 35 |
PREPARE s FROM "INSERT INTO t1 (x) VALUES (?)"; |
| 36 |
SET @a = LOAD_FILE('../../std_data/binlog_compression.gz'); |
| 37 |
EXECUTE s USING @a; |
| 38 |
|
| 39 |
# 4. Ensure that the compressed event is in the binary log. |
| 40 |
--let $event_sequence = !Gtid_or_anon # !DDL # !Gtid_or_anon # Transaction_payload # !Begin # Table_map # Write_rows # Xid |
| 41 |
--let $include_trx_payload_events = 1 |
| 42 |
--source include/assert_binlog_events.inc |
| 43 |
|
| 44 |
DROP TABLE t1; |