mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add the "lock_status" pragma - only available when SQLITE_DEBUG is defined.
Used for testing only. (CVS 1547) FossilOrigin-Name: 0ecbba78fcde8f7715cd74c674b5040ef4953f6e
This commit is contained in:
13
src/pager.c
13
src/pager.c
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.113 2004/06/07 16:27:46 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.114 2004/06/09 14:17:21 drh Exp $
|
||||
*/
|
||||
#include "os.h" /* Must be first to enable large file support */
|
||||
#include "sqliteInt.h"
|
||||
@@ -2705,6 +2705,17 @@ sync_exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef SQLITE_DEBUG
|
||||
/*
|
||||
** Return the current state of the file lock for the given pager.
|
||||
** The return value is one of NO_LOCK, SHARED_LOCK, RESERVED_LOCK,
|
||||
** PENDING_LOCK, or EXCLUSIVE_LOCK.
|
||||
*/
|
||||
int sqlite3pager_lockstate(Pager *pPager){
|
||||
return pPager->fd.locktype;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
/*
|
||||
** Print a listing of all referenced pages and their ref count.
|
||||
|
Reference in New Issue
Block a user