mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge MySQL->MariaDB
* Finished Monty and Jani's merge * Some InnoDB tests still fail (because it's old xtradb code run against newer testsuite). They are expected to go after mergning with the latest xtradb.
This commit is contained in:
@@ -1077,8 +1077,8 @@ void prepare_new_connection_state(THD* thd)
|
||||
pthread_handler_t handle_one_connection(void *arg)
|
||||
{
|
||||
THD *thd= (THD*) arg;
|
||||
ulong launch_time= (ulong) ((thd->thr_create_utime= my_micro_time()) -
|
||||
thd->connect_utime);
|
||||
|
||||
thd->thr_create_utime= my_micro_time();
|
||||
|
||||
if (thread_scheduler.init_new_connection_thread())
|
||||
{
|
||||
@@ -1087,8 +1087,20 @@ pthread_handler_t handle_one_connection(void *arg)
|
||||
thd->scheduler->end_thread(thd,0);
|
||||
return 0;
|
||||
}
|
||||
if (launch_time >= slow_launch_time*1000000L)
|
||||
statistic_increment(slow_launch_threads,&LOCK_status);
|
||||
|
||||
/*
|
||||
If a thread was created to handle this connection:
|
||||
increment slow_launch_threads counter if it took more than
|
||||
slow_launch_time seconds to create the thread.
|
||||
*/
|
||||
if (thd->prior_thr_create_utime)
|
||||
{
|
||||
ulong launch_time= (ulong) (thd->thr_create_utime -
|
||||
thd->prior_thr_create_utime);
|
||||
if (launch_time >= slow_launch_time*1000000L)
|
||||
statistic_increment(slow_launch_threads, &LOCK_status);
|
||||
thd->prior_thr_create_utime= 0;
|
||||
}
|
||||
|
||||
/*
|
||||
handle_one_connection() is normally the only way a thread would
|
||||
|
Reference in New Issue
Block a user