WL#7304: Improve MDL performance and scalability by implementing "fast-path" for DML locks

Affects: Server-5.7   —   Status: Complete

Since typical user workload/workload used in typical benchmarks consists of DML
statements it makes sense to improve performance/scalability by optimizing MDL
subsystem for such type of statements.

One of possible approaches is to implemenent "fast-path" for metadata locks
acquired by DML statements, which will convert acquisition/release of DML lock
(S, SH, SW, SR locks) into counter increment/decrement (under protection of
MDL_lock::m_rwlock) instead of more complex code involving list manipulation.
(Indeed this means that MDL lock acquisition for DDL becomes more complex).

Benchmarking of draft patch implementing this idea shown that it provides at
least 10% performance improvement in single-table OLTP_RO/POINT_SELECT SysBench
tests.

User Documentation
==================

http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-4.html