summaryrefslogtreecommitdiff
path: root/sql/session_tracker.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-03-18 19:18:54 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-05-03 16:40:58 +0400
commita7adc2ce1680f00635b8241202066fd5542d286f (patch)
tree78888bd51d3a47ce3393a4b3aa6728832a7167cc /sql/session_tracker.cc
parent47bd06d55ec211bc4d05d616a0833629504c7edf (diff)
downloadmariadb-git-a7adc2ce1680f00635b8241202066fd5542d286f.tar.gz
Allocate Transaction_state_tracker statically
One less new/delete per connection. Part of MDEV-14984 - regression in connect performance
Diffstat (limited to 'sql/session_tracker.cc')
-rw-r--r--sql/session_tracker.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/session_tracker.cc b/sql/session_tracker.cc
index 868e8295294..2f72b7198f9 100644
--- a/sql/session_tracker.cc
+++ b/sql/session_tracker.cc
@@ -1345,7 +1345,7 @@ Session_tracker::Session_tracker()
m_trackers[SESSION_SYSVARS_TRACKER]= 0;
m_trackers[CURRENT_SCHEMA_TRACKER]= &current_schema;
m_trackers[SESSION_STATE_CHANGE_TRACKER]= &state_change;
- m_trackers[TRANSACTION_INFO_TRACKER]= 0;
+ m_trackers[TRANSACTION_INFO_TRACKER]= &transaction_info;
}
@@ -1367,8 +1367,6 @@ void Session_tracker::enable(THD *thd)
deinit();
m_trackers[SESSION_SYSVARS_TRACKER]=
new (std::nothrow) Session_sysvars_tracker();
- m_trackers[TRANSACTION_INFO_TRACKER]=
- new (std::nothrow) Transaction_state_tracker;
for (int i= 0; i < SESSION_TRACKER_END; i++)
m_trackers[i]->enable(thd);