Bug #121956 IGNORE_SERVER_IDS accepts server ID above 32-bit maximum
Description:
CHANGE REPLICATION SOURCE TO accepts and persists 4294967296 in IGNORE_SERVER_IDS, although this is one greater than the maximum server ID.
The MySQL 26.10 Reference Manual, “Replication and Binary Logging Options and Variables,” states:
“For servers that are used in a replication topology, you must specify a unique server ID for each replication server, in the range from 1 to 2^32 − 1.”
The statement completed successfully. The channel was present in performance_schema.replication_connection_configuration, and SHOW REPLICA STATUS displayed:
Replicate_Ignore_Server_Ids: 4294967296
Server IDs in replication events are 32-bit values, so this persisted value cannot identify an originating server ID and should be rejected.
How to repeat:
Start the server with --gtid-mode=ON --enforce-gtid-consistency=ON and run as root:
SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE;
CHANGE REPLICATION SOURCE TO
SOURCE_HOST = '127.0.0.1',
SOURCE_USER = 'u1',
IGNORE_SERVER_IDS = (4294967296)
FOR CHANNEL 'ch1';
SELECT CHANNEL_NAME
FROM performance_schema.replication_connection_configuration
WHERE CHANNEL_NAME = 'ch1';
-- Observed: ch1
-- Expected: CHANGE REPLICATION SOURCE TO rejects 4294967296 and no channel is created.
SHOW REPLICA STATUS FOR CHANNEL 'ch1';
-- Observed: Replicate_Ignore_Server_Ids is 4294967296.
RESET REPLICA ALL FOR CHANNEL 'ch1';
SET @@GLOBAL.GTID_MODE = ON;
Suggested fix:
Validate each IGNORE_SERVER_IDS value before persistence and reject values greater than 4294967295.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.