Hi Magne,
On 1/4/11 11:43 AM, Magne Mahre wrote:
> #At file:///export/home/tmp/x/mysql-trunk-nothread/ based on
> revid:tor.didriksen@stripped
>
> 3455 Magne Mahre 2011-01-04
> Remove configuration preprocessor symbols 'THREAD'
> and 'THREAD_SAFE_CLIENT'.
OK to push. Some minor comments below.
> 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.
[..]
> === modified file 'dbug/dbug_analyze.c'
> --- a/dbug/dbug_analyze.c 2010-07-15 11:16:06 +0000
> +++ b/dbug/dbug_analyze.c 2011-01-04 13:43:28 +0000
> @@ -571,12 +571,9 @@ int main (int argc, char **argv)
> FILE *infile;
> FILE *outfile = {stdout};
>
> -#ifdef THREAD
> #if defined(HAVE_PTHREAD_INIT)
> pthread_init(); /* Must be called before DBUG_ENTER */
> #endif
> - my_thread_global_init();
Removed by mistake or not needed anymore?
> -#endif /* THREAD */
> {
> DBUG_ENTER ("main");
> DBUG_PROCESS (argv[0]);
>
[..]
> === modified file 'include/my_global.h'
> --- a/include/my_global.h 2010-12-20 10:28:06 +0000
> +++ b/include/my_global.h 2011-01-04 13:43:28 +0000
> @@ -212,13 +212,6 @@
> #include<sys/types.h>
> #endif
>
> -/* The client defines this to avoid all thread code */
> -#if defined(MYSQL_CLIENT_NO_THREADS) || defined(UNDEF_THREADS_HACK)
Please, also remove a left over usage of MYSQL_CLIENT_NO_THREADS in:
cmd-line-utils/readline/CMakeLists.txt
> -#undef THREAD
> -#undef HAVE_LINUXTHREADS
> -#undef HAVE_NPTL
> -#endif
> -
> #ifdef HAVE_THREADS_WITHOUT_SOCKETS
> /* MIT pthreads does not work with unix sockets */
> #undef HAVE_SYS_UN_H
> @@ -261,7 +254,7 @@
> #endif
> #endif
>
> -#if defined(THREAD)&& !defined(__WIN__)
> +#if !defined(__WIN__)
If you have time to spare, take the opportunity and change __WIN__ to
_WIN32 where its touched.
[..]
> === modified file 'include/my_sys.h'
> --- a/include/my_sys.h 2011-01-03 15:05:36 +0000
> +++ b/include/my_sys.h 2011-01-04 13:43:28 +0000
> @@ -41,11 +41,7 @@ typedef struct my_aio_result {
> # define MEM_CHECK_DEFINED(a,len) ((void) 0)
> #endif /* HAVE_VALGRIND */
>
> -#ifndef THREAD
> -extern int my_errno; /* Last error in mysys */
> -#else
> #include<my_pthread.h>
> -#endif
>
> #include<m_ctype.h> /* for CHARSET_INFO */
> #include<stdarg.h>
> @@ -308,7 +304,7 @@ struct st_my_file_info
> int oflag; /* open flags, e.g O_APPEND */
> #endif
> enum file_type type;
> -#if defined(THREAD)&& !defined(HAVE_PREAD)&& !defined(_WIN32)
> +#if !defined(HAVE_PREAD)&& !defined(_WIN32)
> mysql_mutex_t mutex;
> #endif
> };
> @@ -328,9 +324,7 @@ typedef struct st_my_tmpdir
> DYNAMIC_ARRAY full_list;
> char **list;
> uint cur, max;
> -#ifdef THREAD
> mysql_mutex_t mutex;
> -#endif
> } MY_TMPDIR;
>
> typedef struct st_dynamic_string
> @@ -342,7 +336,6 @@ typedef struct st_dynamic_string
> struct st_io_cache;
> typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*);
>
> -#ifdef THREAD
> typedef struct st_io_cache_share
> {
> mysql_mutex_t mutex; /* To sync on reads into buffer. */
> @@ -362,7 +355,6 @@ typedef struct st_io_cache_share
> my_bool alloced;
> #endif
> } IO_CACHE_SHARE;
> -#endif
>
> typedef struct st_io_cache /* Used when cacheing files */
> {
> @@ -403,7 +395,7 @@ typedef struct st_io_cache /* Used when
> WRITE_CACHE, and&read_pos and&read_end respectively otherwise
> */
> uchar **current_pos, **current_end;
> -#ifdef THREAD
> +
> /*
> The lock is for append buffer used in SEQ_READ_APPEND cache
> need mutex copying from append buffer to read buffer.
> @@ -417,7 +409,7 @@ typedef struct st_io_cache /* Used when
> READ_CACHE mode is supported.
> */
> IO_CACHE_SHARE *share;
> -#endif
> +
> /*
> A caller will use my_b_read() macro to read from the cache
> if the data is already in cache, it will be simply copied with
> @@ -653,13 +645,8 @@ extern int my_redel(const char *from, co
> extern int my_copystat(const char *from, const char *to, int MyFlags);
> extern char * my_filename(File fd);
>
> -#ifndef THREAD
> -extern void dont_break(void);
> -extern void allow_break(void);
> -#else
> #define dont_break()
> #define allow_break()
Please, remove those defines and any usage of them.
[..]
>
> === modified file 'libmysql/client_settings.h'
> --- a/libmysql/client_settings.h 2010-08-09 08:32:50 +0000
> +++ b/libmysql/client_settings.h 2011-01-04 13:43:28 +0000
> @@ -40,15 +40,9 @@ my_bool handle_local_infile(MYSQL *mysql
> 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)
Please, remove those defines and any usage of them.
Otherwise, looks good. Thanks for working on this.
Regards,
Davi