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
40215a9e
Commit
40215a9e
authored
Jul 19, 2015
by
Kristian Nielsen
Browse files
Options
Browse Files
Download
Plain Diff
Merge MDEV-8496 into 10.0
parents
12da27da
44c4b230
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
1 deletion
+68
-1
mysql-test/suite/multi_source/gtid_ignore_duplicates.result
mysql-test/suite/multi_source/gtid_ignore_duplicates.result
+33
-0
mysql-test/suite/multi_source/gtid_ignore_duplicates.test
mysql-test/suite/multi_source/gtid_ignore_duplicates.test
+34
-0
sql/rpl_gtid.cc
sql/rpl_gtid.cc
+1
-1
No files found.
mysql-test/suite/multi_source/gtid_ignore_duplicates.result
View file @
40215a9e
...
...
@@ -381,6 +381,39 @@ a
50
SET GLOBAL slave_exec_mode=@old_slave_mode;
SET GLOBAL gtid_strict_mode=@old_strict;
*** MDEV-8496: gtid_ignore_duplicates treats gtid_seq_no as 32-bit ***
SET @old_domain= @@SESSION.gtid_domain_id;
SET SESSION gtid_domain_id=102;
SET SESSION gtid_seq_no=4294967294;
INSERT INTO t1 VALUES (60);
INSERT INTO t1 VALUES (61);
INSERT INTO t1 VALUES (62);
SET SESSION gtid_domain_id= @old_domain;
include/save_master_gtid.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
a
60
61
62
SET default_master_connection = "c2b";
include/sync_with_master_gtid.inc
SET default_master_connection = "a2b";
include/sync_with_master_gtid.inc
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
a
60
61
62
SET default_master_connection = "b2c";
include/sync_with_master_gtid.inc
SET default_master_connection = "a2c";
include/sync_with_master_gtid.inc
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
a
60
61
62
SET GLOBAL gtid_domain_id=0;
STOP ALL SLAVES;
Warnings:
...
...
mysql-test/suite/multi_source/gtid_ignore_duplicates.test
View file @
40215a9e
...
...
@@ -366,6 +366,40 @@ SET GLOBAL slave_exec_mode=@old_slave_mode;
SET
GLOBAL
gtid_strict_mode
=@
old_strict
;
--
echo
***
MDEV
-
8496
:
gtid_ignore_duplicates
treats
gtid_seq_no
as
32
-
bit
***
--
connection
server_1
SET
@
old_domain
=
@@
SESSION
.
gtid_domain_id
;
SET
SESSION
gtid_domain_id
=
102
;
SET
SESSION
gtid_seq_no
=
4294967294
;
INSERT
INTO
t1
VALUES
(
60
);
INSERT
INTO
t1
VALUES
(
61
);
INSERT
INTO
t1
VALUES
(
62
);
# The bug was an overflow, the seq_no value 4294967296 (2**32) was treated
# as 0, causing the last transaction to be ignored.
SET
SESSION
gtid_domain_id
=
@
old_domain
;
--
source
include
/
save_master_gtid
.
inc
--
connection
server_4
--
source
include
/
sync_with_master_gtid
.
inc
SELECT
*
FROM
t1
WHERE
a
>=
60
ORDER
BY
a
;
--
connection
server_2
SET
default_master_connection
=
"c2b"
;
--
source
include
/
sync_with_master_gtid
.
inc
SET
default_master_connection
=
"a2b"
;
--
source
include
/
sync_with_master_gtid
.
inc
SELECT
*
FROM
t1
WHERE
a
>=
60
ORDER
BY
a
;
--
connection
server_3
SET
default_master_connection
=
"b2c"
;
--
source
include
/
sync_with_master_gtid
.
inc
SET
default_master_connection
=
"a2c"
;
--
source
include
/
sync_with_master_gtid
.
inc
SELECT
*
FROM
t1
WHERE
a
>=
60
ORDER
BY
a
;
# Clean up.
--
connection
server_1
SET
GLOBAL
gtid_domain_id
=
0
;
...
...
sql/rpl_gtid.cc
View file @
40215a9e
...
...
@@ -117,7 +117,7 @@ int
rpl_slave_state
::
check_duplicate_gtid
(
rpl_gtid
*
gtid
,
rpl_group_info
*
rgi
)
{
uint32
domain_id
=
gtid
->
domain_id
;
uint
32
seq_no
=
gtid
->
seq_no
;
uint
64
seq_no
=
gtid
->
seq_no
;
rpl_slave_state
::
element
*
elem
;
int
res
;
bool
did_enter_cond
=
false
;
...
...
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