The mi_scan_locktype() accessor function
The mi_scan_locktype() function retrieves the lock type that the database server expects for the table that am_getnext scans.
Syntax
MI_LOCK_TYPE mi_scan_locktype(MI_AM_SCAN_DESC *scanDesc);
- scanDesc
- Points to the scan descriptor.
Usage
If the access method supports locking, use the return value from this function to determine whether you need to lock an object during am_getnext.
Return values
- MI_LCK_S
- Indicates a shared lock on the table.
- MI_LCK_X
- Indicates an exclusive lock on the table.
- MI_LCK_IS_S
- Indicates an intent-shared lock on the table and shared lock on the row.
- MI_LCK_IX_X
- Indicates intent-exclusive lock on the table and exclusive lock on the row.
- MI_LCK_SIX_X
- Indicates an intent-shared exclusive lock on the table and an exclusive lock on the row.