• Varun Gupta's avatar
    MDEV-18335: Assertion `!error || error == 137' failed in subselect_rowid_merge_engine::init · 65f30050
    Varun Gupta authored
    When duplicates are removed from a table using a hash, if the record is a duplicate it is marked
    as deleted. The handler API check if the record is deleted and send an error flag HA_ERR_RECORD_DELETED.
    When we scan over the table if the thread is not killed then we skip the
    records marked as HA_ERR_RECORD_DELETED.
    
    The issue here is when a query is aborted by a user (this is happening when the LIMIT for ROWS EXAMINED
    is exceeded), the scan over the table does not skip the records for which HA_ERR_RECORD_DELETED is sent.
    It just returns an error flag HA_ERR_ABORTED_BY_USER.
    This error flag is not checked at the upper level and hence we hit the assert.
    If the query is aborted by the user we should just skip reading rows and return
    control to the upper levels of execution.
    65f30050
item_subselect.cc 196 KB