summaryrefslogtreecommitdiff
path: root/sql/threadpool_common.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2019-06-14 11:32:30 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2019-06-14 11:32:30 +0400
commit2762e165083c35b1ae70069200372aec95f6fd79 (patch)
tree0d2d67b2cc8b1baaf89111d6d3d80a52a744cb59 /sql/threadpool_common.cc
parent5b65d61d9384a45ea1b8df79694493fbb1a14e4a (diff)
downloadmariadb-git-bb-hf-mdev-18661.tar.gz
MDEV-18661 loading the audit plugin causes performance regression.bb-hf-mdev-18661
Plugin fixed to not lock the LOCK_operations when not active. Server fixed to lock the LOCK_plugin less - do it once per thread and then only if a plugin was installed/uninstalled.
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r--sql/threadpool_common.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc
index b4066bd7603..b8be7083624 100644
--- a/sql/threadpool_common.cc
+++ b/sql/threadpool_common.cc
@@ -266,7 +266,8 @@ int threadpool_process_request(THD *thd)
{
Vio *vio;
thd->net.reading_or_writing= 0;
- mysql_audit_release(thd);
+ if (mysql_audit_release_required(thd))
+ mysql_audit_release(thd);
if ((retval= do_command(thd)) != 0)
goto end;