2772 Vladislav Vaintroub 2008-12-05 [merge]
- merge BUG#38522 from 5.1
- revert BUG#41103
modified:
client/mysql.cc
client/mysqltest.c
dbug/dbug.c
include/m_ctype.h
include/m_string.h
include/my_dbug.h
include/my_global.h
include/my_sys.h
include/mysql.h
libmysql/libmysql.c
libmysql/libmysql.def
libmysqld/examples/CMakeLists.txt
libmysqld/lib_sql.cc
libmysqld/libmysqld.c
libmysqld/libmysqld.def
mysys/my_fopen.c
mysys/my_thr_init.c
sql/mysql_priv.h
sql/mysqld.cc
sql/sql_manager.cc
2771 Alexey Botchkov 2008-12-03
Bug #41103 6.0 Windows embedded-server tests fail
to be exported correctly from the DLL, data
has to be declared as __declspec(dllimport)
for the client, and as DATA in the .def file.
per-file comments:
include/m_string.h
Bug#41103 6.0 Windows embedded-server tests fail
__declspec(dllimport) added for Windows
include/my_global.h
Bug#41103 6.0 Windows embedded-server tests fail
__declspec(dllimport) added for Windows
include/my_sys.h
Bug#41103 6.0 Windows embedded-server tests fail
__declspec(dllimport) added for Windows
libmysql/libmysql.def
Bug#41103 6.0 Windows embedded-server tests fail
DATA modifiers added
libmysqld/examples/CMakeLists.txt
Bug#41103 6.0 Windows embedded-server tests fail
MY_USE_CLIENT_DLL defined for projects
libmysqld/libmysqld.def
Bug#41103 6.0 Windows embedded-server tests fail
DATA modifiers added
per-file comments:
include/m_string.h
include/my_global.h
include/my_sys.h
libmysql/libmysql.def
libmysqld/examples/CMakeLists.txt
libmysqld/libmysqld.def
modified:
client/mysqltest.c
include/m_ctype.h
include/m_string.h
include/my_global.h
include/my_sys.h
include/mysql.h
libmysql/libmysql.def
libmysqld/examples/CMakeLists.txt
libmysqld/libmysqld.c
libmysqld/libmysqld.def
mysys/my_fopen.c
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2008-10-20 09:16:47 +0000
+++ b/client/mysql.cc 2008-12-05 01:05:05 +0000
@@ -1658,8 +1658,10 @@ get_one_option(int optid, const struct m
opt_nopager= 1;
break;
case OPT_MYSQL_PROTOCOL:
+#ifndef EMBEDDED_LIBRARY
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
+#endif
break;
case OPT_SERVER_ARG:
#ifdef EMBEDDED_LIBRARY
=== modified file 'client/mysqltest.c'
--- a/client/mysqltest.c 2008-12-03 14:05:31 +0000
+++ b/client/mysqltest.c 2008-12-05 01:05:05 +0000
@@ -147,7 +147,7 @@ static struct st_test_file* cur_file;
static struct st_test_file* file_stack_end;
-static CHARSET_INFO *charset_info; /* Default charset */
+static CHARSET_INFO *charset_info= &my_charset_latin1; /* Default charset */
static const char *embedded_server_groups[]=
{
@@ -7255,7 +7255,6 @@ int main(int argc, char **argv)
MY_STAT res_info;
MY_INIT(argv[0]);
- charset_info= &my_charset_latin1;
save_file[0]= 0;
TMPDIR[0]= 0;
=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c 2008-11-19 10:13:17 +0000
+++ b/dbug/dbug.c 2008-12-05 01:05:05 +0000
@@ -2569,13 +2569,4 @@ int i_am_a_dummy_function() {
return 0;
}
-#ifdef __WIN__
-char _db_doprnt_;
-char _db_enter_;
-char _db_pargs_;
-char _db_process_;
-char _db_push_;
-char _db_return_;
-#endif /*__WIN__*/
-
#endif
=== modified file 'include/m_ctype.h'
--- a/include/m_ctype.h 2008-12-03 14:05:31 +0000
+++ b/include/m_ctype.h 2008-12-05 01:05:05 +0000
@@ -321,7 +321,7 @@ typedef struct charset_info_st
#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
-MY_DLLEXPORT CHARSET_INFO my_charset_bin;
+extern CHARSET_INFO my_charset_bin;
extern CHARSET_INFO my_charset_big5_chinese_ci;
extern CHARSET_INFO my_charset_big5_bin;
extern CHARSET_INFO my_charset_cp932_japanese_ci;
@@ -336,7 +336,7 @@ extern CHARSET_INFO my_charset_gb2312_ch
extern CHARSET_INFO my_charset_gb2312_bin;
extern CHARSET_INFO my_charset_gbk_chinese_ci;
extern CHARSET_INFO my_charset_gbk_bin;
-MY_DLLEXPORT CHARSET_INFO my_charset_latin1;
+extern CHARSET_INFO my_charset_latin1;
extern CHARSET_INFO my_charset_latin1_german2_ci;
extern CHARSET_INFO my_charset_latin1_bin;
extern CHARSET_INFO my_charset_latin2_czech_ci;
=== modified file 'include/m_string.h'
--- a/include/m_string.h 2008-12-03 14:05:31 +0000
+++ b/include/m_string.h 2008-12-05 01:05:05 +0000
@@ -89,8 +89,8 @@ extern char *stpcpy(char *, const char *
#endif
/* Declared in int2str() */
-MY_DLLEXPORT char NEAR _dig_vec_upper[];
-MY_DLLEXPORT char NEAR _dig_vec_lower[];
+extern char NEAR _dig_vec_upper[];
+extern char NEAR _dig_vec_lower[];
#ifdef BAD_STRING_COMPILER
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
=== modified file 'include/my_dbug.h'
--- a/include/my_dbug.h 2008-11-19 10:13:17 +0000
+++ b/include/my_dbug.h 2008-12-05 01:05:05 +0000
@@ -133,21 +133,6 @@ extern void _db_flush_();
#define IF_DBUG(A)
#define DBUG_ABORT() abort()
-#ifdef __WIN__
-/*
- On windows all the dll export has to be declared in the *.def file
- so as we export these symbols in DEBUG mode we have to export
- these in the RELEASE mode also. So below are the dummy symbols
- for the RELEASE export
-*/
-extern char _db_doprnt_;
-extern char _db_enter_;
-extern char _db_pargs_;
-extern char _db_process_;
-extern char _db_push_;
-extern char _db_return_;
-#endif /*__WIN__*/
-
#endif
#ifdef __cplusplus
}
=== modified file 'include/my_global.h'
--- a/include/my_global.h 2008-12-03 14:05:31 +0000
+++ b/include/my_global.h 2008-12-05 01:05:05 +0000
@@ -1615,10 +1615,4 @@ inline void operator delete[](void*, vo
# define __func__ "<unknown>"
#endif
-#ifdef MY_USE_CLIENT_DLL
-#define MY_DLLEXPORT __declspec(dllimport)
-#else
-#define MY_DLLEXPORT extern
-#endif /*MY_USE_CLIENT_DLL*/
-
#endif /* my_global_h */
=== modified file 'include/my_sys.h'
--- a/include/my_sys.h 2008-12-03 14:05:31 +0000
+++ b/include/my_sys.h 2008-12-05 01:05:05 +0000
@@ -218,7 +218,7 @@ extern int errno; /* declare errno */
#endif /* #ifndef errno */
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir; /* Home directory for user */
-MY_DLLEXPORT const char *my_progname; /* program-name (printed in errors) */
+extern const char *my_progname; /* program-name (printed in errors) */
extern const char *my_progname_short; /* like above but without directory */
extern char NEAR curr_dir[]; /* Current directory for user */
extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
@@ -682,7 +682,6 @@ extern void my_osmaperr(unsigned lon
extern void TERMINATE(FILE *file, uint flag);
#endif
extern void init_glob_errs(void);
-extern void make_ftype(char * to,int flag);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
extern int my_fclose(FILE *fd,myf MyFlags);
=== modified file 'include/mysql.h'
--- a/include/mysql.h 2008-12-03 14:05:31 +0000
+++ b/include/mysql.h 2008-12-05 01:05:05 +0000
@@ -748,12 +748,6 @@ int STDCALL mysql_drop_db(MYSQL *mysql,
#pragma pack(pop) /* restore alignment */
#endif
-#ifdef MY_USE_CLIENT_DLL
-char *emb_make_ftype(int type);
-#define my_fopen(name, mode, flags) fopen(name, emb_make_ftype(mode))
-#define my_fclose(file, flags) fclose(file)
-#endif /*MY_USE_CLIENT_DLL*/
-
#ifdef __cplusplus
}
#endif
=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c 2008-10-22 11:51:28 +0000
+++ b/libmysql/libmysql.c 2008-12-05 01:05:05 +0000
@@ -207,9 +207,7 @@ void STDCALL mysql_server_end()
/* If library called my_init(), free memory allocated by it */
if (!org_my_init_done)
{
- my_end(MY_DONT_FREE_DBUG);
- /* Remove TRACING, if enabled by mysql_debug() */
- DBUG_POP();
+ my_end(0);
}
else
{
=== modified file 'libmysql/libmysql.def'
--- a/libmysql/libmysql.def 2008-12-03 14:05:31 +0000
+++ b/libmysql/libmysql.def 2008-12-05 01:05:05 +0000
@@ -1,34 +1,7 @@
LIBRARY LIBMYSQL
VERSION 6.0
EXPORTS
- _dig_vec_lower DATA
- _dig_vec_upper DATA
- my_progname DATA
- bmove_upp
- delete_dynamic
- free_defaults
- getopt_compare_strings
- getopt_ull_limit_value
- handle_options
- init_dynamic_array
- insert_dynamic
- int2str
- is_prefix
- list_add
- list_delete
- load_defaults
- my_end
- my_getopt_print_errors
- my_init
- my_malloc
- my_memdup
- my_no_flags_free
- my_path
mysql_get_parameters
- my_print_help
- my_print_variables
- my_realloc
- my_strdup
mysql_thread_end
mysql_thread_init
myodbc_remove_escape
@@ -118,22 +91,12 @@ EXPORTS
mysql_stmt_sqlstate
mysql_sqlstate
mysql_get_server_version
- set_dynamic
- strcend
- strcont
- strdup_root
- strfill
- strinstr
- strmake
- strmov
- strxmov
mysql_stmt_prepare
mysql_stmt_init
mysql_stmt_insert_id
mysql_stmt_attr_get
mysql_stmt_attr_set
mysql_stmt_field_count
- client_errors
mysql_set_local_infile_default
mysql_set_local_infile_handler
mysql_embedded
@@ -141,6 +104,4 @@ EXPORTS
mysql_server_end
mysql_set_character_set
mysql_get_character_set_info
- get_defaults_options
- modify_defaults_file
- mysql_stmt_next_result
+ mysql_stmt_next_result
=== modified file 'libmysqld/examples/CMakeLists.txt'
--- a/libmysqld/examples/CMakeLists.txt 2008-12-03 14:05:31 +0000
+++ b/libmysqld/examples/CMakeLists.txt 2008-12-05 01:05:05 +0000
@@ -29,13 +29,13 @@ ADD_DEFINITIONS(-DEMBEDDED_LIBRARY -DMY_
ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
../../client/mysql.cc ../../client/readline.cc
../../client/sql_string.cc)
-TARGET_LINK_LIBRARIES(mysql_embedded)
+TARGET_LINK_LIBRARIES(mysql_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32)
ADD_DEPENDENCIES(mysql_embedded libmysqld)
ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.c)
-TARGET_LINK_LIBRARIES(mysqltest_embedded)
+TARGET_LINK_LIBRARIES(mysqltest_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32)
ADD_DEPENDENCIES(mysqltest_embedded libmysqld)
ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c)
-TARGET_LINK_LIBRARIES(mysql_client_test_embedded)
+TARGET_LINK_LIBRARIES(mysql_client_test_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32)
ADD_DEPENDENCIES(mysql_client_test_embedded libmysqld)
=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc 2008-11-17 16:13:20 +0000
+++ b/libmysqld/lib_sql.cc 2008-12-05 01:05:05 +0000
@@ -385,6 +385,7 @@ static void emb_free_embedded_thd(MYSQL
thd->store_globals();
thd->unlink();
delete thd;
+ my_pthread_setspecific_ptr(THR_THD, 0);
mysql->thd=0;
}
@@ -539,12 +540,7 @@ int init_embedded_server(int argc, char
(void) thr_setconcurrency(concurrency); // 10 by default
- if (flush_time && flush_time != ~(ulong) 0L)
- {
- pthread_t hThread;
- if (pthread_create(&hThread,&connection_attrib,handle_manager,0))
- sql_print_error("Warning: Can't create thread to manage maintenance");
- }
+ start_handle_manager();
// FIXME initialize binlog_filter and rpl_filter if not already done
// corresponding delete is in clean_up()
=== modified file 'libmysqld/libmysqld.c'
--- a/libmysqld/libmysqld.c 2008-12-03 14:05:31 +0000
+++ b/libmysqld/libmysqld.c 2008-12-05 01:05:05 +0000
@@ -223,14 +223,3 @@ error:
DBUG_RETURN(0);
}
-
-#ifdef __WIN__
-static char emb_makeftype_buffer[10];
-
-char *emb_make_ftype(int type)
-{
- make_ftype(emb_makeftype_buffer, type);
- return emb_makeftype_buffer;
-}
-#endif /*__WIN__*/
-
=== modified file 'libmysqld/libmysqld.def'
--- a/libmysqld/libmysqld.def 2008-12-03 14:05:31 +0000
+++ b/libmysqld/libmysqld.def 2008-12-05 01:05:05 +0000
@@ -1,96 +1,6 @@
LIBRARY LIBMYSQLD
VERSION 5.1
EXPORTS
- _db_process_
- _db_enter_
- _db_return_
- _db_push_
- _db_doprnt_
- _db_pargs_
- strnmov
- get_charset
- my_memmem
- my_snprintf
- pthread_exit
- pthread_cond_signal
- dynstr_append_mem
- init_dynamic_string
- dynstr_free
- my_hash_free
- my_vsnprintf
- dynstr_append
- my_close
- my_open
- dynstr_set
- dynstr_append_os_quoted
- my_delete
- my_seek
- my_write
- create_temp_file
- fn_format
- dirname_part
- my_hash_insert
- my_hash_search
- test_if_hard_path
- my_copy
- my_mkdir
- my_sleep
- my_strtod
- pthread_cond_wait
- my_strnncoll_simple
- get_dynamic
- my_regerror
- init_dynamic_array2
- pthread_create
- pthread_cond_init
- ll2str
- my_fileno
- my_gcvt
- my_regcomp
- my_regexec
- my_regex_end
- my_regfree
- my_set_exception_pointers
- my_print_stacktrace
- my_thread_stack_size
- my_safe_print_str
- my_stat
- _my_hash_init
- pthread_attr_setstacksize
- pthread_attr_init
- my_dirend
- wild_compare
- my_dir
- my_micro_time
- find_type_or_exit
- _dig_vec_upper DATA
- _dig_vec_lower DATA
- bmove_upp
- delete_dynamic
- free_defaults
- getopt_compare_strings
- getopt_ull_limit_value
- handle_options
- init_dynamic_array
- insert_dynamic
- int2str
- is_prefix
- list_add
- list_delete
- load_defaults
- max_allowed_packet
- my_cgets
- my_end
- my_getopt_print_errors
- my_init
- my_malloc
- my_memdup
- my_no_flags_free
- my_path
- my_print_help
- my_print_variables
- my_realloc
- my_strdup
mysql_thread_end
mysql_thread_init
myodbc_remove_escape
@@ -159,48 +69,13 @@ EXPORTS
mysql_thread_safe
mysql_use_result
mysql_warning_count
- set_dynamic
- strcend
- strcont
- strdup_root
- strfill
- strinstr
- strmake
- strmov
- strxmov
mysql_server_end
mysql_server_init
get_tty_password
- sql_protocol_typelib
mysql_get_server_version
mysql_set_character_set
mysql_sqlstate
- charsets_dir
- disabled_my_option
- my_charset_latin1 DATA
- my_charset_bin DATA
- my_charset_same
- init_alloc_root
- my_progname DATA
- get_charset_name
- get_charset_by_csname
- print_defaults
- find_type
- strxnmov
- strend
- emb_make_ftype
- unpack_filename
- str2int
- int10_to_str
- longlong10_to_str
- my_snprintf_8bit
- alloc_root
- free_root
- my_read
- llstr
mysql_get_parameters
- mysql_thread_init
- mysql_thread_end
mysql_stmt_bind_param
mysql_stmt_bind_result
mysql_stmt_execute
@@ -228,6 +103,4 @@ EXPORTS
mysql_stmt_attr_get
mysql_stmt_attr_set
mysql_stmt_field_count
- get_defaults_options
- modify_defaults_file
- mysql_stmt_next_result
+ mysql_stmt_next_result
=== modified file 'mysys/my_fopen.c'
--- a/mysys/my_fopen.c 2008-12-03 14:05:31 +0000
+++ b/mysys/my_fopen.c 2008-12-05 01:05:05 +0000
@@ -18,6 +18,7 @@
#include <errno.h>
#include "mysys_err.h"
+static void make_ftype(char * to,int flag);
/*
Open a file as stream
@@ -195,7 +196,7 @@ FILE *my_fdopen(File Filedes, const char
a+ == O_RDWR|O_APPEND|O_CREAT
*/
-void make_ftype(register char * to, register int flag)
+static void make_ftype(register char * to, register int flag)
{
/* check some possible invalid combinations */
DBUG_ASSERT((flag & (O_TRUNC | O_APPEND)) != (O_TRUNC | O_APPEND));
=== modified file 'mysys/my_thr_init.c'
--- a/mysys/my_thr_init.c 2008-10-20 09:16:47 +0000
+++ b/mysys/my_thr_init.c 2008-12-05 01:05:05 +0000
@@ -386,17 +386,7 @@ void my_thread_end(void)
struct st_my_thread_var *_my_thread_var(void)
{
- struct st_my_thread_var *tmp=
- my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys);
-#if defined(USE_TLS)
- /* This can only happen in a .DLL */
- if (!tmp)
- {
- my_thread_init();
- tmp=my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys);
- }
-#endif
- return tmp;
+ return my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys);
}
#ifndef DBUG_OFF
=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h 2008-11-27 17:31:54 +0000
+++ b/sql/mysql_priv.h 2008-12-05 01:05:05 +0000
@@ -1843,10 +1843,9 @@ int mysql_load(THD *thd, sql_exchange *e
int write_record(THD *thd, TABLE *table, COPY_INFO *info);
/* sql_manager.cc */
-extern ulong volatile manager_status;
-extern bool volatile manager_thread_in_use, mqh_used;
-extern pthread_t manager_thread;
-pthread_handler_t handle_manager(void *arg);
+extern bool volatile mqh_used;
+void start_handle_manager();
+void stop_handle_manager();
bool mysql_manager_submit(void (*action)());
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2008-11-28 16:30:27 +0000
+++ b/sql/mysqld.cc 2008-12-05 01:05:05 +0000
@@ -886,16 +886,6 @@ static void close_connections(void)
kill_cached_threads++;
flush_thread_cache();
- /* kill flush thread */
- (void) pthread_mutex_lock(&LOCK_manager);
- if (manager_thread_in_use)
- {
- DBUG_PRINT("quit", ("killing manager thread: 0x%llx",
- (ulonglong)manager_thread));
- (void) pthread_cond_signal(&COND_manager);
- }
- (void) pthread_mutex_unlock(&LOCK_manager);
-
/* kill connection thread */
#if !defined(__WIN__) && !defined(__NETWARE__)
DBUG_PRINT("quit", ("waiting for select thread: 0x%llx",
@@ -1307,6 +1297,7 @@ void clean_up(bool print_message)
if (cleanup_done++)
return; /* purecov: inspected */
+ stop_handle_manager();
release_ddl_log();
/*
@@ -4346,17 +4337,6 @@ server.");
#ifndef EMBEDDED_LIBRARY
-static void create_maintenance_thread()
-{
- if (flush_time && flush_time != ~(ulong) 0L)
- {
- pthread_t hThread;
- if (pthread_create(&hThread,&connection_attrib,handle_manager,0))
- sql_print_warning("Can't create thread to manage maintenance");
- }
-}
-
-
static void create_shutdown_thread()
{
#ifdef __WIN__
@@ -4662,7 +4642,7 @@ int main(int argc, char **argv)
execute_ddl_log_recovery();
create_shutdown_thread();
- create_maintenance_thread();
+ start_handle_manager();
if (Events::init(opt_noacl))
unireg_abort(1);
=== modified file 'sql/sql_manager.cc'
--- a/sql/sql_manager.cc 2007-05-10 09:59:39 +0000
+++ b/sql/sql_manager.cc 2008-12-04 18:41:53 +0000
@@ -23,8 +23,9 @@
#include "mysql_priv.h"
-ulong volatile manager_status;
-bool volatile manager_thread_in_use;
+
+static bool volatile manager_thread_in_use;
+static bool abort_manager;
pthread_t manager_thread;
pthread_mutex_t LOCK_manager;
@@ -63,7 +64,6 @@ bool mysql_manager_submit(void (*action)
pthread_handler_t handle_manager(void *arg __attribute__((unused)))
{
int error = 0;
- ulong status;
struct timespec abstime;
bool reset_flush_time = TRUE;
struct handler_cb *cb= NULL;
@@ -72,7 +72,6 @@ pthread_handler_t handle_manager(void *a
pthread_detach_this_thread();
manager_thread = pthread_self();
- manager_status = 0;
manager_thread_in_use = 1;
for (;;)
@@ -87,16 +86,14 @@ pthread_handler_t handle_manager(void *a
set_timespec(abstime, flush_time);
reset_flush_time = FALSE;
}
- while (!manager_status && (!error || error == EINTR) && !abort_loop)
+ while ((!error || error == EINTR) && !abort_manager)
error= pthread_cond_timedwait(&COND_manager, &LOCK_manager, &abstime);
}
else
{
- while (!manager_status && (!error || error == EINTR) && !abort_loop)
+ while ((!error || error == EINTR) && !abort_manager)
error= pthread_cond_wait(&COND_manager, &LOCK_manager);
}
- status = manager_status;
- manager_status = 0;
if (cb == NULL)
{
cb= cb_list;
@@ -104,7 +101,7 @@ pthread_handler_t handle_manager(void *a
}
pthread_mutex_unlock(&LOCK_manager);
- if (abort_loop)
+ if (abort_manager)
break;
if (error == ETIMEDOUT || error == ETIME)
@@ -121,11 +118,42 @@ pthread_handler_t handle_manager(void *a
my_free((uchar*)cb, MYF(0));
cb= next;
}
-
- if (status)
- DBUG_PRINT("error", ("manager did not handle something: %lx", status));
}
manager_thread_in_use = 0;
+ DBUG_LEAVE; // Can't use DBUG_RETURN after my_thread_end
my_thread_end();
- DBUG_RETURN(NULL);
+ return (NULL);
}
+
+
+/* Start handle manager thread */
+void start_handle_manager()
+{
+ DBUG_ENTER("start_handle_manager");
+ abort_manager = false;
+ if (flush_time && flush_time != ~(ulong) 0L)
+ {
+ pthread_t hThread;
+ if (pthread_create(&hThread,&connection_attrib,handle_manager,0))
+ sql_print_warning("Can't create handle_manager thread");
+ }
+ DBUG_VOID_RETURN;
+}
+
+
+/* Initiate shutdown of handle manager thread */
+void stop_handle_manager()
+{
+ DBUG_ENTER("stop_handle_manager");
+ abort_manager = true;
+ pthread_mutex_lock(&LOCK_manager);
+ if (manager_thread_in_use)
+ {
+ DBUG_PRINT("quit", ("initiate shutdown of handle manager thread: 0x%lx",
+ (ulong)manager_thread));
+ pthread_cond_signal(&COND_manager);
+ }
+ pthread_mutex_unlock(&LOCK_manager);
+ DBUG_VOID_RETURN;
+}
+
| Thread |
|---|
| • bzr push into mysql-6.0-bugteam branch (vvaintroub:2771 to 2772)Bug#38522 Bug#41103 | Vladislav Vaintroub | 5 Dec |