• Timothy Smith's avatar
    Cherry-pick InnoDB fixes for Bug#34286, Bug#35352, and Bug#36600 from snapshot · 37a34256
    Timothy Smith authored
    innodb-5.0-ss2475.
    
    Bug #34286  Assertion failure in thread 2816 in file .\row\row0sel.c line 3500
    Since autoinc init performs a MySQL SELECT query to determine the auto-inc
    value, set prebuilt->sql_stat_start = TRUE so that it is performed like any
    normal SELECT, regardless of the context in which it was invoked.
    
    
    Bug #35352  If InnoDB crashes with UNDO slots full error the error persists on restart
    We've added a heuristic that checks the size of the UNDO slots cache lists
    (insert and upate). If either of cached lists has more than 500 entries then we
    add any UNDO slots that are freed, to the common free list instead of the cache
    list, this is to avoid the case where all the free slots end up in only one of
    the lists on startup after a crash.
    
    Tested with test case for 26590 and passes all mysql-test(s).
    
    Bug #36600  SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
    Fixed by removing the Innodb_buffer_pool_pages_latched variable from SHOW
    STATUS output in non-UNIV_DEBUG compilation.
    
    37a34256
ha_innodb.cc 216 KB