summaryrefslogtreecommitdiff
path: root/libmysql
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 /libmysql
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 'libmysql')
-rw-r--r--libmysql/client_settings.h15
-rw-r--r--libmysql/libmysql.c14
2 files changed, 1 insertions, 28 deletions
diff --git a/libmysql/client_settings.h b/libmysql/client_settings.h
index 5204d03e5af..c5a08ce1fcc 100644
--- a/libmysql/client_settings.h
+++ b/libmysql/client_settings.h
@@ -35,21 +35,6 @@ sig_handler my_pipe_sig_handler(int sig);
void read_user_name(char *name);
my_bool handle_local_infile(MYSQL *mysql, const char *net_filename);
-/*
- Let the user specify that we don't want SIGPIPE; This doesn't however work
- with threaded applications as we can have multiple read in progress.
-*/
-
-#if !defined(__WIN__) && defined(SIGPIPE) && !defined(THREAD)
-#define init_sigpipe_variables sig_return old_signal_handler=(sig_return) 0;
-#define set_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) old_signal_handler=signal(SIGPIPE, my_pipe_sig_handler)
-#define reset_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) signal(SIGPIPE,old_signal_handler);
-#else
-#define init_sigpipe_variables
-#define set_sigpipe(mysql)
-#define reset_sigpipe(mysql)
-#endif
-
void mysql_read_default_options(struct st_mysql_options *options,
const char *filename,const char *group);
void mysql_detach_stmt_list(LIST **stmt_list, const char *func_name);
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index c498ed0f089..f802387cf9a 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -51,7 +51,7 @@
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
-#if defined(THREAD) && !defined(__WIN__)
+#if !defined(__WIN__)
#include <my_pthread.h> /* because of signal() */
#endif
#ifndef INADDR_NONE
@@ -172,10 +172,8 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
result= init_embedded_server(argc, argv, groups);
#endif
}
-#ifdef THREAD
else
result= (int)my_thread_init(); /* Init if new thread */
-#endif
return result;
}
@@ -229,18 +227,12 @@ MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void)
my_bool STDCALL mysql_thread_init()
{
-#ifdef THREAD
return my_thread_init();
-#else
- return 0;
-#endif
}
void STDCALL mysql_thread_end()
{
-#ifdef THREAD
my_thread_end();
-#endif
}
@@ -1092,11 +1084,7 @@ void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo)
uint STDCALL mysql_thread_safe(void)
{
-#ifdef THREAD
return 1;
-#else
- return 0;
-#endif
}