summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-04-22 14:18:51 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-05-14 12:50:23 +0400
commit18f88d6d94ce9f65991e011c978c79d990498704 (patch)
tree6c0f589bc27bc4b0dc15a04b7bbc59a9df0d00a8 /plugin
parentf8cacd03a79e56746434f7c12e2ed8dd6a534b8e (diff)
downloadmariadb-git-18f88d6d94ce9f65991e011c978c79d990498704.tar.gz
MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Avoid calling current_thd from thd_kill_level(). This reduces number of pthread_getspecific() calls from 776 to 354. Also thd_kill_level(NULL) is not permitted anymore: this saves one condition.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/semisync/semisync_master.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc
index c88c162be03..b1f7fbd8b07 100644
--- a/plugin/semisync/semisync_master.cc
+++ b/plugin/semisync/semisync_master.cc
@@ -635,7 +635,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
(int)is_on());
}
- while (is_on() && !thd_killed(NULL))
+ while (is_on() && !thd_killed(current_thd))
{
if (reply_file_name_inited_)
{
@@ -747,7 +747,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
At this point, the binlog file and position of this transaction
must have been removed from ActiveTranx.
*/
- assert(thd_killed(NULL) ||
+ assert(thd_killed(current_thd) ||
!active_tranxs_->is_tranx_end_pos(trx_wait_binlog_name,
trx_wait_binlog_pos));