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
b4349462
Commit
b4349462
authored
Apr 05, 2012
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mdev-208 thread pool breaks the server on XP
parent
34ed8f33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
sql/mysqld.cc
sql/mysqld.cc
+8
-0
sql/threadpool_win.cc
sql/threadpool_win.cc
+3
-0
No files found.
sql/mysqld.cc
View file @
b4349462
...
...
@@ -7937,6 +7937,14 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
one_thread_scheduler
(
thread_scheduler
);
one_thread_scheduler
(
extra_thread_scheduler
);
#else
#ifdef _WIN32
/* workaround: disable thread pool on XP */
if
(
GetProcAddress
(
GetModuleHandle
(
"kernel32"
),
"CreateThreadpool"
)
==
0
&&
thread_handling
>
SCHEDULER_NO_THREADS
)
thread_handling
=
SCHEDULER_ONE_THREAD_PER_CONNECTION
;
#endif
if
(
thread_handling
<=
SCHEDULER_ONE_THREAD_PER_CONNECTION
)
one_thread_per_connection_scheduler
(
thread_scheduler
,
&
max_connections
,
&
connection_count
);
...
...
sql/threadpool_win.cc
View file @
b4349462
...
...
@@ -144,6 +144,9 @@ WEAK_SYMBOL(VOID, SubmitThreadpoolWork,PTP_WORK pwk);
WEAK_SYMBOL
(
VOID
,
CloseThreadpoolWork
,
PTP_WORK
pwk
);
#define CloseThreadpoolWork my_CloseThreadpoolWork
WEAK_SYMBOL
(
BOOL
,
CallbackMayRunLong
,
PTP_CALLBACK_INSTANCE
pci
);
#define CallbackMayRunLong my_CallbackMayRunLong
#if _MSC_VER >= 1600
/* Stack size manipulation available only on Win7+ /declarations in VS10 */
WEAK_SYMBOL
(
BOOL
,
SetThreadpoolStackInformation
,
PTP_POOL
,
...
...
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