mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Ensure that process "State" is properly cleaned after query execution
In some cases "SHOW PROCESSLIST" could show "Reset for next command" as State, even if the previous query had finished properly. Fixed by clearing State after end of command and also setting the State for the "Connect" command. Other things: - Changed usage of 'thd->set_command(COM_SLEEP)' to 'thd->mark_connection_idle()'. - Changed thread_state_info() to return "" instead of NULL. This is just a safety measurement and in line with the logic of the rest of the function.
This commit is contained in:
@ -1249,8 +1249,7 @@ void prepare_new_connection_state(THD* thd)
|
||||
embedded server library.
|
||||
TODO: refactor this to avoid code duplication there
|
||||
*/
|
||||
thd->proc_info= 0;
|
||||
thd->set_command(COM_SLEEP);
|
||||
thd->mark_connection_idle();
|
||||
thd->init_for_queries();
|
||||
|
||||
if (opt_init_connect.length && !(sctx->master_access & SUPER_ACL))
|
||||
|
Reference in New Issue
Block a user