Bug #68796 Out-of-range backup IDs are truncated silently
Submitted: 27 Mar 2013 13:45 Modified: 27 Jun 2013 21:31
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:<= 7.2.10 OS:Linux
Assigned to: CPU Architecture:Any

[27 Mar 2013 13:45] Hartmut Holzgraefe
Description:
When using a datetime string in the form of YYYYMMDDhhmmss as backup id, which turns out as e.g. 201303271430, a bit larger than 2^37, the backup id is accepted without warning even though it is out of the valid 32bit range and gets truncated to 3734775814 (which is the result of 201303271430 & 0xFFFFFFFF)

How to repeat:
-- NDB Cluster -- Management Client --
ndb_mgm> START BACKUP 201303271430 WAIT COMPLETED
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
Node 2: Backup 3734775814 started from node 1
Node 2: Backup 3734775814 started from node 1 completed
 StartGCP: 763 StopGCP: 766
 #Records: 2056 #LogRecords: 0
 Data: 51304 bytes Log: 0 bytes

Suggested fix:
Do not accept IDs out of the valid range, give an appropriate error message instead.

PS: the 5.1 version of the manual page on cluster backup mentions the valid range of IDs before and after the fix of bug #43042, in the 5.5 version of the documentation any mention of the valid range seems to be gone completely though?

See  http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-backup-using-management-client.html and http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-backup-using-management-client.html
[27 Mar 2013 17:11] Hartmut Holzgraefe
Version should of course have been <=7.2.10, not >= ... fixed ...
[2 Apr 2013 7:22] MySQL Verification Team
Hello Hartmut,

Thank you for the report.
Verified as described.

Thanks,
Umesh
[27 Jun 2013 21:31] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

Fixed in NDB 7.0+. Documented as follows in the NDB 7.0.39, 7.1.28, 7.2.14, and 7.3.3 changelogs:

        When trying to specify a backup ID greater than the maximum 
        allowed, the value was silently truncated.

Closed.