Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a1ae8f9b
Commit
a1ae8f9b
authored
Apr 11, 2014
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6067: Partitioned table DML sometimes binlogged without XID event
Add test case.
parent
68bad3c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
mysql-test/suite/parts/r/partition_mdev6067.result
mysql-test/suite/parts/r/partition_mdev6067.result
+38
-0
mysql-test/suite/parts/t/partition_mdev6067.test
mysql-test/suite/parts/t/partition_mdev6067.test
+32
-0
No files found.
mysql-test/suite/parts/r/partition_mdev6067.result
0 → 100644
View file @
a1ae8f9b
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
PARTITION BY KEY (a) PARTITIONS 2;
INSERT INTO t1 VALUES (1,1);
INSERT INTO t1 VALUES (2,2), (3,8);
INSERT INTO t1 VALUES (4,16);
show binlog events in 'master-bin.000001' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2,2), (3,8)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,16)
master-bin.000001 # Xid # # COMMIT /* XID */
DROP TABLE t1;
SET binlog_format='row';
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
PARTITION BY KEY (a) PARTITIONS 2;
INSERT INTO t1 VALUES (1,1);
INSERT INTO t1 VALUES (2,2), (3,8);
INSERT INTO t1 VALUES (4,16);
show binlog events in 'master-bin.000001' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
DROP TABLE t1;
mysql-test/suite/parts/t/partition_mdev6067.test
0 → 100644
View file @
a1ae8f9b
--
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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment