Bug #17582 ndb_config host lookups broken
Submitted: 20 Feb 2006 13:23 Modified: 2 Nov 2006 4:54
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1 and up OS:Any (*)
Assigned to: Hartmut Holzgraefe CPU Architecture:Any

[20 Feb 2006 13:23] Hartmut Holzgraefe
Description:
The ndb_config --host option does not perform the 
intended host name lookups, instead it just compares
host names from the configuration file to the --host 
parameter using simple string compare

this makes ndb_config useless for init scripts as
one can't rely on "ndb_config --host=`hostname` ..."
to return configuration settings for a machine

How to repeat:
use "ndb_config --host=... ..." using a different hostname 
for a node machine than the one used in the management
servers config file, although it does match the same address,
e.g. IP address vs. host name or full vs. short host name

Suggested fix:
use gethostbyname() and compare the resulting address
for hostnames instead of simple string compare
[20 Feb 2006 13:51] 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:

  http://lists.mysql.com/commits/2908
[30 Aug 2006 18:45] 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:

  http://lists.mysql.com/commits/11107

ChangeSet@1.2250, 2006-08-30 20:45:43+02:00, hartmut@mysql.com +1 -0
  make DNS based hostname queries work (bug #17582)
[1 Sep 2006 19:25] Jonas Oreland
pushed to 5.0.25
[13 Sep 2006 8:00] Timothy Smith
Merged into 5.1.12
[13 Sep 2006 9:24] Hartmut Holzgraefe
My patch uncovered a different errer that was hidden in the method that was never called so far ... will commit another fix soon (and will include test cases this time)
[13 Sep 2006 21:19] 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:

  http://lists.mysql.com/commits/11892

ChangeSet@1.2261, 2006-09-13 23:19:18+02:00, hartmut@mysql.com +3 -0
  Fixed host name comparison (still Bug #17582)
[13 Sep 2006 22:12] 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:

  http://lists.mysql.com/commits/11900

ChangeSet@1.2263, 2006-09-14 00:12:17+02:00, hartmut@mysql.com +1 -0
  Changed to use NdbAutoPtr instead of explicit free() calls 
  as suggested by Jonas (still Bug #17582)
[10 Oct 2006 18:25] Jonas Oreland
pushed into 5.1.12
[1 Nov 2006 14:31] Jonas Oreland
pushed into 5.0.29
[1 Nov 2006 14:31] Jonas Oreland
wont fix in 4.1
[2 Nov 2006 4:54] 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.

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

Documented for 5.0.29 & 5.1.12.
[4 Nov 2006 3:07] Jon Stephens
*Fix for 5.0 documented in 5.0.30 Release Notes.*