• Marc Alff's avatar
    Bug#17928281 'CHECK_PERFORMANCE_SCHEMA()' LEAVES 'CURRENT_THD' REFERRING · b734cd73
    Marc Alff authored
    DESTRUCTED THD OBJ 
    
    Prior to fix, function check_performance_schema() could leave
    behind stale pointers in thread local storage, for the following keys:
    - THR_THD (used by _current_thd)
    - THR_MALLOC (used for memory allocation)
    This is an unsafe practice, which can potentially cause crashes,
    and that can cause other bugs when code is modified during maintenance.
    
    With this fix, thread local storage keys used temporarily within
    function check_performance_schema() are cleaned up after use.
    b734cd73
pfs_check.cc 2.03 KB