summaryrefslogtreecommitdiff
path: root/sql/my_apc.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-07-11 13:39:56 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-07-11 13:39:56 +0400
commitf913ba7a605b965359b437db36b0baa5498ec2c0 (patch)
tree0c6bc684c4876fab5b71ad4c8a4a0207c26d6f12 /sql/my_apc.h
parent725d76e1e844b587eeeab23fb0caa670735e47b6 (diff)
downloadmariadb-git-f913ba7a605b965359b437db36b0baa5498ec2c0.tar.gz
MWL#182: Explain running statements: address review feedback
- Make THD::check_killed() an inline function which makes calls to non-inline functions only whern there are APC requests to be served.
Diffstat (limited to 'sql/my_apc.h')
-rw-r--r--sql/my_apc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/my_apc.h b/sql/my_apc.h
index 1c4cc25376b..5473600bae6 100644
--- a/sql/my_apc.h
+++ b/sql/my_apc.h
@@ -53,6 +53,15 @@ public:
void disable();
void process_apc_requests();
+ /*
+ A lightweight function, intended to be used in frequent checks like this:
+
+ if (apc_target.have_requests()) apc_target.process_apc_requests()
+ */
+ inline bool have_apc_requests()
+ {
+ return test(apc_calls);
+ }
/* Functor class for calls you can schedule */
class Apc_call