summaryrefslogtreecommitdiff
path: root/sql/rpl_gtid.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-06-20 09:04:44 +0200
committerunknown <knielsen@knielsen-hq.org>2013-06-20 09:04:44 +0200
commit03fb90f3a770bceca743c26533af4d99c8fa9549 (patch)
treeedc36b9bc70dc7b17569cd379bd17963d339d80e /sql/rpl_gtid.cc
parent35360ec452bbd5b7f4068859f524e98641bbbf50 (diff)
downloadmariadb-git-03fb90f3a770bceca743c26533af4d99c8fa9549.tar.gz
MDEV-4686: Temporary variable for sub_id is 32-bit, should be 64-bit
Fix wrong type for sub_id, which would cause overflow grief on long-running server. Also some related renames for consistency.
Diffstat (limited to 'sql/rpl_gtid.cc')
-rw-r--r--sql/rpl_gtid.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc
index 71b18e64842..d8e79c1e002 100644
--- a/sql/rpl_gtid.cc
+++ b/sql/rpl_gtid.cc
@@ -462,9 +462,9 @@ end:
uint64
-rpl_slave_state::next_subid(uint32 domain_id)
+rpl_slave_state::next_sub_id(uint32 domain_id)
{
- uint32 sub_id= 0;
+ uint64 sub_id= 0;
element *elem;
lock();
@@ -722,7 +722,7 @@ rpl_slave_state::load(THD *thd, char *state_from_master, size_t len,
uint64 sub_id;
if (gtid_parser_helper(&state_from_master, end, &gtid) ||
- !(sub_id= next_subid(gtid.domain_id)) ||
+ !(sub_id= next_sub_id(gtid.domain_id)) ||
record_gtid(thd, &gtid, sub_id, false, in_statement) ||
update(gtid.domain_id, gtid.server_id, sub_id, gtid.seq_no))
return 1;