15.9.2. Implementing the external_lock() Function
The
external_lock()
function is called at the start of a statement or when a
LOCK TABLES statement is issued.
Examples of using external_lock() can be
found in the sql/ha_innodb.cc and
sql/ha_berkeley.cc files, but most storage
engines can simply return 0, as is the case
with the EXAMPLE storage engine:
int ha_example::external_lock(THD *thd, int lock_type)
{
DBUG_ENTER("ha_example::external_lock");
DBUG_RETURN(0);
}