summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorprabakaran thirumalai <prabakaran.thirumalai@oracle.com>2012-12-21 11:04:49 +0530
committerprabakaran thirumalai <prabakaran.thirumalai@oracle.com>2012-12-21 11:04:49 +0530
commit98aaf18bc7ff64cbb616b4ce94998218704112b6 (patch)
tree0287f2a48a800cf0347785daf4b81e4bc1d37393 /sql/mysqld.cc
parent0dd066cb6f462cd4d76184e4176aefbf7d874440 (diff)
downloadmariadb-git-98aaf18bc7ff64cbb616b4ce94998218704112b6.tar.gz
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.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index aece8f28533..cb1bc6bed12 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -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);
}