summaryrefslogtreecommitdiff
path: root/sql/session_tracker.h
Commit message (Collapse)AuthorAgeFilesLines
* Restore vars_list destructorSergey Vojtovich2019-05-041-0/+1
| | | | | | | Regression after reverting fair THD members constructors/destructors. vars_list can be used standalone, in such cases destructor is needed. Part of MDEV-14984 - regression in connect performance
* Make connect speed great againSergey Vojtovich2019-05-031-0/+1
| | | | | | | | | | | Rather than parsing session_track_system_variables when thread starts, do it when first trackable event occurs. Benchmarked on a 2socket/20core/40threads Broadwell system using sysbench connect brencmark @40 threads (with select 1 disabled): 101379.77 -> 143016.68 CPS, whereas 10.2 is currently at 137766.31 CPS. Part of MDEV-14984 - regression in connect performance
* Safe session_track_system_variables snapshotSergey Vojtovich2019-05-031-26/+4
| | | | | | | | | | | | | | | | | | | | When enabling system variables tracker, make a copy of global_system_variables.session_track_system_variables under LOCK_global_system_variables. This protects from concurrent variable updates and potential freed memory access, as well as from variable reconstruction (which was previously protected by LOCK_plugin). We can also use this copy as a session variable pointer, so that we don't have to allocate memory and reconstruct it every time it is referenced. For this very reason we don't need buffer_length stuff anymore. As well as don't we need to take LOCK_plugin early in ::enable(). Unified ::parse_var_list() to acquire LOCK_plugin unconditionally. For no apparent reason it wasn't previously acquired for global variable update. Part of MDEV-14984 - regression in connect performance
* Allocate Session_sysvars_tracker staticallySergey Vojtovich2019-05-031-15/+136
| | | | | | | | | | | | | | | 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
* Allocate Transaction_state_tracker staticallySergey Vojtovich2019-05-031-68/+71
| | | | | | One less new/delete per connection. Part of MDEV-14984 - regression in connect performance
* Static current schema and state change trackersSergey Vojtovich2019-05-031-12/+57
| | | | | | Saves 2 new/delete per connection. Part of MDEV-14984 - regression in connect performance
* Get rid of not implemented SESSION_GTIDS_TRACKERSergey Vojtovich2019-05-031-1/+0
| | | | | | One less new/delete per connection. Part of MDEV-14984 - regression in connect performance
* Cleanup session tracker APISergey Vojtovich2019-05-031-5/+4
| | | | | | | | | | | | | | | | | - Session_sysvars_tracker::server_init_check() -> sysvartrack_validate_value() - Session_sysvars_tracker::check_var_list() -> sysvartrack_validate_value() - Session_sysvars_tracker::server_init_process() -> sysvartrack_global_update() - sysvartrack_reprint_value() -> sysvartrack_global_update() - sysvartrack_value_len() -> sysvartrack_session_value_ptr() - sysvartrack_value_construct() -> sysvartrack_session_value_ptr() - sysvartrack_update() -> Session_sysvars_tracker::update() - Session_tracker::server_boot_verify() -> session_tracker_init() - sysvar_tracker() -> /dev/null Part of MDEV-14984 - regression in connect performance
* Cleanup session tracker redundancySergey Vojtovich2019-05-031-6/+7
| | | | | | | | | | | | - m_enabled is initialised by the base class constructor - removed unused schema_track_inited - moved Transaction_state_tracker constructor to declaration - common enable() - removed unused Session_sysvars_tracker::check_str() - classes are "private" by default - don't even try to compile for embedded Part of MDEV-14984 - regression in connect performance
* A proper State_tracker::m_changed enacpsulationSergey Vojtovich2019-05-031-2/+3
| | | | | | | | Note: preserved original behaviour, where remaining trackers are not reset on error from store(). This effectively means subsequent statements will start tracking from unclean state. Part of MDEV-14984 - regression in connect performance
* Fix many -Wconversion warnings.Marko Mäkelä2017-03-071-2/+2
| | | | | | | | | | | | | | | | | | | Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
* MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-2/+2
| | | | | Postreview fixes. New MySQL tests fixes.
* MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-15/+142
| | | | Transaction tracker
* MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-1/+19
| | | | System variables tracking
* MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-0/+159
initial commit to test