Purpose
Handles table locking for transactions.
Synopsis
virtual int external_lock
( |
thd, |
|
| |
lock_type); |
|
| THD * |
thd
; |
| int |
lock_type
; |
Description
This is the external_lock method.
The “locking functions 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_berkely.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().
Parameters
Return Values
There are no return values.
Default Implementation
{ return 0; }