Login | Register
Use thd->LOCK_ha_data to protect thd->open_tables, not LOCK_open. There is no need to use LOCK_open for that (inspect the code).