• unknown's avatar
    Fix for Bug#33507: Event scheduler creates more threads · b279be38
    unknown authored
    than max_connections -- which results in user lockout.
    
    The problem was that the variable thread_count that contains
    the number of active threads was interpreted as a number of
    active connections.
    
    The fix is to introduce a new counter for active connections.
    
    
    mysql-test/r/connect.result:
      A test case for Bug#33507: Event scheduler creates more threads
      than max_connections -- which results in user lockout.
    mysql-test/t/connect.test:
      A test case for Bug#33507: Event scheduler creates more threads
      than max_connections -- which results in user lockout.
    sql/mysql_priv.h:
      1. Polishing: login_connection() and end_connection() need not
         to be public.
      
      2. Introduce connection_count -- a variable to contain the number
         of active connections. It is protected by LOCK_connection_count.
    sql/mysqld.cc:
      Use connection_count to count active connections.
    sql/sql_connect.cc:
      1. Use connection_count to count active connections.
      2. Make login_connection(), end_connection() private for the module
      as they had to be.
    b279be38
connect.test 6.29 KB