Bug #57088 missing SET_ERROR calls in ndb_mgm_get_version()
Submitted: 29 Sep 2010 8:16 Modified: 29 Sep 2010 12:16
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:7.0.19 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[29 Sep 2010 8:16] Magnus Blåudd
The ndb_mgm_get_version function deos not set the error message before returning with error from the function. Instead it spew out an error message to the error stream. This is not expected behaviour from a mgmapi funtion, it shoudl be possible to call ndb_mgm_get_latest_error after a failed mgmapi call and it shoudl return an error number ahnd error message.

How to repeat:

Suggested fix:
Add calls to SET_ERROR and remove the printouts.
[29 Sep 2010 8:34] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[29 Sep 2010 9:02] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.47-ndb-7.0.19 (revid:magnus.blaudd@sun.com-20100929085447-dz94ehufsz381j09) (version source revid:magnus.blaudd@sun.com-20100929085447-dz94ehufsz381j09) (merge vers: 5.1.47-ndb-7.0.19) (pib:21)
[29 Sep 2010 9:06] Magnus Blåudd
and 7.1.8
[29 Sep 2010 12:16] Jon Stephens
Documented bugfix in the NDB-7.0.19 and 7.1.8 changelogs, as follows:

        The MGM API function ndb_mgm_get_version() did not set the error
        message before returning with an error. With this fix, it is now
        possible to call ndb_mgm_get_latest_error() after a failed call
        to this functionsuch that ndb_mgm_get_latest_error() returns an
        error number and error message, as expected of MGM API calls.