close_socket() is not declared in -DHAVE_PURIFY builds

Bug #1203567 reported by Vlad Lesin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Sergei Glushchenko
5.1
Invalid
Undecided
Unassigned
5.5
Fix Released
Medium
Sergei Glushchenko
5.6
Fix Released
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

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Changed in percona-server:
assignee: nobody → Sergei Glushchenko (sergei.glushchenko)
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

This happens when built with -D DHAVE_purify

summary: - close_socket() is not declared
+ close_socket() is not declared in -DHAVE_PURIFY builds
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1398

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.