mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Allocate Session_sysvars_tracker statically
One less new/delete per connection. Removed m_mem_flag since most allocs are thread specific. The only exception are allocs performed during initialization. Removed State_tracker and Session_tracker constructors as they don't make sense anymore. No reason to access session_sysvars_tracker via get_tracker(), so access it directly instead. Part of MDEV-14984 - regression in connect performance
This commit is contained in:
@ -1661,7 +1661,7 @@ THD::~THD()
|
||||
|
||||
/* trick to make happy memory accounting system */
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
session_tracker.deinit();
|
||||
session_tracker.sysvars.deinit();
|
||||
#endif //EMBEDDED_LIBRARY
|
||||
|
||||
if (status_var.local_memory_used != 0)
|
||||
@ -7302,12 +7302,11 @@ void THD::set_last_commit_gtid(rpl_gtid >id)
|
||||
#endif
|
||||
m_last_commit_gtid= gtid;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
if (changed_gtid &&
|
||||
session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->is_enabled())
|
||||
if (changed_gtid && session_tracker.sysvars.is_enabled())
|
||||
{
|
||||
session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->
|
||||
session_tracker.sysvars.
|
||||
mark_as_changed(this, (LEX_CSTRING*)Sys_last_gtid_ptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user