-
Thirunarayanan Balathandayuthapani authored
MDEV-19870 gcol.innodb_virtual_debug_purge doesn't fail if row_vers_old_has_index_entry gives wrong result 1) Whenever purge thread tries to remove the secondary virtual index entry, purge thread acquires metadata lock for the table and release dict_operation_lock. After that, it retries the secondary index deletion if MDL acquired successfully. 2) Inside row_vers_old_has_index_entry(), Change the safe_to_purge to unsafe_to_purge goto statement. So it can be more appropriate to return true if it is unsafe_to_purge. 3) Previously, row_vers_old_has_index_entry() returns false if InnoDB fetched the MDL on the table for the first time. This check(two cases) should checked only during purge thread. In row_purge_poss_sec(), again InnoDB checks whether the MDL fetched for the first time. If it is then InnoDB retry the secondary index deletion logic. So in that case, InnoDB have to clean up the memory used inside row_vers_old_has_index_entry() and shouldn't care about return value.
8fb39b2c