|
132 | 132 |
|
133 | 133 | #define mysqld_charset &my_charset_latin1
|
134 | 134 |
|
135 |
| -/* We have HAVE_valgrind below as this speeds up the shutdown of MySQL */ |
136 |
| - |
137 |
| -#if defined(HAVE_valgrind) && defined(__linux__) |
138 |
| -#define HAVE_CLOSE_SERVER_SOCK 1 |
139 |
| -#endif |
140 | 135 |
|
141 | 136 | extern "C" { // Because of SCO 3.2V4.2
|
142 | 137 | #include <sys/stat.h>
|
@@ -1493,7 +1488,6 @@ static int test_if_case_insensitive(const char *dir_name);
|
1493 | 1488 | static bool pid_file_created= false;
|
1494 | 1489 | static void usage(void);
|
1495 | 1490 | static void start_signal_handler(void);
|
1496 |
| -static void close_server_sock(); |
1497 | 1491 | static void clean_up_mutexes(void);
|
1498 | 1492 | static void wait_for_signal_thread_to_end(void);
|
1499 | 1493 | static void create_pid_file();
|
@@ -1633,7 +1627,6 @@ static void break_connect_loop()
|
1633 | 1627 | if (error != 0 && error != ETIMEDOUT && !count++)
|
1634 | 1628 | sql_print_error("Got error %d from mysql_cond_timedwait", error);
|
1635 | 1629 | #endif
|
1636 |
| - close_server_sock(); |
1637 | 1630 | }
|
1638 | 1631 | mysql_mutex_unlock(&LOCK_start_thread);
|
1639 | 1632 | #endif /* __WIN__ */
|
@@ -1770,42 +1763,6 @@ static void close_connections(void)
|
1770 | 1763 | DBUG_VOID_RETURN;
|
1771 | 1764 | }
|
1772 | 1765 |
|
1773 |
| - |
1774 |
| -#ifdef HAVE_CLOSE_SERVER_SOCK |
1775 |
| -static void close_socket(MYSQL_SOCKET sock, const char *info) |
1776 |
| -{ |
1777 |
| - DBUG_ENTER("close_socket"); |
1778 |
| - |
1779 |
| - DBUG_PRINT("info", ("calling shutdown on %s socket", info)); |
1780 |
| - (void) mysql_socket_shutdown(sock, SHUT_RDWR); |
1781 |
| - DBUG_VOID_RETURN; |
1782 |
| -} |
1783 |
| -#endif |
1784 |
| - |
1785 |
| - |
1786 |
| -static void close_server_sock() |
1787 |
| -{ |
1788 |
| -#ifdef HAVE_CLOSE_SERVER_SOCK |
1789 |
| - DBUG_ENTER("close_server_sock"); |
1790 |
| - |
1791 |
| - mysql_mutex_assert_owner(&LOCK_start_thread); |
1792 |
| - for (uint i= 0 ; i < listen_sockets.elements() ; i++) |
1793 |
| - { |
1794 |
| - MYSQL_SOCKET *sock= listen_sockets.get_pos(i); |
1795 |
| - if (sock->is_unix_domain_socket) |
1796 |
| - { |
1797 |
| - close_socket(*sock, "unix/IP"); |
1798 |
| - (void) unlink(mysqld_unix_port); |
1799 |
| - } |
1800 |
| - else |
1801 |
| - close_socket(*sock, "TCP/IP"); |
1802 |
| - } |
1803 |
| - listen_sockets.free_memory(); |
1804 |
| - |
1805 |
| - DBUG_VOID_RETURN; |
1806 |
| -#endif |
1807 |
| -} |
1808 |
| - |
1809 | 1766 | #endif /*EMBEDDED_LIBRARY*/
|
1810 | 1767 |
|
1811 | 1768 |
|
|
0 commit comments