close_socket() is not declared in -DHAVE_PURIFY builds

Bug #1203567 reported by Vlad Lesin on 2013-07-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Status tracked in 5.6
5.1
Undecided
Unassigned
5.5
Medium
Sergei Glushchenko
5.6
Medium
Sergei Glushchenko

Bug Description

The following options are used for cmake to build PS-5.6:

CFLAGS="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -O0 -g3 -gdwarf-2" CXXFLAGS="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -O0 -g3 -gdwarf-2" cmake .. -DCMAKE_VERBOSE_MAKEFILE=true -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DENABLE_DTRACE=OFF -DENABLE_DOWNLOADS=1 -DWITH_DEBUG=1

The following error takes place:

Percona-Server/sql/mysqld.cc: In function ‘void close_server_sock()’:
Percona-Server/sql/mysqld.cc:1497:12: error: ‘ip_sock’ was not declared in this scope
Percona-Server/sql/mysqld.cc:1499:38: error: ‘close_socket’ was not declared in this scope

The reason is in the following code:
static void close_server_sock()
{
#ifdef HAVE_CLOSE_SERVER_SOCK
  DBUG_ENTER("close_server_sock");
  MYSQL_SOCKET tmp_sock;
  tmp_sock=ip_sock;

  close_socket(base_ip_sock, "TCP/IP");
  close_socket(extra_ip_sock, "TCP/IP");
  close_socket(unix_sock, "unix/IP");

  if (mysql_socket_getfd(unix_sock) != INVALID_SOCKET)
    (void) unlink(mysqld_unix_port);
  base_ip_sock= extra_ip_sock= unix_sock= MYSQL_INVALID_SOCKET;

  DBUG_VOID_RETURN;
#endif
}

tmp_sock is not used so it can be removed and mysql_socket_close() could be used instead of close_socket() to fix the bug.

Related branches

lp:~sergei.glushchenko/percona-server/5.5-ps-bug1203567
Merged into lp:percona-server/5.5 at revision 586
Stewart Smith (community): Approve on 2013-10-17
George Ormond Lorch III: Approve (g2) on 2013-08-20
Superseded for merging into lp:percona-server
Percona core: Pending requested 2013-07-25
lp:~sergei.glushchenko/percona-server/5.6-ps-bug1203567
Merged into lp:percona-server at revision 478
Stewart Smith (community): Approve on 2013-10-17
George Ormond Lorch III: Approve (g2) on 2013-08-20

Must be due to threadpool changes. Sergei, can you take a look?

Changed in percona-server:
assignee: nobody → Sergei Glushchenko (sergei.glushchenko)

This happens when built with -D DHAVE_purify

summary: - close_socket() is not declared
+ close_socket() is not declared in -DHAVE_PURIFY builds
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers