This is the external_lock
method.
The locking methods for mysql section in
lock.cc
has additional comments on this
topic that may be useful to read.
This creates a lock on the table. If you are implementing a
storage engine that can handle transactions, look at
ha_innodb.cc
to see how you will want to go
about doing this. Otherwise you should consider calling
flock()
here.
Called from lock.cc
by
lock_external()
and
unlock_external()
. Also called from
sql_table.cc
by
copy_data_between_tables()
.