mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
remove the service for installing the closed-source mysql thread pool plugin
This commit is contained in:
@ -51,14 +51,6 @@ extern struct thd_wait_service_st {
|
|||||||
} *thd_wait_service;
|
} *thd_wait_service;
|
||||||
void thd_wait_begin(void* thd, int wait_type);
|
void thd_wait_begin(void* thd, int wait_type);
|
||||||
void thd_wait_end(void* thd);
|
void thd_wait_end(void* thd);
|
||||||
#include <mysql/service_thread_scheduler.h>
|
|
||||||
struct scheduler_functions;
|
|
||||||
extern struct my_thread_scheduler_service {
|
|
||||||
int (*set)(struct scheduler_functions *scheduler);
|
|
||||||
int (*reset)();
|
|
||||||
} *my_thread_scheduler_service;
|
|
||||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
|
||||||
int my_thread_scheduler_reset();
|
|
||||||
#include <mysql/service_progress_report.h>
|
#include <mysql/service_progress_report.h>
|
||||||
extern struct progress_report_service_st {
|
extern struct progress_report_service_st {
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
|
@ -51,14 +51,6 @@ extern struct thd_wait_service_st {
|
|||||||
} *thd_wait_service;
|
} *thd_wait_service;
|
||||||
void thd_wait_begin(void* thd, int wait_type);
|
void thd_wait_begin(void* thd, int wait_type);
|
||||||
void thd_wait_end(void* thd);
|
void thd_wait_end(void* thd);
|
||||||
#include <mysql/service_thread_scheduler.h>
|
|
||||||
struct scheduler_functions;
|
|
||||||
extern struct my_thread_scheduler_service {
|
|
||||||
int (*set)(struct scheduler_functions *scheduler);
|
|
||||||
int (*reset)();
|
|
||||||
} *my_thread_scheduler_service;
|
|
||||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
|
||||||
int my_thread_scheduler_reset();
|
|
||||||
#include <mysql/service_progress_report.h>
|
#include <mysql/service_progress_report.h>
|
||||||
extern struct progress_report_service_st {
|
extern struct progress_report_service_st {
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
|
@ -51,14 +51,6 @@ extern struct thd_wait_service_st {
|
|||||||
} *thd_wait_service;
|
} *thd_wait_service;
|
||||||
void thd_wait_begin(void* thd, int wait_type);
|
void thd_wait_begin(void* thd, int wait_type);
|
||||||
void thd_wait_end(void* thd);
|
void thd_wait_end(void* thd);
|
||||||
#include <mysql/service_thread_scheduler.h>
|
|
||||||
struct scheduler_functions;
|
|
||||||
extern struct my_thread_scheduler_service {
|
|
||||||
int (*set)(struct scheduler_functions *scheduler);
|
|
||||||
int (*reset)();
|
|
||||||
} *my_thread_scheduler_service;
|
|
||||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
|
||||||
int my_thread_scheduler_reset();
|
|
||||||
#include <mysql/service_progress_report.h>
|
#include <mysql/service_progress_report.h>
|
||||||
extern struct progress_report_service_st {
|
extern struct progress_report_service_st {
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SERVICE_THREAD_SCHEDULER_INCLUDED
|
|
||||||
#define SERVICE_THREAD_SCHEDULER_INCLUDED
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct scheduler_functions;
|
|
||||||
|
|
||||||
extern struct my_thread_scheduler_service {
|
|
||||||
int (*set)(struct scheduler_functions *scheduler);
|
|
||||||
int (*reset)();
|
|
||||||
} *my_thread_scheduler_service;
|
|
||||||
|
|
||||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
|
||||||
|
|
||||||
#define my_thread_scheduler_set(F) my_thread_scheduler_service->set((F))
|
|
||||||
#define my_thread_scheduler_reset() my_thread_scheduler_service->reset()
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/**
|
|
||||||
Set the thread scheduler to use for the server.
|
|
||||||
|
|
||||||
@param scheduler Pointer to scheduler callbacks to use.
|
|
||||||
@retval 0 Scheduler installed correctly.
|
|
||||||
@retval 1 Invalid value (NULL) used for scheduler.
|
|
||||||
*/
|
|
||||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Restore the previous thread scheduler.
|
|
||||||
|
|
||||||
@note If no thread scheduler was installed previously with
|
|
||||||
thd_set_thread_scheduler, this function will report an error.
|
|
||||||
|
|
||||||
@retval 0 Scheduler installed correctly.
|
|
||||||
@retval 1 No scheduler installed.
|
|
||||||
*/
|
|
||||||
int my_thread_scheduler_reset();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* SERVICE_THREAD_SCHEDULER_INCLUDED */
|
|
@ -1,5 +1,6 @@
|
|||||||
#ifndef MYSQL_SERVICES_INCLUDED
|
#ifndef MYSQL_SERVICES_INCLUDED
|
||||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
||||||
|
Copyright (c) 2012, 2013, Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -21,7 +22,6 @@ extern "C" {
|
|||||||
#include <mysql/service_my_snprintf.h>
|
#include <mysql/service_my_snprintf.h>
|
||||||
#include <mysql/service_thd_alloc.h>
|
#include <mysql/service_thd_alloc.h>
|
||||||
#include <mysql/service_thd_wait.h>
|
#include <mysql/service_thd_wait.h>
|
||||||
#include <mysql/service_thread_scheduler.h>
|
|
||||||
#include <mysql/service_progress_report.h>
|
#include <mysql/service_progress_report.h>
|
||||||
#include <mysql/service_debug_sync.h>
|
#include <mysql/service_debug_sync.h>
|
||||||
#include <mysql/service_kill_statement.h>
|
#include <mysql/service_kill_statement.h>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
||||||
|
Copyright (c) 2012, 2013, Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -22,7 +23,6 @@
|
|||||||
#define VERSION_my_snprintf 0x0100
|
#define VERSION_my_snprintf 0x0100
|
||||||
#define VERSION_thd_alloc 0x0100
|
#define VERSION_thd_alloc 0x0100
|
||||||
#define VERSION_thd_wait 0x0100
|
#define VERSION_thd_wait 0x0100
|
||||||
#define VERSION_my_thread_scheduler 0x0100
|
|
||||||
#define VERSION_progress_report 0x0100
|
#define VERSION_progress_report 0x0100
|
||||||
#define VERSION_debug_sync 0x1000
|
#define VERSION_debug_sync 0x1000
|
||||||
#define VERSION_kill_statement 0x1000
|
#define VERSION_kill_statement 0x1000
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006 MySQL AB, 2010 Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2006 MySQL AB, 2010 Oracle and/or its affiliates.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -19,7 +19,6 @@ SET(MYSQLSERVICES_SOURCES
|
|||||||
my_snprintf_service.c
|
my_snprintf_service.c
|
||||||
thd_alloc_service.c
|
thd_alloc_service.c
|
||||||
thd_wait_service.c
|
thd_wait_service.c
|
||||||
my_thread_scheduler_service.c
|
|
||||||
progress_report_service.c
|
progress_report_service.c
|
||||||
debug_sync_service.c
|
debug_sync_service.c
|
||||||
kill_statement_service.c)
|
kill_statement_service.c)
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <service_versions.h>
|
|
||||||
SERVICE_VERSION my_thread_scheduler_service=
|
|
||||||
(void*)VERSION_my_thread_scheduler;
|
|
@ -817,6 +817,25 @@ The following options may be given as the first argument:
|
|||||||
values are COMMIT or ROLLBACK.
|
values are COMMIT or ROLLBACK.
|
||||||
--thread-cache-size=#
|
--thread-cache-size=#
|
||||||
How many threads we should keep in a cache for reuse
|
How many threads we should keep in a cache for reuse
|
||||||
|
--thread-pool-idle-timeout=#
|
||||||
|
Timeout in seconds for an idle thread in the thread
|
||||||
|
pool.Worker thread will be shut down after timeout
|
||||||
|
--thread-pool-max-threads=#
|
||||||
|
Maximum allowed number of worker threads in the thread
|
||||||
|
pool
|
||||||
|
--thread-pool-oversubscribe=#
|
||||||
|
How many additional active worker threads in a group are
|
||||||
|
allowed.
|
||||||
|
--thread-pool-size=#
|
||||||
|
Number of thread groups in the pool. This parameter is
|
||||||
|
roughly equivalent to maximum number of concurrently
|
||||||
|
executing threads (threads in a waiting state do not
|
||||||
|
count as executing).
|
||||||
|
--thread-pool-stall-limit=#
|
||||||
|
Maximum query execution time in milliseconds,before an
|
||||||
|
executing non-yielding thread is considered stalled.If a
|
||||||
|
worker thread is stalled, additional worker thread may be
|
||||||
|
created to handle remaining clients.
|
||||||
--thread-stack=# The stack size for each thread
|
--thread-stack=# The stack size for each thread
|
||||||
--time-format=name The TIME format (ignored)
|
--time-format=name The TIME format (ignored)
|
||||||
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
|
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
|
||||||
@ -1090,6 +1109,11 @@ table-definition-cache 400
|
|||||||
table-open-cache 400
|
table-open-cache 400
|
||||||
tc-heuristic-recover COMMIT
|
tc-heuristic-recover COMMIT
|
||||||
thread-cache-size 0
|
thread-cache-size 0
|
||||||
|
thread-pool-idle-timeout 60
|
||||||
|
thread-pool-max-threads 500
|
||||||
|
thread-pool-oversubscribe 3
|
||||||
|
thread-pool-size 4
|
||||||
|
thread-pool-stall-limit 500
|
||||||
thread-stack 294912
|
thread-stack 294912
|
||||||
time-format %H:%i:%s
|
time-format %H:%i:%s
|
||||||
timed-mutexes FALSE
|
timed-mutexes FALSE
|
||||||
|
@ -27,7 +27,7 @@ perl;
|
|||||||
feedback debug temp-pool ssl des-key-file
|
feedback debug temp-pool ssl des-key-file
|
||||||
xtradb thread-concurrency super-large-pages
|
xtradb thread-concurrency super-large-pages
|
||||||
mutex-deadlock-detector null-audit maria aria pbxt oqgraph
|
mutex-deadlock-detector null-audit maria aria pbxt oqgraph
|
||||||
sphinx thread-handling thread-pool query-cache-info/;
|
sphinx thread-handling query-cache-info/;
|
||||||
|
|
||||||
# And substitute the content some environment variables with their
|
# And substitute the content some environment variables with their
|
||||||
# names:
|
# names:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
Copyright (c) 2012, Monty Program Ab
|
Copyright (c) 2012, 2013, Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -139,52 +139,3 @@ void one_thread_scheduler(scheduler_functions *func)
|
|||||||
func->end_thread= no_threads_end;
|
func->end_thread= no_threads_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
no pluggable schedulers in mariadb.
|
|
||||||
when we'll want it, we'll do it properly
|
|
||||||
*/
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
static scheduler_functions *saved_thread_scheduler;
|
|
||||||
static uint saved_thread_handling;
|
|
||||||
|
|
||||||
extern "C"
|
|
||||||
int my_thread_scheduler_set(scheduler_functions *scheduler)
|
|
||||||
{
|
|
||||||
DBUG_ASSERT(scheduler != 0);
|
|
||||||
|
|
||||||
if (scheduler == NULL)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
saved_thread_scheduler= thread_scheduler;
|
|
||||||
saved_thread_handling= thread_handling;
|
|
||||||
thread_scheduler= scheduler;
|
|
||||||
// Scheduler loaded dynamically
|
|
||||||
thread_handling= SCHEDULER_TYPES_COUNT;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
extern "C"
|
|
||||||
int my_thread_scheduler_reset()
|
|
||||||
{
|
|
||||||
DBUG_ASSERT(saved_thread_scheduler != NULL);
|
|
||||||
|
|
||||||
if (saved_thread_scheduler == NULL)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
thread_scheduler= saved_thread_scheduler;
|
|
||||||
thread_handling= saved_thread_handling;
|
|
||||||
saved_thread_scheduler= 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
extern "C" int my_thread_scheduler_set(scheduler_functions *scheduler)
|
|
||||||
{ return 1; }
|
|
||||||
|
|
||||||
extern "C" int my_thread_scheduler_reset()
|
|
||||||
{ return 1; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -1516,8 +1516,8 @@ int plugin_init(int *argc, char **argv, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* prepare debug_sync service */
|
/* prepare debug_sync service */
|
||||||
DBUG_ASSERT(strcmp(list_of_services[5].name, "debug_sync_service") == 0);
|
DBUG_ASSERT(strcmp(list_of_services[4].name, "debug_sync_service") == 0);
|
||||||
list_of_services[5].service= *(void**)&debug_sync_C_callback_ptr;
|
list_of_services[4].service= *(void**)&debug_sync_C_callback_ptr;
|
||||||
|
|
||||||
mysql_mutex_lock(&LOCK_plugin);
|
mysql_mutex_lock(&LOCK_plugin);
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
||||||
|
Copyright (c) 2012, 2013, Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -41,11 +42,6 @@ static struct thd_wait_service_st thd_wait_handler= {
|
|||||||
thd_wait_end
|
thd_wait_end
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct my_thread_scheduler_service my_thread_scheduler_handler= {
|
|
||||||
my_thread_scheduler_set,
|
|
||||||
my_thread_scheduler_reset,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct progress_report_service_st progress_report_handler= {
|
static struct progress_report_service_st progress_report_handler= {
|
||||||
thd_progress_init,
|
thd_progress_init,
|
||||||
thd_progress_report,
|
thd_progress_report,
|
||||||
@ -63,7 +59,6 @@ static struct st_service_ref list_of_services[]=
|
|||||||
{ "my_snprintf_service", VERSION_my_snprintf, &my_snprintf_handler },
|
{ "my_snprintf_service", VERSION_my_snprintf, &my_snprintf_handler },
|
||||||
{ "thd_alloc_service", VERSION_thd_alloc, &thd_alloc_handler },
|
{ "thd_alloc_service", VERSION_thd_alloc, &thd_alloc_handler },
|
||||||
{ "thd_wait_service", VERSION_thd_wait, &thd_wait_handler },
|
{ "thd_wait_service", VERSION_thd_wait, &thd_wait_handler },
|
||||||
{ "my_thread_scheduler_service", VERSION_my_thread_scheduler, &my_thread_scheduler_handler },
|
|
||||||
{ "progress_report_service", VERSION_progress_report, &progress_report_handler },
|
{ "progress_report_service", VERSION_progress_report, &progress_report_handler },
|
||||||
{ "debug_sync_service", VERSION_debug_sync, 0 }, // updated in plugin_init()
|
{ "debug_sync_service", VERSION_debug_sync, 0 }, // updated in plugin_init()
|
||||||
{ "thd_kill_statement_service", VERSION_kill_statement, &thd_kill_statement_handler }
|
{ "thd_kill_statement_service", VERSION_kill_statement, &thd_kill_statement_handler }
|
||||||
|
Reference in New Issue
Block a user