Bug #80072 NDB TEST PROGRAMS snprintf COMPILATION FAILURE
Submitted: 20 Jan 2016 11:40 Modified: 27 Jan 2016 14:58
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.5.1 OS:Any
Assigned to: CPU Architecture:Any

[20 Jan 2016 11:40] Magnus Blåudd
Description:
The NDB test programs fail to compile on Windows due to direct usage of snprintf() which is not available in all the supported versions of Visual Studio which MySQL Cluster 7.5(and earlier) supports.

From what I understand support for snprintf() has been added to VS2015 but since MySQL Cluster 7.5 still need to support being compiled with for example VS2013 we need to fix the tets programs to not use snprintf() directly.

How to repeat:
Error	11	error C3861: 'snprintf': identifier not found	d:\ade\mysql\7.5\storage\ndb\test\ndbapi\testlimits.cpp	1056	1	testLimits
Error	12	error C3861: 'snprintf': identifier not found	d:\ade\mysql\7.5\storage\ndb\test\ndbapi\testlimits.cpp	1097	1	testLimits
Error	13	error C3861: 'snprintf': identifier not found	d:\ade\mysql\7.5\storage\ndb\test\ndbapi\testlimits.cpp	1126	1	testLimits

Suggested fix:
Replace direct usage of snprintf() with the wrapper function BaseString::snprintf(). This is a portability layer function and used in several places throughout the storage/ndb/ code base.
[27 Jan 2016 14:58] Jon Stephens
Fixed in NDB 7.4.11 & 7.5.1.

Testing only--no end user changes to document.

Closed.