[MXS-1641] Fix overflow in master id Created: 2018-02-01  Updated: 2018-02-02  Resolved: 2018-02-02

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: 2.2.1
Fix Version/s: 2.2.2

Type: Bug Priority: Major
Reporter: Johan Wikman Assignee: Esa Korhonen
Resolution: Fixed Votes: 0
Labels: None


 Description   

If the server id is larger than the maximum positive value of a 32-bit integer, there will be an overflow inside MaxScale.

The server id should be 64-bit everywhere.



 Comments   
Comment by Esa Korhonen [ 2018-02-02 ]

Good find. The server id is actually 32bits, but unsigned (0-2^32 - 1). The monitor used an int and parsed with the atoi(), causing numbers > 2^31 to appear negative. In any case, now a 64bit int is used to allow -1 as special value.

Generated at Thu Feb 08 04:08:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.