Fix for Bug#31222: com_% global status counters
behave randomly with mysql_change_user. The problem was that global status variables were not updated in THD::check_user(), so thread statistics were lost after COM_CHANGE_USER. The fix is to update global status variables with the thread ones before preparing the thread for new user. mysql-test/r/change_user.result: Update result file. mysql-test/t/change_user.test: Add a test case for Bug#31222: com_% global status counters behave randomly with mysql_change_user. sql/sql_class.cc: Update global status variables when we're handling COM_CHANGE_USER for a thread.
Showing
Please register or sign in to comment