Skip to content
  • Marc Alff's avatar
    e943c179
    Bug#14664453 THREAD_ID SHOULD BE BIGINT(21) UNSIGNED IN PERFORMANCE_SCHEMA · e943c179
    Marc Alff authored
    On some servers that:
    - do have a heavy load in production
    - do have very short sessions
    - do have a very long uptime
    the connection_id() counter can grow at a very high rate,
    and eventually overflow the 32bits limit.
    
    For the performance schema, a similar THREAD_ID counter
    also exist, for table performance_schema.threads,
    that is also implemented as a 32bits value.
    
    This fix changes the following columns:
    - performance_schema.threads.thread_id
    - performance_schema.threads.processlist_id
    to use BIGINT UNSIGNED (64 bits unsigned values)
    All related columns in performance schema tables are changed accordingly.
    
    The motivation for changing both thread_id and processlist_id at
    the same time is to avoid un necessary schema changes later.
    
    This fix changes the performance schema internal counter
    for threads.thread_id to use a 64 bits value.
    
    This fix does NOT change the internal counter for connection_id(),
    which is done separately (see related bugs)
    
    For clarity in the code, PFS_thread::m_thread_id has been renamed to
    PFS_thread::m_processlist_id, to avoid confusion with m_thread_internal_id.
    e943c179
    Bug#14664453 THREAD_ID SHOULD BE BIGINT(21) UNSIGNED IN PERFORMANCE_SCHEMA
    Marc Alff authored
    On some servers that:
    - do have a heavy load in production
    - do have very short sessions
    - do have a very long uptime
    the connection_id() counter can grow at a very high rate,
    and eventually overflow the 32bits limit.
    
    For the performance schema, a similar THREAD_ID counter
    also exist, for table performance_schema.threads,
    that is also implemented as a 32bits value.
    
    This fix changes the following columns:
    - performance_schema.threads.thread_id
    - performance_schema.threads.processlist_id
    to use BIGINT UNSIGNED (64 bits unsigned values)
    All related columns in performance schema tables are changed accordingly.
    
    The motivation for changing both thread_id and processlist_id at
    the same time is to avoid un necessary schema changes later.
    
    This fix changes the performance schema internal counter
    for threads.thread_id to use a 64 bits value.
    
    This fix does NOT change the internal counter for connection_id(),
    which is done separately (see related bugs)
    
    For clarity in the code, PFS_thread::m_thread_id has been renamed to
    PFS_thread::m_processlist_id, to avoid confusion with m_thread_internal_id.
Loading