Yes, the code dropping page hash indexes in buf_LRU_mark_space_was_deleted() appears to be redundant for the DROP TABLE case (unlike the DISCARD TABLESPACE case).
It was introduced as a fix for https://bugs.launchpad.net/percona-server/+bug/798371, but that fix contained other changes, so it is unclear whether this specific code is actually needed. I'm fairly sure it is not, because indeed AHI entries are removed when freeing up index extents and that is done before calling fil_delete_tablespace(). And the upstream fix for http://bugs.mysql.com/bug.php?id=64284 relies on this fact.
Yes, the code dropping page hash indexes in buf_LRU_ mark_space_ was_deleted( ) appears to be redundant for the DROP TABLE case (unlike the DISCARD TABLESPACE case).
It was introduced as a fix for https:/ /bugs.launchpad .net/percona- server/ +bug/798371, but that fix contained other changes, so it is unclear whether this specific code is actually needed. I'm fairly sure it is not, because indeed AHI entries are removed when freeing up index extents and that is done before calling fil_delete_ tablespace( ). And the upstream fix for http:// bugs.mysql. com/bug. php?id= 64284 relies on this fact.