summaryrefslogtreecommitdiff
path: root/sql-common/client.c
diff options
context:
space:
mode:
authorMagne Mahre <magne.mahre@oracle.com>2011-01-11 10:07:37 +0100
committerMagne Mahre <magne.mahre@oracle.com>2011-01-11 10:07:37 +0100
commitebd24626ca38e7fa1e3da2acdcf88540be70fabe (patch)
tree5aa89e155e701ad4709cbd1e6a9efc5b5f1bb755 /sql-common/client.c
parentf6bcd9c6c5d860c9a6ad1b6411ffa9f48ed685c9 (diff)
downloadmariadb-git-ebd24626ca38e7fa1e3da2acdcf88540be70fabe.tar.gz
Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'. As of MySQL 5.5, we no longer support non-threaded builds. This patch removes all references to the obsolete THREAD and THREAD_SAFE_CLIENT preprocessor symbols. These were used to distinguish between threaded and non-threaded builds.
Diffstat (limited to 'sql-common/client.c')
-rw-r--r--sql-common/client.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 3bb626e824a..354c04b717b 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -24,7 +24,6 @@
mysql_real_connect()
- Support for reading local file with LOAD DATA LOCAL
- SHARED memory handling
- - Protection against sigpipe
- Prepared statements
- Things that only works for the server
@@ -70,9 +69,9 @@ my_bool net_flush(NET *net);
#include "mysqld_error.h"
#include "errmsg.h"
#include <violite.h>
-#if defined(THREAD) && !defined(__WIN__)
+#if !defined(__WIN__)
#include <my_pthread.h> /* because of signal() */
-#endif /* defined(THREAD) && !defined(__WIN__) */
+#endif /* !defined(__WIN__) */
#include <sys/stat.h>
#include <signal.h>
@@ -287,7 +286,7 @@ static int wait_for_data(my_socket fd, uint timeout)
{
tv.tv_sec = (long) timeout;
tv.tv_usec = 0;
-#if defined(HPUX10) && defined(THREAD)
+#if defined(HPUX10)
if ((res = select(fd+1, NULL, (int*) &sfds, NULL, &tv)) > 0)
break;
#else
@@ -731,13 +730,9 @@ cli_safe_read(MYSQL *mysql)
{
NET *net= &mysql->net;
ulong len=0;
- init_sigpipe_variables
- /* Don't give sigpipe errors if the client doesn't want them */
- set_sigpipe(mysql);
if (net->vio != 0)
len=my_net_read(net);
- reset_sigpipe(mysql);
if (len == packet_error || len == 0)
{
@@ -817,13 +812,9 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
{
NET *net= &mysql->net;
my_bool result= 1;
- init_sigpipe_variables
my_bool stmt_skip= stmt ? stmt->state != MYSQL_STMT_INIT_DONE : FALSE;
DBUG_ENTER("cli_advanced_command");
- /* Don't give sigpipe errors if the client doesn't want them */
- set_sigpipe(mysql);
-
if (mysql->net.vio == 0)
{ /* Do reconnect if possible */
if (mysql_reconnect(mysql) || stmt_skip)
@@ -872,7 +863,6 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
result= ((mysql->packet_length=cli_safe_read(mysql)) == packet_error ?
1 : 0);
end:
- reset_sigpipe(mysql);
DBUG_PRINT("exit",("result: %d", result));
DBUG_RETURN(result);
}
@@ -1089,14 +1079,11 @@ void end_server(MYSQL *mysql)
DBUG_ENTER("end_server");
if (mysql->net.vio != 0)
{
- init_sigpipe_variables
DBUG_PRINT("info",("Net: %s", vio_description(mysql->net.vio)));
#ifdef MYSQL_SERVER
slave_io_thread_detach_vio();
#endif
- set_sigpipe(mysql);
vio_delete(mysql->net.vio);
- reset_sigpipe(mysql);
mysql->net.vio= 0; /* Marker */
mysql_prune_stmt_list(mysql);
}
@@ -2939,7 +2926,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
#ifdef HAVE_SYS_UN_H
struct sockaddr_un UNIXaddr;
#endif
- init_sigpipe_variables
DBUG_ENTER("mysql_real_connect");
DBUG_PRINT("enter",("host: %s db: %s user: %s (client)",
@@ -2954,8 +2940,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
DBUG_RETURN(0);
}
- /* Don't give sigpipe errors if the client doesn't want them */
- set_sigpipe(mysql);
mysql->methods= &client_methods;
net->vio = 0; /* If something goes wrong */
mysql->client_flag=0; /* For handshake */
@@ -3465,11 +3449,9 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
#endif
DBUG_PRINT("exit", ("Mysql handler: 0x%lx", (long) mysql));
- reset_sigpipe(mysql);
DBUG_RETURN(mysql);
error:
- reset_sigpipe(mysql);
DBUG_PRINT("error",("message: %u/%s (%s)",
net->last_errno,
net->sqlstate,