diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-02-16 16:59:04 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-02-16 16:59:04 +0100 |
commit | cfa56f900acefcf228c26dfa39c1b9142ef3552b (patch) | |
tree | 6fa08e8fa99d31d69e9b7fda91c0e89f4635ee5e /sql/threadpool_common.cc | |
parent | 8877fe7359b1eef81b62c6531674aaa5a5ce6051 (diff) | |
download | mariadb-git-cfa56f900acefcf228c26dfa39c1b9142ef3552b.tar.gz |
address second round review comments
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r-- | sql/threadpool_common.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc index fd641b45faa..d003bae6727 100644 --- a/sql/threadpool_common.cc +++ b/sql/threadpool_common.cc @@ -136,7 +136,7 @@ int threadpool_add_connection(THD *thd) { retval= 0; thd->net.reading_or_writing= 1; - thd->skip_wait_timeout= true; + thd->skip_wait_timeout= true; } } } @@ -185,10 +185,11 @@ int threadpool_process_request(THD *thd) killed flag was set by timeout handler or KILL command. Return error. */ - worker_context.restore(); - return 1; + retval= 1; + goto end; } + for(;;) { Vio *vio; @@ -196,12 +197,12 @@ int threadpool_process_request(THD *thd) mysql_audit_release(thd); if ((retval= do_command(thd)) != 0) - break ; + goto end; if (!thd_is_connection_alive(thd)) { retval= 1; - break; + goto end; } vio= thd->net.vio; @@ -210,10 +211,11 @@ int threadpool_process_request(THD *thd) /* More info on this debug sync is in sql_parse.cc*/ DEBUG_SYNC(thd, "before_do_command_net_read"); thd->net.reading_or_writing= 1; - break; + goto end; } - } + } +end: worker_context.restore(); return retval; } @@ -234,8 +236,6 @@ static scheduler_functions tp_scheduler_functions= tp_end // end }; -extern void scheduler_init(); - void pool_of_threads_scheduler(struct scheduler_functions *func, ulong *arg_max_connections, uint *arg_connection_count) |