consider THR_LOCK and mdl optimizations from 5.7
Removing Scalability Bottlenecks in the Metadata Locking and THR_LOCK Subsystems in MySQL 5.7