diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2016-07-16 23:33:31 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2016-07-16 23:33:31 +0000 |
commit | 453c9e163acb604aab4deddd45479dcc68c0d9de (patch) | |
tree | 068fcb88da1f0e346f20eb28b1ece45b27def299 /sql/threadpool.h | |
parent | 139534a50b91b2b90baab33ad997fbd09414e48c (diff) | |
download | mariadb-git-10.2-wlad-threadpool.tar.gz |
fix connection counter in unix pool, return error code from tp_init instead of exit()10.2-wlad-threadpool
Diffstat (limited to 'sql/threadpool.h')
-rw-r--r-- | sql/threadpool.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/threadpool.h b/sql/threadpool.h index a2c61f8a6ca..754b8f1e1a8 100644 --- a/sql/threadpool.h +++ b/sql/threadpool.h @@ -115,6 +115,7 @@ struct TP_connection struct TP_pool { virtual ~TP_pool(){}; + virtual int init()= 0; virtual TP_connection *new_connection(CONNECT *)= 0; virtual void add(TP_connection *c)= 0; virtual int set_max_threads(uint){ return 0; } @@ -130,7 +131,8 @@ struct TP_pool #ifdef _WIN32 struct TP_pool_win:TP_pool { - TP_pool_win(); + TP_pool_win(); + virtual int init(); virtual ~TP_pool_win(); virtual TP_connection *new_connection(CONNECT *c); virtual void add(TP_connection *); @@ -143,6 +145,7 @@ struct TP_pool_unix :TP_pool { TP_pool_unix(); ~TP_pool_unix(); + virtual int init(); virtual TP_connection *new_connection(CONNECT *c); virtual void add(TP_connection *); virtual int set_pool_size(uint); |