remove HA_EXTRA_PREPARE_FOR_RENAME - neither OPTIMIZE nor REPAIR need it (was introduced in b58e79566c when replacing remove_table_from_cache() with wait_while_table_is_used() even though remove_table_from_cache() did not have it).
b58e79566c
that requires MDL_SHARED_NO_READ_WRITE.