summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-06-18 09:02:52 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2019-06-18 09:02:52 +0200
commit44d06cd39df2bdde6f7ac31d5340f1f683683c99 (patch)
tree5780d86e96aa0a85aad67fdad758afeaa859d36b
parent10ebabc364487d3659e00c1568a85700446d90e2 (diff)
downloadmariadb-git-44d06cd39df2bdde6f7ac31d5340f1f683683c99.tar.gz
Fix compile warning/error on Windows.
-rw-r--r--sql/threadpool_win.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/sql/threadpool_win.cc b/sql/threadpool_win.cc
index 15047a6dbfa..50fde8b52b3 100644
--- a/sql/threadpool_win.cc
+++ b/sql/threadpool_win.cc
@@ -425,19 +425,13 @@ int TP_pool_win::init()
}
}
- /*
- Control stack size (OS must be Win7 or later)
- */
- if (SetThreadpoolStackInformation)
+ TP_POOL_STACK_INFORMATION stackinfo;
+ stackinfo.StackCommit = 0;
+ stackinfo.StackReserve = (SIZE_T)my_thread_stack_size;
+ if (!SetThreadpoolStackInformation(pool, &stackinfo))
{
- TP_POOL_STACK_INFORMATION stackinfo;
- stackinfo.StackCommit = 0;
- stackinfo.StackReserve = (SIZE_T)my_thread_stack_size;
- if (!SetThreadpoolStackInformation(pool, &stackinfo))
- {
- tp_log_warning("Can't set threadpool stack size",
- "SetThreadpoolStackInformation");
- }
+ tp_log_warning("Can't set threadpool stack size",
+ "SetThreadpoolStackInformation");
}
return 0;
}