| Bug #73801 | Incorrect \'state\' reported as reason for ::connect_server() failure | ||
|---|---|---|---|
| Submitted: | 4 Sep 2014 8:30 | Modified: | 11 Sep 2014 15:19 |
| Reporter: | Ole John Aske | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
| Version: | 7.1.33 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[11 Sep 2014 15:19]
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.
Documented fix in the NDB 7.1.33, 7.2.18, and 7.3.7 changelogs, as follows:
When assembling error messages of the form -Incorrect state for
node n state: node_state-, written when the transporter failed
to connect, the node state was used in place of the node ID in a
number of instances, which resulted in errors of this type for
which the node state was reported incorrectly.
Closed.
If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at
http://dev.mysql.com/doc/en/installing-source.html

Description: TransporterRegistry::connect_server() expects the Transporter to be in CONNECTING state when called. Else it will return with a failure, and format a message explaining why it failed to connect. Formating of the this message uses the utility method TransporterRegistry::getPerformStateString(NodeId nodeId) which looks up the 'state' from performStateString[] and return a textual explain if that state from performStateString[]. It is implemented as: const char *getPerformStateString(NodeId nodeId) const { return performStateString[(unsigned)performStates[nodeId]]; }; However, this method is called with a 'state' instead of the nodeId as argument a couple of places. This results in an incorrect state being described in the formated message. 'Incorrect state for node <n> state: <state desc>' How to repeat: Has to read the code