Commit 0d5d4e5d authored by prabakaran thirumalai's avatar prabakaran thirumalai

Bug#14627287 THREAD CACHE - BYPASSES PRIVILEGES

Analysis:
When thread cache is enabled, it does not properly initialize
thd->start_utime when a thread is picked from the thread cache.
This breaks the quota management mechanism. 
THD::time_out_user_resource_limits() resets 
m_user_connect->conn_per_hour to 0 based on thd->start_utime

Fix:
Initialize start_utime when cached thread is reused.

Notes:
Enabled back tests which were disabled because of this issue.
parent 17c71588
......@@ -1969,7 +1969,7 @@ static bool cache_thread()
this thread for handling of new THD object/connection.
*/
thd->mysys_var->abort= 0;
thd->thr_create_utime= my_micro_time();
thd->thr_create_utime= thd->start_utime= my_micro_time();
threads.append(thd);
return(1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment