• kaa@polly.local's avatar
    Fix for bug #22364 "Inconsistent "matched rows" when executing UPDATE" · 9a99aa81
    kaa@polly.local authored
    In multi_update::send_data(), the counter of matched rows was not correctly incremented, when during insertion of a new row to a temporay table it had to be converted from HEAP to MyISAM.
    
    This fix changes the logic to increment the counter of matched rows in the following cases:
    1. If the error returned from write_row() is zero.
    2. If the error returned from write_row() is non-zero, is neither HA_ERR_FOUND_DUPP_KEY nor HA_ERR_FOUND_DUPP_UNIQUE, and a call to create_myisam_from_heap() succeeds. 
    9a99aa81
update.result 13.2 KB