1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix compilation

This commit is contained in:
Vladislav Vaintroub
2016-02-10 00:20:23 +01:00
parent b3093073b1
commit b436db98fe
9 changed files with 25 additions and 42 deletions

View File

@ -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);

View File

@ -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)))
{

View File

@ -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

View File

@ -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:

View File

@ -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));

View File

@ -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 */

View File

@ -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

View File

@ -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");

View File

@ -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;
}