diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2016-02-10 00:20:23 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2016-02-10 00:20:23 +0100 |
commit | b436db98fe123f4b0c83df3532881b038f7d9a9d (patch) | |
tree | aa048f548d9037bd3eca6df0d415a8dd314e0ac8 | |
parent | b3093073b1ec076ad7ef5ef8b8fca9022864a890 (diff) | |
download | mariadb-git-b436db98fe123f4b0c83df3532881b038f7d9a9d.tar.gz |
Fix compilation10.2-ssl
-rw-r--r-- | include/mysql/psi/mysql_thread.h | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 12 | ||||
-rw-r--r-- | sql/mysqld.h | 2 | ||||
-rw-r--r-- | sql/sql_connect.h | 2 | ||||
-rw-r--r-- | sql/sys_vars.cc | 9 | ||||
-rw-r--r-- | sql/threadpool.h | 2 | ||||
-rw-r--r-- | sql/threadpool_common.cc | 13 | ||||
-rw-r--r-- | sql/threadpool_unix.cc | 13 | ||||
-rw-r--r-- | sql/threadpool_win.cc | 12 |
9 files changed, 25 insertions, 42 deletions
diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index 0afbe6052f5..54a0eaabef7 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1240,7 +1240,7 @@ static inline int inline_mysql_thread_create( return result; } -static inline void inline_mysql_thread_set_psi_id(ulong id) +static inline void inline_mysql_thread_set_psi_id(my_thread_id id) { struct PSI_thread *psi= PSI_THREAD_CALL(get_thread)(); PSI_THREAD_CALL(set_thread_id)(psi, id); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 45d25ac3bf5..e819f003ab9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5505,7 +5505,7 @@ static void handle_connections_methods() unireg_abort(1); // Will not return } - mysql_mutex_lock(&LOCK_thread_start); + mysql_mutex_lock(&LOCK_start_thread); mysql_cond_init(key_COND_handler_count, &COND_handler_count, NULL); handler_count=0; if (hPipe != INVALID_HANDLE_VALUE) @@ -5548,17 +5548,17 @@ static void handle_connections_methods() #endif while (handler_count > 0) - mysql_cond_wait(&COND_handler_count, &LOCK_thread_start); - mysql_mutex_unlock(&LOCK_thread_start); + mysql_cond_wait(&COND_handler_count, &LOCK_start_thread); + mysql_mutex_unlock(&LOCK_start_thread); DBUG_VOID_RETURN; } void decrement_handler_count() { - mysql_mutex_lock(&LOCK_thread_start); + mysql_mutex_lock(&LOCK_start_thread); if (--handler_count == 0) mysql_cond_signal(&COND_handler_count); - mysql_mutex_unlock(&LOCK_thread_start); + mysql_mutex_unlock(&LOCK_start_thread); my_thread_end(); } #else @@ -6838,7 +6838,7 @@ pthread_handler_t handle_connections_namedpipes(void *arg) hPipe=hConnectedPipe; continue; // We have to try again } - + CONNECT *connect; if (!(connect= new CONNECT) || !(connect->vio= vio_new_win32pipe(hConnectedPipe))) { diff --git a/sql/mysqld.h b/sql/mysqld.h index cb6bc849912..ed9b711a4d1 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -711,7 +711,7 @@ inline __attribute__((warn_unused_result)) my_thread_id next_thread_id() } #if defined(MYSQL_DYNAMIC_PLUGIN) && defined(_WIN32) -extern my_thread_id next_thread_id_noinline(); +extern "C" my_thread_id next_thread_id_noinline(); #define next_thread_id() next_thread_id_noinline() #endif diff --git a/sql/sql_connect.h b/sql/sql_connect.h index 902ebfa41c9..22a12e845c7 100644 --- a/sql/sql_connect.h +++ b/sql/sql_connect.h @@ -26,7 +26,7 @@ Object to hold connect information to be given to the newly created thread */ -class scheduler_functions; +struct scheduler_functions; class CONNECT : public ilink { public: diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 9628c92624f..1284cbb66cb 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1437,16 +1437,11 @@ static Sys_var_ulong Sys_metadata_locks_hash_instances( VALID_RANGE(1, 1024), DEFAULT(8), BLOCK_SIZE(1)); -/* - "pseudo_thread_id" variable used in the test suite to detect 32/64bit - systems. If you change it to something else then ulong then fix the tests - in mysql-test/include/have_32bit.inc and have_64bit.inc. -*/ -static Sys_var_ulong Sys_pseudo_thread_id( +static Sys_var_ulonglong Sys_pseudo_thread_id( "pseudo_thread_id", "This variable is for internal server use", SESSION_ONLY(pseudo_thread_id), - NO_CMD_LINE, VALID_RANGE(0, ULONG_MAX), DEFAULT(0), + NO_CMD_LINE, VALID_RANGE(0, ULONGLONG_MAX), DEFAULT(0), BLOCK_SIZE(1), NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(check_has_super)); diff --git a/sql/threadpool.h b/sql/threadpool.h index 3bbcf3f67f6..93f349091f8 100644 --- a/sql/threadpool.h +++ b/sql/threadpool.h @@ -38,12 +38,10 @@ extern int threadpool_add_connection(THD *thd); threadpool_unix.cc or threadpool_win.cc */ extern bool tp_init(); -extern bool tp_init_new_connection_thread(); extern void tp_add_connection(CONNECT *); extern void tp_wait_begin(THD *, int); extern void tp_wait_end(THD*); extern void tp_post_kill_notification(THD *thd); -extern bool tp_end_thread(THD *thd, bool cache_thread); extern void tp_end(void); /* Used in SHOW for threadpool_idle_thread_count */ diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc index c1a092dafb9..63622d4a5f0 100644 --- a/sql/threadpool_common.cc +++ b/sql/threadpool_common.cc @@ -261,6 +261,19 @@ end: } + +/* Dummy functions, do nothing */ + +static bool tp_init_new_connection_thread() +{ + return 0; +} + +static bool tp_end_thread(THD *, bool) +{ + return 0; +} + static scheduler_functions tp_scheduler_functions= { 0, // max_threads diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc index 684b074f9f0..a43ae2162ae 100644 --- a/sql/threadpool_unix.cc +++ b/sql/threadpool_unix.cc @@ -1550,19 +1550,6 @@ bool tp_init() DBUG_RETURN(0); } - -/* Dummy functions, do nothing */ - -bool tp_init_new_connection_thread() -{ - return 0; -} - -bool tp_end_thread(THD *thd, bool cache_thread) -{ - return 0; -} - void tp_end() { DBUG_ENTER("tp_end"); diff --git a/sql/threadpool_win.cc b/sql/threadpool_win.cc index e036bd614fd..cd7cf5df7be 100644 --- a/sql/threadpool_win.cc +++ b/sql/threadpool_win.cc @@ -533,16 +533,6 @@ bool tp_init(void) } -/* Dummy functions, do nothing */ - -bool tp_init_new_connection_thread() -{ - return 0; -} - -bool tp_end_thread(THD *thd, bool cache_thread) -{} - /** Scheduler callback : Destroy the scheduler. */ @@ -677,7 +667,7 @@ void tp_add_connection(CONNECT *connect) !(thd= connect->create_thd())) { tp_log_warning("Allocation failed", "tp_add_connection"); - free(con) + free(con); connect->close_and_delete(); return; } |