• lrf141's avatar
    MDEV-19190 Assertion `...auto_inc_initialized` failed in get_auto_increment · da03d8d9
    lrf141 authored
    This is a DELETE only case. Normally this statement doesn't make inserts,
    but DELETE ... FOR PORTION changes it. UPDATE and INSERT initializes
    autoinc by calling handler::info(HA_STATUS_AUTO). Also myisam and innodb
    can lazily initialize it in their update_create_info overrides.
    
    The solution is to initialize autoinc during delete preparation,
    if period (DELETE FOR PORTION) is specified.
    
    The initial work has been done by Kento Takeuchi by his PR #2048,
    however this commit also holds a few technical modifications by
    Nikita Malyavin
    da03d8d9
table.cc 302 KB