WL#3035: Optimize OPTIMIZE of an open HANDLER table
Affects: Server-7.1 — Status: Un-Assigned — Priority: Medium
Things like 'optimize table' / 'alter table' shall be able to close all handler tables that are not in use. This can be done in the following way: - When accessing 'thd->handler_tables_hash' have a lock on LOCK_open. - Add a marker in the table object that the table is locked (should already exists, but better to verify that this is reset properly on unlock tables). - In remove_table_from_cache(), call mysql_ha_flush_table(... MYSQL_HA_REOPEN_ON_USAGE) for all handler tables that are not locked.
Copyright (c) 2000, 2015, Oracle Corporation and/or its affiliates. All rights reserved.