• Venkata Sidagam's avatar
    Bug #11752803 SERVER CRASHES IF MAX_CONNECTIONS DECREASED BELOW · d0181929
    Venkata Sidagam authored
                   CERTAIN LEVEL
          
    Problem description: mysqld crashes when we update the max_connections 
    variable to lesser value than the number of currently open connections.
          
    Analysis: The "alarm_queue.max_elements" size will be decided at the 
    server start time and it will get modified if we change max_connections 
    value. In the current scenario the value of "alarm_queue.max_elements" 
    is decremented when the max_connections is set to 2. When updating the  
    "alarm_queue.max_elements" value we are not updating "max_used_alarms" 
    value. Hence, instead of getting the warning "thr_alarm queue is full" 
    it is ending up in asserting the server at the time of inserting new 
    elements in the queue.
          
    Fix: the fix is to dynamically increase the size of the alarm_queue.
    In order to do that, queue_insert_safe() should be used instead if
    queue_insert().
    d0181929
thr_alarm.c 25 KB