summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/parts/t/partition_mdev6067.test
blob: 7d64de2e8a735d368aced6945ee61d0ed97b6bf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--source include/have_innodb.inc
--source include/have_partition.inc
--source include/have_binlog_format_statement.inc

# Test binlogging of some transactions on a partitioned InnoDB table.
# The bug was seen as one of the inserts being logged with a COMMIT query
# event instead of the correct XID event.

CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
  PARTITION BY KEY (a) PARTITIONS 2;
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
--let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1)
INSERT INTO t1 VALUES (1,1);
INSERT INTO t1 VALUES (2,2), (3,8);
INSERT INTO t1 VALUES (4,16);

--source include/show_binlog_events.inc

# Same thing in row mode.
DROP TABLE t1;
SET binlog_format='row';
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
  PARTITION BY KEY (a) PARTITIONS 2;
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
--let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1)
INSERT INTO t1 VALUES (1,1);
INSERT INTO t1 VALUES (2,2), (3,8);
INSERT INTO t1 VALUES (4,16);

--source include/show_binlog_events.inc

DROP TABLE t1;