mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fix_max_connections to resize alarm_queue (Bug #1435)
include/queues.h: resize_queue() include/thr_alarm.h: resize_thr_alarm() to resize alarm_queue mysys/queues.c: resize_queue() mysys/thr_alarm.c: resize_thr_alarm() to resize alarm_queue
This commit is contained in:
@ -120,6 +120,16 @@ void init_thr_alarm(uint max_alarms)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
void resize_thr_alarm(uint max_alarms)
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_alarm);
|
||||
/* it's ok not to shrink the queue sometimes */
|
||||
if (alarm_queue.elements < max_alarms)
|
||||
resize_queue(&alarm_queue,max_alarms+1);
|
||||
pthread_mutex_unlock(&LOCK_alarm);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
Request alarm after sec seconds.
|
||||
|
||||
|
Reference in New Issue
Block a user