diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-02-17 23:27:15 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-02-17 23:27:15 +0100 |
commit | 2a5d8ea9a201a1bf33fe309b8293e31ebd961e60 (patch) | |
tree | 25cd2759395705fc28c3d11ed401e9b5ed9d6230 /sql/threadpool_common.cc | |
parent | b932e57b27e413872a76deb082ccc425949a67ca (diff) | |
download | mariadb-git-2a5d8ea9a201a1bf33fe309b8293e31ebd961e60.tar.gz |
Added copiright, some more comments
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r-- | sql/threadpool_common.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc index d003bae6727..03ccb3fa861 100644 --- a/sql/threadpool_common.cc +++ b/sql/threadpool_common.cc @@ -1,3 +1,18 @@ +/* Copyright (C) 2012 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 + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #include <my_global.h> #include <violite.h> #include <sql_priv.h> @@ -171,6 +186,9 @@ void threadpool_remove_connection(THD *thd) worker_context.restore(); } +/** + Process a single client request or a single batch. +*/ int threadpool_process_request(THD *thd) { int retval= 0; @@ -190,6 +208,15 @@ int threadpool_process_request(THD *thd) } + /* + In the loop below, the flow is essentially the copy of thead-per-connections + logic, see do_handle_one_connection() in sql_connect.c + + The goal is to execute a single query, thus the loop is normally executed + only once. However for SSL connections, it can be executed multiple times + (SSL can preread and cache incoming data, and vio->has_data() checks if it + was the case). + */ for(;;) { Vio *vio; |