Bug #67018 MySQL 5.6 fails to build with libwrap support enabled
Submitted: 30 Sep 2012 0:38 Modified: 28 Feb 2013 16:03
Reporter: Brad Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.6 OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[30 Sep 2012 0:38] Brad Smith
Description:
MySQL 5.6 fails to build with libwrap support enabled.

sql/mysqld.cc: In function 'void handle_connections_sockets()':
sql/mysqld.cc:6202: error: 'connection_tcpwrap_errors' was not declared in this scope

which on line 6202 is..

          statistic_increment(connection_tcpwrap_errors, &LOCK_status);

but there is no variable connection_tcpwrap_errors and the other associated code with keeping track of the number of connection errors there are from libwrap.

How to repeat:
Build MySQL with libwrap support.

Suggested fix:
Add the missing code after the statistic counters were added.
[1 Oct 2012 1:41] MySQL Verification Team
libwrap enabled

Attachment: libwrap.png (image/png, text), 442.34 KiB.

[1 Oct 2012 1:46] MySQL Verification Team
I can't repeat on Centos 6.3 64-bits compiling 5.6.7 source package.

Scanning dependencies of target my_safe_process
[100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o
Linking CXX executable my_safe_process
[100%] Built target my_safe_process
[miguel@CENTOS63 mysql-5.6.7-rc]$ sql/mysql
mysqld               mysql_tzinfo_to_sql
[miguel@CENTOS63 mysql-5.6.7-rc]$ sql/mysqld --version
sql/mysqld  Ver 5.6.7-rc for Linux on x86_64 (Source distribution)
[miguel@CENTOS63 mysql-5.6.7-rc]$
[1 Oct 2012 1:55] Brad Smith
The screenshot and info you posted doesn't prove it is even enabled during the build. You're doing something wrong.
[1 Oct 2012 2:32] Brad Smith
Wow. Incompetence at Oracle.
[18 Dec 2012 0:04] Nathan Rennie-Waldock
I can repeat on Ubuntu 12.04 64bit with MySQL 5.6.9. The variables were renamed a  while back but that line was missed. It should be connection_errors_tcpwrap, and not connection_tcpwrap_errors.
[18 Dec 2012 0:34] Brad Smith
Nathan, thanks for pointing that out. You are correct.
[11 Feb 2013 13:34] Bjoern Boschman
I don't know why this bugreport is closed?
this issue is still open with 5.6.10
[11 Feb 2013 18:20] Norvald Ryeng
Reopened on request from user.
[11 Feb 2013 19:40] Bjoern Boschman
Patch created based on description of this bugreport

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: mysql-bug.67018.patch (application/octet-stream, text), 585 bytes.

[28 Feb 2013 16:03] Paul DuBois
Noted in 5.6.11, 5.7.1 changelogs.

MySQL failed to build if configured with WITH_LIBWRAP enabled.