Home | History | Annotate | Download | only in orig

Lines Matching full:sqlite3_file

1129 ** An [sqlite3_file] object represents an open file in the 
1137 typedef struct sqlite3_file sqlite3_file;
1138 struct sqlite3_file {
1146 ** [sqlite3_file] object (or, more commonly, a subclass of the
1147 ** [sqlite3_file] object) with a pointer to an instance of this object.
1149 ** against the open file represented by the [sqlite3_file] object.
1151 ** If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element
1155 ** is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element
1235 int (*xClose)(sqlite3_file*);
1236 int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
1237 int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
1238 int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
1239 int (*xSync)(sqlite3_file*, int flags);
1240 int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
1241 int (*xLock)(sqlite3_file*, int);
1242 int (*xUnlock)(sqlite3_file*, int);
1243 int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
1244 int (*xFileControl)(sqlite3_file*, int op, void *pArg);
1245 int (*xSectorSize)(sqlite3_file*);
1246 int (*xDeviceCharacteristics)(sqlite3_file*);
1248 int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);
1249 int (*xShmLock)(sqlite3_file*, int offset, int n, int flags);
1250 void (*xShmBarrier)(sqlite3_file*);
1251 int (*xShmUnmap)(sqlite3_file*, int deleteFlag);
1290 ** to the [sqlite3_file] object associated with a particular database
1367 ** file control is sent to the open [sqlite3_file] object corresponding
1431 ** The szOsFile field is the size of the subclassed [sqlite3_file]
1461 ** the [sqlite3_file] can safely store a pointer to the
1520 ** to hold the [sqlite3_file] structure passed as the third
1523 ** the xOpen method must set the sqlite3_file.pMethods to either
1525 ** this even if the open fails. SQLite expects that the sqlite3_file.pMethods
1577 int szOsFile; /* Size of subclassed sqlite3_file */
1582 int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
6274 ** a pointer to the underlying [sqlite3_file] object to be written into
9004 SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*);
9459 ** Functions for accessing sqlite3_file methods
9461 SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file*);
9462 SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset);
9463 SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset);
9464 SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size);
9465 SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file*, int);
9466 SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file*, i64 *pSize);
9467 SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file*, int);
9468 SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file*, int);
9469 SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut);
9470 SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file*,int,void*);
9471 SQLITE_PRIVATE void sqlite3OsFileControlHint(sqlite3_file*,int,void*);
9473 SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id);
9474 SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id);
9475 SQLITE_PRIVATE int sqlite3OsShmMap(sqlite3_file *,int,int,int,void volatile **);
9476 SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int, int, int);
9477 SQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id);
9478 SQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int);
9484 SQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);
9502 SQLITE_PRIVATE int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*);
9503 SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *);
12089 SQLITE_PRIVATE int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);
12091 SQLITE_PRIVATE int sqlite3JournalCreate(sqlite3_file *);
12096 SQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *);
12098 SQLITE_PRIVATE int sqlite3IsMemJournal(sqlite3_file *);
14726 ** of the sqlite3_file object. This is mostly just syntactic sugar. All
14730 SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file *pId){
14738 SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){
14742 SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file *id, const void *pBuf, int amt, i64 offset){
14746 SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file *id, i64 size){
14749 SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file *id, int flags){
14753 SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file *id, i64 *pSize){
14757 SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file *id, int lockType){
14761 SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file *id, int lockType){
14764 SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut){
14777 SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
14781 SQLITE_PRIVATE void sqlite3OsFileControlHint(sqlite3_file *id, int op, void *pArg){
14785 SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id){
14786 int (*xSectorSize)(sqlite3_file*) = id->pMethods->xSectorSize;
14789 SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id){
14792 SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int offset, int n, int flags){
14795 SQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id){
14798 SQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int deleteFlag){
14802 sqlite3_file *id, /* Database file handle */
14819 sqlite3_file *pFile,
14898 sqlite3_file **ppFile,
14903 sqlite3_file *pFile;
14904 pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile);
14915 SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *pFile){
22945 ** The os2File structure is subclass of sqlite3_file specific for the OS/2
22976 static int os2Close( sqlite3_file *id ){
23004 sqlite3_file *id, /* File to read from */
23035 sqlite3_file *id, /* File to write into */
23066 static int os2Truncate( sqlite3_file *id, i64 nByte ){
23098 static int os2Sync( sqlite3_file *id, int flags ){
23121 static int os2FileSize( sqlite3_file *id, sqlite3_int64 *pSize ){
23198 static int os2Lock( sqlite3_file *id, int locktype ){
23335 static int os2CheckReservedLock( sqlite3_file *id, int *pOut ){
23381 static int os2Unlock( sqlite3_file *id, int locktype ){
23437 static int os2FileControl(sqlite3_file *id, int op, void *pArg){
23473 static int os2SectorSize(sqlite3_file *id){
23481 static int os2DeviceCharacteristics(sqlite3_file *id){
23948 sqlite3_file *id, /* Handle open on database file */
24040 sqlite3_file *id, /* The underlying database file */
24088 sqlite3_file *id, /* Database file holding the shared memory */
24206 sqlite3_file *id /* Database file holding the shared memory */
24223 ** sqlite3_file for os2.
24343 sqlite3_file *id, /* Write the SQLite file handle here */
24846 ** * sqlite3_file methods not associated with locking.
25011 ** The unixFile structure is subclass of sqlite3_file specific to the unix
25943 ** The sqlite3_file structure for POSIX is no longer just an integer file
26272 static int unixCheckReservedLock(sqlite3_file *id, int *pResOut){
26383 static int unixLock(sqlite3_file *id, int eFileLock){
26630 static int posixUnlock(sqlite3_file *id, int eFileLock, int handleNFSUnlock){
26795 static int unixUnlock(sqlite3_file *id, int eFileLock){
26809 static int closeUnixFile(sqlite3_file *id){
26834 static int unixClose(sqlite3_file *id){
26878 static int nolockCheckReservedLock(sqlite3_file *NotUsed, int *pResOut){
26883 static int nolockLock(sqlite3_file *NotUsed, int NotUsed2){
26887 static int nolockUnlock(sqlite3_file *NotUsed, int NotUsed2){
26895 static int nolockClose(sqlite3_file *id) {
26940 static int dotlockCheckReservedLock(sqlite3_file *id, int *pResOut) {
26991 static int dotlockLock(sqlite3_file *id, int eFileLock) {
27041 static int dotlockUnlock(sqlite3_file *id, int eFileLock) {
27086 static int dotlockClose(sqlite3_file *id) {
27136 static int flockCheckReservedLock(sqlite3_file *id, int *pResOut){
27211 ** lock states in the sqlite3_file structure, but all locks SHARED or
27218 static int flockLock(sqlite3_file *id, int eFileLock) {
27262 static int flockUnlock(sqlite3_file *id, int eFileLock) {
27296 static int flockClose(sqlite3_file *id) {
27326 static int semCheckReservedLock(sqlite3_file *id, int *pResOut) {
27387 ** lock states in the sqlite3_file structure, but all locks SHARED or
27394 static int semLock(sqlite3_file *id, int eFileLock) {
27428 static int semUnlock(sqlite3_file *id, int eFileLock) {
27465 static int semClose(sqlite3_file *id) {
27570 static int afpCheckReservedLock(sqlite3_file *id, int *pResOut){
27640 static int afpLock(sqlite3_file *id, int eFileLock){
27822 static int afpUnlock(sqlite3_file *id, int eFileLock) {
27925 static int afpClose(sqlite3_file *id) {
27968 static int nfsUnlock(sqlite3_file *id, int eFileLock){
27982 **************** Non-locking sqlite3_file methods *****************************
27985 ** sqlite3_file object other than the locking methods. The locking
28056 sqlite3_file *id,
28135 sqlite3_file *id,
28379 static int unixSync(sqlite3_file *id, int flags){
28428 static int unixTruncate(sqlite3_file *id, i64 nByte){
28468 static int unixFileSize(sqlite3_file *id, i64 *pSize){
28497 static int proxyFileControl(sqlite3_file*,int,void*);
28571 static int unixFileControl(sqlite3_file *id, int op, void *pArg){
28636 static int unixSectorSize(sqlite3_file *pFile){
28654 static int unixDeviceCharacteristics(sqlite3_file *id){
29031 sqlite3_file *fd, /* Handle open on database file */
29142 sqlite3_file *fd, /* Database file holding the shared memory */
29254 sqlite3_file *fd /* Database file holding the shared memory */
29269 sqlite3_file *fd, /* The underlying database file */
29319 ** Here ends the implementation of all sqlite3_file methods.
29321 ********************** End sqlite3_file Methods *******************************
29464 static int proxyClose(sqlite3_file*);
29465 static int proxyLock(sqlite3_file*, int);
29466 static int proxyUnlock(sqlite3_file*, int);
29467 static int proxyCheckReservedLock(sqlite3_file*, int*);
29615 sqlite3_file *pId, /* Write to the unixFile structure here */
30031 sqlite3_file *pFile, /* The file descriptor to be filled in */
30944 rc = fillInUnixFile(&dummyVfs, fd, (sqlite3_file*)pNew, path, 0);
31079 rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType);
31130 rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, SHARED_LOCK);
31133 rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType);
31256 rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, EXCLUSIVE_LOCK);
31271 rc = unixWrite((sqlite3_file *)conchFile, writeBuffer, writeSize, 0);
31304 conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, SHARED_LOCK);
31355 conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);
31379 rc = conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);
31453 rc=lockProxy->pMethod->xClose((sqlite3_file *)lockProxy);
31571 pCtx->conchFile->pMethod->xClose((sqlite3_file *)pCtx->conchFile);
31588 static int proxyFileControl(sqlite3_file *id, int op, void *pArg){
31658 static int proxyCheckReservedLock(sqlite3_file *id, int *pResOut) {
31665 return proxy->pMethod->xCheckReservedLock((sqlite3_file*)proxy, pResOut);
31697 static int proxyLock(sqlite3_file *id, int eFileLock) {
31704 rc = proxy->pMethod->xLock((sqlite3_file*)proxy, eFileLock);
31721 static int proxyUnlock(sqlite3_file *id, int eFileLock) {
31728 rc = proxy->pMethod->xUnlock((sqlite3_file*)proxy, eFileLock);
31740 static int proxyClose(sqlite3_file *id) {
31749 rc = lockProxy->pMethod->xUnlock((sqlite3_file*)lockProxy, NO_LOCK);
31751 rc = lockProxy->pMethod->xClose((sqlite3_file*)lockProxy);
31761 rc = conchFile->pMethod->xClose((sqlite3_file*)conchFile);
32165 ** The winFile structure is a subclass of sqlite3_file* specific to the win32
33705 static int winClose(sqlite3_file *id){
33744 sqlite3_file *id, /* File to read from */
33782 sqlite3_file *id, /* File to write into */
33836 static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
33880 static int winSync(sqlite3_file *id, int flags){
33941 static int winFileSize(sqlite3_file *id, sqlite3_int64 *pSize){
34048 static int winLock(sqlite3_file *id, int locktype){
34174 static int winCheckReservedLock(sqlite3_file *id, int *pResOut){
34207 static int winUnlock(sqlite3_file *id, int locktype){
34257 static int winFileControl(sqlite3_file *id, int op, void *pArg){
34328 static int winSectorSize(sqlite3_file *id){
34336 static int winDeviceCharacteristics(sqlite3_file *id){
34508 static int winOpen(sqlite3_vfs*,const char*,sqlite3_file*,int,int*);
34539 winClose((sqlite3_file *)&p->hFile);
34618 (sqlite3_file*)&pShmNode->hFile, /* File handle here */
34629 rc = winTruncate((sqlite3_file *)&pShmNode->hFile, 0);
34679 sqlite3_file *fd, /* Database holding shared memory */
34720 sqlite3_file *fd, /* Database file holding the shared memory */
34829 sqlite3_file *fd /* Database holding the shared memory */
34857 sqlite3_file *fd, /* Handle open on database file */
34889 rc = winFileSize((sqlite3_file *)&pShmNode->hFile, &sz);
34904 rc = winTruncate((sqlite3_file *)&pShmNode->hFile, nByte);
34977 ** Here ends the implementation of all sqlite3_file methods.
34979 ********************** End sqlite3_file Methods *******************************
34984 ** sqlite3_file for win32.
35114 sqlite3_file *id, /* Write the SQLite file handle here */
38367 SQLITE_PRIVATE int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *, int, i64, Wal**);
38554 ** associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file
39075 sqlite3_file *fd; /* File descriptor for database */
39076 sqlite3_file *jfd; /* File descriptor for main journal */
39077 sqlite3_file *sjfd; /* File descriptor for sub-journal */
39191 ** The argument to this macro is a file descriptor (type sqlite3_file*).
39445 static int read32bits(sqlite3_file *fd, i64 offset, u32 *pRes){
39464 static int write32bits(sqlite3_file *fd, i64 offset, u32 val){
39629 static int readMasterJournal(sqlite3_file *pJrnl, char *zMaster, u32 nMaster){
40534 sqlite3_file *jfd; /* The file descriptor for the journal file */
40790 sqlite3_file *pMaster; /* Malloc'd master-journal file descriptor */
40791 sqlite3_file *pJournal; /* Malloc'd child-journal file descriptor */
40801 pMaster = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile * 2);
40802 pJournal = (sqlite3_file *)(((u8 *)pMaster) + pVfs->szOsFile);
41838 sqlite3_file *pFile, /* Write the file descriptor here */
42841 pPager->fd = (sqlite3_file*)(pPtr += ROUND8(pcacheSize));
42842 pPager->sjfd = (sqlite3_file*)(pPtr += ROUND8(pVfs->szOsFile));
42843 pPager->jfd = (sqlite3_file*)(pPtr += journalFileSize);
44724 SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager *pPager){
45745 sqlite3_file
45746 sqlite3_file *pWalFd; /* File handle for WAL file */
46585 sqlite3_file *pDbFd, /* The open database file */
46618 pRet->pWalFd = (sqlite3_file *)&pRet[1];
47976 sqlite3_file
53316 sqlite3_file *fd;
57935 static int backupTruncateFile(sqlite3_file *pFile, i64 iSize){
58095 sqlite3_file * const pFile = sqlite3PagerFile(pDestPager);
58306 sqlite3_file *pFd; /* File descriptor for database pTo */
61343 sqlite3_file *pMaster = 0;
71748 sqlite3_file *pTemp1; /* PMA file 1 */
71762 sqlite3_file *pFile; /* File iterator is reading from */
71854 sqlite3_file *pFile, /* File to write to */
71881 sqlite3_file *pFile, /* File to read from */
72096 static int vdbeSorterOpenTempFile(sqlite3 *db, sqlite3_file **ppFile){
72333 sqlite3_file *pTemp2 = 0; /* Second temp file to use */
72418 sqlite3_file *pTmp = pSorter->pTemp1;
72541 ** This file implements a special kind of sqlite3_file object used
72545 ** The distinctive characteristic of this sqlite3_file is that the
72559 ** A JournalFile object is a subclass of sqlite3_file used by
72569 sqlite3_file *pReal; /* The "real" underlying file descriptor */
72581 sqlite3_file *pReal = (sqlite3_file *)&p[1];
72597 static int jrnlClose(sqlite3_file *pJfd){
72610 sqlite3_file *pJfd, /* The journal file from which to read */
72631 sqlite3_file *pJfd, /* The journal file into which to write */
72657 static int jrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
72671 static int jrnlSync(sqlite3_file *pJfd, int flags){
72685 static int jrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){
72697 ** Table of methods for JournalFile sqlite3_file object.
72725 sqlite3_file *pJfd, /* Preallocated, blank file handle */
72751 SQLITE_PRIVATE int sqlite3JournalCreate(sqlite3_file *p){
72825 ** This subclass is a subclass of sqlite3_file. Each open memory-journal
72840 sqlite3_file *pJfd, /* The journal file from which to read */
72885 sqlite3_file *pJfd, /* The journal file into which to write */
72934 static int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
72952 static int memjrnlClose(sqlite3_file *pJfd){
72966 static int memjrnlSync(sqlite3_file *NotUsed, int NotUsed2){
72974 static int memjrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){
72981 ** Table of methods for MemJournal sqlite3_file object.
73006 SQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *pJfd){
73017 SQLITE_PRIVATE int sqlite3IsMemJournal(sqlite3_file *pJfd){
92890 sqlite3_file *pFile = sqlite3PagerFile(pPager);
92903 sqlite3_file *pFile = sqlite3PagerFile(pPager);
115149 sqlite3_file *fd;
115156 *(sqlite3_file**)pArg = fd;