Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
48bb5513
Commit
48bb5513
authored
Apr 07, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove the service for installing the closed-source mysql thread pool plugin
parent
78c06420
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
35 additions
and
175 deletions
+35
-175
include/mysql/plugin_audit.h.pp
include/mysql/plugin_audit.h.pp
+0
-8
include/mysql/plugin_auth.h.pp
include/mysql/plugin_auth.h.pp
+0
-8
include/mysql/plugin_ftparser.h.pp
include/mysql/plugin_ftparser.h.pp
+0
-8
include/mysql/service_thread_scheduler.h
include/mysql/service_thread_scheduler.h
+0
-65
include/mysql/services.h
include/mysql/services.h
+2
-2
include/service_versions.h
include/service_versions.h
+2
-2
libservices/CMakeLists.txt
libservices/CMakeLists.txt
+1
-2
libservices/my_thread_scheduler_service.c
libservices/my_thread_scheduler_service.c
+0
-20
mysql-test/r/mysqld--help.result
mysql-test/r/mysqld--help.result
+24
-0
mysql-test/t/mysqld--help.test
mysql-test/t/mysqld--help.test
+1
-1
sql/scheduler.cc
sql/scheduler.cc
+1
-50
sql/sql_plugin.cc
sql/sql_plugin.cc
+2
-2
sql/sql_plugin_services.h
sql/sql_plugin_services.h
+2
-7
No files found.
include/mysql/plugin_audit.h.pp
View file @
48bb5513
...
...
@@ -51,14 +51,6 @@ extern struct thd_wait_service_st {
}
*
thd_wait_service
;
void
thd_wait_begin
(
void
*
thd
,
int
wait_type
);
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>
extern
struct
progress_report_service_st
{
void
(
*
thd_progress_init_func
)(
void
*
thd
,
unsigned
int
max_stage
);
...
...
include/mysql/plugin_auth.h.pp
View file @
48bb5513
...
...
@@ -51,14 +51,6 @@ extern struct thd_wait_service_st {
}
*
thd_wait_service
;
void
thd_wait_begin
(
void
*
thd
,
int
wait_type
);
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>
extern
struct
progress_report_service_st
{
void
(
*
thd_progress_init_func
)(
void
*
thd
,
unsigned
int
max_stage
);
...
...
include/mysql/plugin_ftparser.h.pp
View file @
48bb5513
...
...
@@ -51,14 +51,6 @@ extern struct thd_wait_service_st {
}
*
thd_wait_service
;
void
thd_wait_begin
(
void
*
thd
,
int
wait_type
);
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>
extern
struct
progress_report_service_st
{
void
(
*
thd_progress_init_func
)(
void
*
thd
,
unsigned
int
max_stage
);
...
...
include/mysql/service_thread_scheduler.h
deleted
100644 → 0
View file @
78c06420
/*
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 */
include/mysql/services.h
View file @
48bb5513
#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
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_thd_alloc.h>
#include <mysql/service_thd_wait.h>
#include <mysql/service_thread_scheduler.h>
#include <mysql/service_progress_report.h>
#include <mysql/service_debug_sync.h>
#include <mysql/service_kill_statement.h>
...
...
include/service_versions.h
View file @
48bb5513
/* 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
it under the terms of the GNU General Public License as published by
...
...
@@ -22,7 +23,6 @@
#define VERSION_my_snprintf 0x0100
#define VERSION_thd_alloc 0x0100
#define VERSION_thd_wait 0x0100
#define VERSION_my_thread_scheduler 0x0100
#define VERSION_progress_report 0x0100
#define VERSION_debug_sync 0x1000
#define VERSION_kill_statement 0x1000
...
...
libservices/CMakeLists.txt
View file @
48bb5513
# 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
# it under the terms of the GNU General Public License as published by
...
...
@@ -19,7 +19,6 @@ SET(MYSQLSERVICES_SOURCES
my_snprintf_service.c
thd_alloc_service.c
thd_wait_service.c
my_thread_scheduler_service.c
progress_report_service.c
debug_sync_service.c
kill_statement_service.c
)
...
...
libservices/my_thread_scheduler_service.c
deleted
100644 → 0
View file @
78c06420
/*
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
;
mysql-test/r/mysqld--help.result
View file @
48bb5513
...
...
@@ -817,6 +817,25 @@ The following options may be given as the first argument:
values are COMMIT or ROLLBACK.
--thread-cache-size=#
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
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
...
...
@@ -1090,6 +1109,11 @@ table-definition-cache 400
table-open-cache 400
tc-heuristic-recover COMMIT
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
time-format %H:%i:%s
timed-mutexes FALSE
...
...
mysql-test/t/mysqld--help.test
View file @
48bb5513
...
...
@@ -27,7 +27,7 @@ perl;
feedback
debug
temp
-
pool
ssl
des
-
key
-
file
xtradb
thread
-
concurrency
super
-
large
-
pages
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
# names:
...
...
sql/scheduler.cc
View file @
48bb5513
/* 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
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
;
}
/*
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
sql/sql_plugin.cc
View file @
48bb5513
...
...
@@ -1516,8 +1516,8 @@ int plugin_init(int *argc, char **argv, int flags)
}
/* prepare debug_sync service */
DBUG_ASSERT
(
strcmp
(
list_of_services
[
5
].
name
,
"debug_sync_service"
)
==
0
);
list_of_services
[
5
].
service
=
*
(
void
**
)
&
debug_sync_C_callback_ptr
;
DBUG_ASSERT
(
strcmp
(
list_of_services
[
4
].
name
,
"debug_sync_service"
)
==
0
);
list_of_services
[
4
].
service
=
*
(
void
**
)
&
debug_sync_C_callback_ptr
;
mysql_mutex_lock
(
&
LOCK_plugin
);
...
...
sql/sql_plugin_services.h
View file @
48bb5513
/* 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
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
};
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
=
{
thd_progress_init
,
thd_progress_report
,
...
...
@@ -63,7 +59,6 @@ static struct st_service_ref list_of_services[]=
{
"my_snprintf_service"
,
VERSION_my_snprintf
,
&
my_snprintf_handler
},
{
"thd_alloc_service"
,
VERSION_thd_alloc
,
&
thd_alloc_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
},
{
"debug_sync_service"
,
VERSION_debug_sync
,
0
},
// updated in plugin_init()
{
"thd_kill_statement_service"
,
VERSION_kill_statement
,
&
thd_kill_statement_handler
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment