Making GET_LOCK behavior more predictable cross version with query rewrite
MySQL has supported the GET_LOCK() function for a large part of its history. As the manual notes, GET_LOCK() can be used to implement application locks or to simulate record locks.
Changes in MySQL 5.7
In MySQL 5.7 we improved GET_LOCK() to be based on our internal meta-data locking system (MDL).…
Source: Making GET_LOCK behavior more predictable cross version with query rewrite