-
Ajo Robert authored
VARIABLES DICREASES UNEXPECTEDLY Analysis -------- "SHOW STATUS VARIABLES" shows incorrect status values when concurrent connection is executing statement to change user or is being disconnected. During switch user/session disconnect session status variables are merged to global status variables. After this, session variables are not reset for a while. During this time select of global status variable from another session will result in wrong data as all the session values get added to global to calculate final value. Effectively current session status variable value gets added twice. Fix: --- New flag introduced to represent whether THD::status_var addedd to global status. If status_var_aggregated is set, THD::status_var is skiped from aggregation. Code added to reset session variable after adding to global status variable for change user scenario. Test: ---- mtr test added for switch user flow. Session disconnect is tested with debugger as DEBUG_SYNC suite will not work during thread disconnect.
Ajo Robert authoredVARIABLES DICREASES UNEXPECTEDLY Analysis -------- "SHOW STATUS VARIABLES" shows incorrect status values when concurrent connection is executing statement to change user or is being disconnected. During switch user/session disconnect session status variables are merged to global status variables. After this, session variables are not reset for a while. During this time select of global status variable from another session will result in wrong data as all the session values get added to global to calculate final value. Effectively current session status variable value gets added twice. Fix: --- New flag introduced to represent whether THD::status_var addedd to global status. If status_var_aggregated is set, THD::status_var is skiped from aggregation. Code added to reset session variable after adding to global status variable for change user scenario. Test: ---- mtr test added for switch user flow. Session disconnect is tested with debugger as DEBUG_SYNC suite will not work during thread disconnect.
Loading