| 1 |
SET SESSION binlog_transaction_compression = ON; |
| 2 |
CREATE TABLE t1(c1 INT PRIMARY KEY, data TEXT(30000)) ENGINE = MYISAM; |
| 3 |
CREATE TABLE t2(c1 INT PRIMARY KEY, data TEXT(30000)) ENGINE = InnoDB; |
| 4 |
INSERT INTO t1 VALUES (1, REPEAT ('a', 1000)); |
| 5 |
INSERT INTO t2 VALUES (1, REPEAT ('b', 1000)); |
| 6 |
RESET MASTER; |
| 7 |
TRUNCATE performance_schema.binary_log_transaction_compression_stats; |
| 8 |
# |
| 9 |
# Test 1: single non-trans statement |
| 10 |
# |
| 11 |
INSERT INTO t1 VALUES (2, REPEAT ('c', 1000)); |
| 12 |
include/assert.inc [Expected event type Query (begin)] |
| 13 |
include/assert.inc [Expected event type Table_map] |
| 14 |
include/assert.inc [Expected event type Write_rows] |
| 15 |
include/assert.inc [Expected event type Query (commit)] |
| 16 |
include/assert.inc [Number of rows in performance_schema.binary_log_transaction_compression_stats = 0 for compression_type != NONE] |
| 17 |
include/assert.inc [Number of rows in performance_schema.binary_log_transaction_compression_stats = 1 for compression_type = NONE] |
| 18 |
DROP TABLE IF EXISTS t1, t2; |
| 19 |
SET SESSION binlog_transaction_compression = SAVED; |
| 20 |
RESET MASTER; |
| 21 |
TRUNCATE performance_schema.binary_log_transaction_compression_stats; |
| 22 |
SET SESSION binlog_transaction_compression = ON; |
| 23 |
CREATE TABLE t1(c1 INT PRIMARY KEY, data TEXT(30000)) ENGINE = MYISAM; |
| 24 |
CREATE TABLE t2(c1 INT PRIMARY KEY, data TEXT(30000)) ENGINE = InnoDB; |
| 25 |
INSERT INTO t1 VALUES (1, REPEAT ('a', 1000)); |
| 26 |
INSERT INTO t2 VALUES (1, REPEAT ('b', 1000)); |
| 27 |
RESET MASTER; |
| 28 |
TRUNCATE performance_schema.binary_log_transaction_compression_stats; |
| 29 |
# |
| 30 |
# Test 2: single non-trans + trans statement |
| 31 |
# |
| 32 |
UPDATE t1, t2 SET t1.c1 = 2, t2.c1=2; |
| 33 |
include/show_binlog_events.inc |
| 34 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 35 |
binlog.000001 # Previous_gtids # # |
| 36 |
binlog.000001 # Anonymous_Gtid # # SET @@SESSION.GTID_NEXT= 'ANONYMOUS' |
| 37 |
binlog.000001 # Query # # BEGIN |
| 38 |
binlog.000001 # Table_map # # table_id: # (test.t1) |
| 39 |
binlog.000001 # Update_rows # # table_id: # flags: STMT_END_F |
| 40 |
binlog.000001 # Query # # COMMIT |
| 41 |
binlog.000001 # Anonymous_Gtid # # SET @@SESSION.GTID_NEXT= 'ANONYMOUS' |
| 42 |
binlog.000001 # Query # # BEGIN |
| 43 |
binlog.000001 # Table_map # # table_id: # (test.t2) |
| 44 |
binlog.000001 # Update_rows # # table_id: # flags: STMT_END_F |
| 45 |
binlog.000001 # Xid # # COMMIT /* XID */ |
| 46 |
include/assert.inc [Expected event type Query (begin)] |
| 47 |
include/assert.inc [Expected event type Table_map] |
| 48 |
include/assert.inc [Expected event type Update_rows] |
| 49 |
include/assert.inc [Expected event type Query (commit)] |
| 50 |
include/assert.inc [Expected event type Query (begin)] |
| 51 |
include/assert.inc [Expected event type Table_map] |
| 52 |
include/assert.inc [Expected event type Update_rows] |
| 53 |
include/assert.inc [Expected event type Xid] |
| 54 |
include/assert.inc [Number of rows in performance_schema.binary_log_transaction_compression_stats = 0 for compression_type != NONE] |
| 55 |
include/assert.inc [Number of rows in performance_schema.binary_log_transaction_compression_stats = 1 for compression_type = NONE] |
| 56 |
DROP TABLE IF EXISTS t1, t2; |
| 57 |
SET SESSION binlog_transaction_compression = SAVED; |
| 58 |
RESET MASTER; |
| 59 |
TRUNCATE performance_schema.binary_log_transaction_compression_stats; |
| 60 |
SET SESSION binlog_transaction_compression = ON; |
| 61 |
CREATE TABLE t1(c1 INT PRIMARY KEY, data TEXT(30000)) ENGINE = MYISAM; |
| 62 |
CREATE TABLE t2(c1 INT PRIMARY KEY, data TEXT(30000)) ENGINE = InnoDB; |
| 63 |
INSERT INTO t1 VALUES (1, REPEAT ('a', 1000)); |
| 64 |
INSERT INTO t2 VALUES (1, REPEAT ('b', 1000)); |
| 65 |
RESET MASTER; |
| 66 |
TRUNCATE performance_schema.binary_log_transaction_compression_stats; |
| 67 |
# |
| 68 |
# Test 3: transaction with non-trans and trans statement |
| 69 |
# |
| 70 |
BEGIN; |
| 71 |
UPDATE t2 SET c1=2; |
| 72 |
UPDATE t1 SET c1=2; |
| 73 |
COMMIT; |
| 74 |
include/assert.inc [Expected event type Query (begin)] |
| 75 |
include/assert.inc [Expected event type Table_map] |
| 76 |
include/assert.inc [Expected event type Update_rows] |
| 77 |
include/assert.inc [Expected event type Query (commit)] |
| 78 |
include/assert.inc [Expected event type Query (begin)] |
| 79 |
include/assert.inc [Expected event type Table_map] |
| 80 |
include/assert.inc [Expected event type Update_rows] |
| 81 |
include/assert.inc [Expected event type Xid] |
| 82 |
include/assert.inc [Number of rows in performance_schema.binary_log_transaction_compression_stats = 0 for compression_type != NONE] |
| 83 |
include/assert.inc [Number of rows in performance_schema.binary_log_transaction_compression_stats = 1 for compression_type = NONE] |
| 84 |
DROP TABLE IF EXISTS t1, t2; |
| 85 |
SET SESSION binlog_transaction_compression = SAVED; |
| 86 |
RESET MASTER; |
| 87 |
TRUNCATE performance_schema.binary_log_transaction_compression_stats; |