Bug #41918 Error in sql/mysqld.cc using libwrap
Submitted: 7 Jan 2009 11:07 Modified: 9 Jan 2009 9:48
Reporter: Cyril SCETBON Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1.30-ndb-6.4.0-innodb OS:Linux (debian etch)
Assigned to: CPU Architecture:Any
Tags: cluster, code, Contribution, mysq

[7 Jan 2009 11:07] Cyril SCETBON
Description:
There are errors in the code available at ftp://ftp.mysql.com/pub/mysql/download/cluster_telco/mysql-5.1.30-ndb-6.4.0/

How to repeat:
none

Suggested fix:
none
[7 Jan 2009 11:09] Cyril SCETBON
Patch for mysqld.cc

Attachment: mysqld.cc.patch (text/x-diff), 736 bytes.

[7 Jan 2009 11:11] Cyril SCETBON
this bug is raised when compiling with libwrap
[8 Jan 2009 8:14] Tomas Ulin
Cyril,

This code in this place is the same as in the regular 5.1.30 server release.

Have you not had the issue there as well?  Or have you not tried?

BR,

Tomas
[8 Jan 2009 9:47] Cyril SCETBON
I've just tried. It works cause they change the definition of my_socket type.

In the cluster version it's

include/my_socket_posix.h -> typedef struct { int fd; } my_socket;

whereas in the standard version it's :

include/mysql.h -> typedef int my_socket;

So you can keep the code and change the definition as they did
[8 Jan 2009 10:27] Tomas Ulin
Can you try this patch instead, it is more correct

Attachment: mysqld.cc.patch2 (application/octet-stream, text), 1.20 KiB.

[8 Jan 2009 11:04] Cyril SCETBON
my_close_socket is not defined in the sources (last modified 22.12.2008 19:27:00)
[8 Jan 2009 11:18] Tomas Ulin
sorry, got the words flipped, this should work better

Attachment: mysqld.cc.patch3 (application/octet-stream, text), 1.20 KiB.

[8 Jan 2009 16:38] Bugs System
Pushed into 5.1.30-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090108163713-qghqs0tmss06oug1) (version source revid:tomas.ulin@sun.com-20090108163713-qghqs0tmss06oug1) (merge vers: 5.1.30-ndb-6.4.1) (pib:6)
[8 Jan 2009 16:38] Tomas Ulin
fixed in 6.4.1
[9 Jan 2009 9:47] Cyril SCETBON
this is what I get when trying to compile on X86_64 with libwrap :

g++ -O3 -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o .libs/testConfig testConfig.o InitConfigFileParser.o ConfigInfo.o Config.o ../../../../storage/ndb/src/mgmclient/.libs/CommandInterpreter.o  ../../../../storage/ndb/src/.libs/libndbclient.so lpthread ../../../../dbug/.libs/libdbuglt.a lpthread ../../../../mysys/.libs/libmysyslt.a -lpthread ../../../../strings/.libs/libmystringslt.a -lpthread ../../../../cmd-line-utils/libedit/libedit.a -lncurses -lrt -lpthread -lcrypt -lnsl -lm -lpthread  -Wl,--rpath -Wl,/usr/local/lib/mysql
../../../../storage/ndb/src/.libs/libndbclient.so: undefined reference to `hosts_access'
../../../../storage/ndb/src/.libs/libndbclient.so: undefined reference to `sock_host'
../../../../storage/ndb/src/.libs/libndbclient.so: undefined reference to `eval_client'
collect2: ld returned 1 exit status
make[4]: *** [testConfig] Error 1

I get no error if I don't compile with libwrap enabled.
[9 Jan 2009 9:48] Jon Stephens
Documented in the NDB-6.4.1 changelog as follows:

        MySQL Cluster would not compile when using libwrap. This issue 
        was known to occur only in MySQL Cluster NDB 6.4.0.
[9 Jan 2009 9:55] 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/62782

3197 Tomas Ulin	2009-01-08
      Bug #41918  Error in sql/mysqld.cc using libwrap
[9 Jan 2009 11:05] 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/62796

3197 Tomas Ulin	2009-01-08
      Bug #41918  Error in sql/mysqld.cc