1 #pragma GCC diagnostic ignored "-Wcast-qual" 2 #pragma GCC diagnostic ignored "-Wmissing-field-initializers" 3 #pragma GCC diagnostic ignored "-Wunused-function" 4 #pragma GCC diagnostic ignored "-Wunused-parameter" 8 #define SQLITE_OPEN_WAL 0x00080000 9 #define SQLITE_FCNTL_SIZE_HINT 5 10 #define SQLITE_FCNTL_CHUNK_SIZE 6 11 #define SQLITE_FCNTL_SYNC_OMITTED 8 13 #define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0 14 #define SQLITE_DEFAULT_SECTOR_SIZE 512 16 #define UNUSED_PARAMETER(x) (void)(x) 17 #define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y) 19 #define ArraySize(X) ((int)(sizeof(X)/sizeof(X[0]))) 21 typedef sqlite_int64
i64;
24 #define _FILE_OFFSET_BITS 64 25 #define _LARGEFILE_SOURCE 1 36 #include <sys/types.h> 43 #ifndef SQLITE_DEFAULT_FILE_PERMISSIONS 44 # define SQLITE_DEFAULT_FILE_PERMISSIONS 0644 50 #define MAX_PATHNAME 512 52 #define SQLITE_TEMP_FILE_PREFIX "etilqs_" 111 sqlite3_io_methods
const * pMethod;
129 unsigned char transCntrChng;
130 unsigned char dbUpdate;
131 unsigned char inNormalWrite;
137 #define UNIXFILE_EXCL 0x01 138 #define UNIXFILE_RDONLY 0x02 144 # define O_LARGEFILE 0 146 #ifdef SQLITE_DISABLE_LFS 148 # define O_LARGEFILE 0 151 # define O_NOFOLLOW 0 158 typedef void (*sqlite3_syscall_ptr)(void);
165 static int unixLogErrorAtLine(
int errcode,
const char * zFunc,
const char * zPath,
int iLine);
169 static int fillInUnixFile(sqlite3_vfs * pVfs,
int h,
int dirfd, sqlite3_file * pId,
const char * zFilename,
int noLock,
int isDelete,
int isReadOnly);
176 static int full_fsync(
int fd,
int fullSync,
int dataOnly);
181 static int unixRead(sqlite3_file *
id,
void * pBuf,
int amt, sqlite3_int64
offset);
182 static int unixWrite(sqlite3_file *
id,
const void * pBuf,
int amt, sqlite3_int64
offset);
186 static int nolockLock(sqlite3_file * NotUsed,
int NotUsed2);
187 static int nolockUnlock(sqlite3_file * NotUsed,
int NotUsed2);
193 static int unixOpen(sqlite3_vfs * pVfs,
const char * zPath, sqlite3_file * pFile,
int flags,
int * pOutFlags);
194 static int unixDelete(sqlite3_vfs * NotUsed,
const char * zPath,
int dirSync);
195 static int unixAccess(sqlite3_vfs * NotUsed,
const char * zPath,
int flags,
int * pResOut);
196 static int unixFullPathname(sqlite3_vfs * pVfs,
const char * zPath,
int nOut,
char * zOut);
197 static void *
unixDlOpen(sqlite3_vfs * NotUsed,
const char * zFilename);
198 static void unixDlError(sqlite3_vfs * NotUsed,
int nBuf,
char * zBufOut);
199 static void (*
unixDlSym(sqlite3_vfs * NotUsed,
void *
p,
const char * zSym))(void);
200 static void unixDlClose(sqlite3_vfs * NotUsed,
void * pHandle);
201 static int unixRandomness(sqlite3_vfs * NotUsed,
int nBuf,
char * zBuf);
202 static int unixSleep(sqlite3_vfs * NotUsed,
int microseconds);
204 static int unixGetLastError(sqlite3_vfs * NotUsed,
int NotUsed2,
char * NotUsed3);
206 static int unixSetSystemCall(sqlite3_vfs * pNotUsed,
const char * zName, sqlite3_syscall_ptr pNewFunc);
207 static sqlite3_syscall_ptr
unixGetSystemCall(sqlite3_vfs * pNotUsed,
const char * zName);
215 sqlite3_log(SQLITE_CANTOPEN,
216 "cannot open file at line %d of [%.10s]",
217 lineno, 20 + sqlite3_sourceid());
220 "myvfs.c: cannot open file at line %d of [%.10s]",
221 lineno, 20 + sqlite3_sourceid());
222 return SQLITE_CANTOPEN;
224 #define SQLITE_CANTOPEN_BKPT sqlite3CantopenError(__LINE__) 243 return 0x3fffffff & (
int)(z2 - z);
254 sqlite3_syscall_ptr pCurrent;
255 sqlite3_syscall_ptr pDefault;
257 {
"open", (sqlite3_syscall_ptr)
open, 0 },
260 {
"close", (sqlite3_syscall_ptr)close, 0 },
263 {
"access", (sqlite3_syscall_ptr)
access, 0 },
266 {
"getcwd", (sqlite3_syscall_ptr)getcwd, 0 },
269 {
"stat", (sqlite3_syscall_ptr)
stat, 0 },
280 #define osFstat(a,b,c) 0 282 {
"fstat", (sqlite3_syscall_ptr)fstat, 0 },
286 {
"ftruncate", (sqlite3_syscall_ptr)ftruncate, 0 },
289 {
"fcntl", (sqlite3_syscall_ptr)fcntl, 0 },
292 {
"read", (sqlite3_syscall_ptr)read, 0 },
295 #
if defined(USE_PREAD)
296 {
"pread", (sqlite3_syscall_ptr)pread, 0 },
298 {
"pread", (sqlite3_syscall_ptr)0, 0 },
302 #
if defined(USE_PREAD64)
303 {
"pread64", (sqlite3_syscall_ptr)pread64, 0 },
305 {
"pread64", (sqlite3_syscall_ptr)0, 0 },
309 {
"write", (sqlite3_syscall_ptr)write, 0 },
312 #
if defined(USE_PREAD)
313 {
"pwrite", (sqlite3_syscall_ptr)pwrite, 0 },
315 {
"pwrite", (sqlite3_syscall_ptr)0, 0 },
317 #define
osPwrite ((ssize_t(*)(
int,
const void*,size_t,off_t))\
318 aSyscall[12].pCurrent)
320 #
if defined(USE_PREAD64)
321 {
"pwrite64", (sqlite3_syscall_ptr)pwrite64, 0 },
323 {
"pwrite64", (sqlite3_syscall_ptr)0, 0 },
325 #define
osPwrite64 ((ssize_t(*)(
int,
const void*,size_t,off_t))\
326 aSyscall[13].pCurrent)
328 {
"fchmod", (sqlite3_syscall_ptr)0, 0 },
331 #
if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
332 {
"fallocate", (sqlite3_syscall_ptr)posix_fallocate, 0 },
334 {
"fallocate", (sqlite3_syscall_ptr)0, 0 },
372 typedef const sqlite3_io_methods * (*finder_type)(
const char *,
unixFile *);
390 #define unixLogError(a,b,c) unixLogErrorAtLine(a,b,c,__LINE__) 400 zErr = strerror(iErrno);
401 assert(errcode != SQLITE_OK);
407 "os_unix.c:%d: (%d) %s(%s) - %s",
408 iLine, iErrno, zFunc, zPath, zErr
412 "myvfs.c:%d: (%d) %s(%s) - %s",
413 iLine, iErrno, zFunc, zPath, zErr
427 while (rc < 0 && errno == EINTR);
460 while (rc < 0 && errno == EINTR);
477 if (pFile->
dirfd >= 0) {
498 const char * zFilename,
504 const sqlite3_io_methods * pLockingStyle;
507 assert(pNew->
pInode == NULL);
516 assert(zFilename == 0 || zFilename[0] ==
'/');
519 pNew->
zPath = zFilename;
520 if (strcmp(pVfs->zName,
"unix-excl") == 0) {
531 if (rc != SQLITE_OK) {
560 sqlite3_snprintf(
MAX_PATHNAME, zDirname,
"%s", zFilename);
561 for (ii = (
int)strlen(zDirname); ii > 1 && zDirname[ii] !=
'/'; ii--) {
578 static const char * azDirs[] = {
588 const char * zDir = 0;
589 azDirs[0] = sqlite3_temp_directory;
591 azDirs[1] =
getenv(
"TMPDIR");
593 for (i = 0; i <
sizeof(azDirs) /
sizeof(azDirs[0]); zDir = azDirs[i++]) {
600 if (!S_ISDIR(buf.st_mode)) {
618 static const unsigned char zChars[] =
619 "abcdefghijklmnopqrstuvwxyz" 620 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 640 j = (
int)strlen(zBuf);
641 sqlite3_randomness(15, &zBuf[j]);
642 for (i = 0; i < 15; i++, j++) {
643 zBuf[j] = (char)zChars[((
unsigned char)zBuf[j]) % (
sizeof(zChars) - 1) ];
683 if (0 ==
stat(zPath, &sStat)) {
686 while (pInode && (pInode->
fileId.
dev != sStat.st_dev
687 || pInode->
fileId.
ino != sStat.st_ino)) {
688 pInode = pInode->
pNext;
692 for (pp = &pInode->
pUnused; *pp && (*pp)->
flags != flags; pp = &((*pp)->pNext)) {
697 *pp = pUnused->
pNext;
746 while (nDb > 0 && zPath[nDb] !=
'l') {
750 memcpy(zDb, zPath, nDb);
752 if (0 ==
stat(zDb, &sStat)) {
753 *pMode = sStat.st_mode & 0777;
756 rc = SQLITE_IOERR_FSTAT;
759 else if (flags & SQLITE_OPEN_DELETEONCLOSE) {
782 return SQLITE_IOERR_FSTAT;
785 if (nSize > (
i64)buf.st_size) {
791 err =
osFallocate(pFile->
h, buf.st_size, nSize - buf.st_size);
793 while (err == EINTR);
795 return SQLITE_IOERR_WRITE;
831 #if __APPLE__ && __MACH__ 832 rc = fcntl(fd, F_FULLFSYNC);
856 newOffset = lseek(id->
h, offset, SEEK_SET);
857 if (newOffset != offset) {
858 if (newOffset == -1) {
859 ((
unixFile *)
id)->lastErrno = errno;
867 got =
osRead(id->
h, pBuf, cnt);
869 while (got < 0 && errno == EINTR);
871 ((
unixFile *)
id)->lastErrno = errno;
887 newOffset = lseek(id->
h, offset, SEEK_SET);
888 if (newOffset != offset) {
889 if (newOffset == -1) {
890 ((
unixFile *)
id)->lastErrno = errno;
900 while (got < 0 && errno == EINTR);
902 ((
unixFile *)
id)->lastErrno = errno;
912 fprintf(
stderr,
"trace: begin nolockClose ...\n");
921 static int unixRead(sqlite3_file *
id,
void * pBuf,
int amt, sqlite3_int64
offset)
925 fprintf(
stderr,
"trace: begin unixRead ...\n");
931 || offset >= PENDING_BYTE + 512
932 || offset + amt <= PENDING_BYTE
941 return SQLITE_IOERR_READ;
946 memset(&((
char *)pBuf)[got], 0, amt - got);
947 return SQLITE_IOERR_SHORT_READ;
955 static int unixWrite(sqlite3_file *
id,
const void * pBuf,
int amt, sqlite3_int64
offset)
959 fprintf(
stderr,
"trace: begin unixWrite ...\n");
966 || offset >= PENDING_BYTE + 512
967 || offset + amt <= PENDING_BYTE
978 if (offset <= 24 && offset + amt >= 27) {
982 if (rc != 4 || memcmp(oldCntr, &((
char *)pBuf)[24 - offset], 4) != 0) {
987 while (amt > 0 && (wrote =
seekAndWrite(pFile, offset, pBuf, amt)) > 0) {
990 pBuf = &((
char *)pBuf)[wrote];
995 return SQLITE_IOERR_WRITE;
1012 fprintf(
stderr,
"trace: begin unixTruncate ...\n");
1061 int isDataOnly = (flags & SQLITE_SYNC_DATAONLY);
1062 int isFullsync = (flags & 0x0F) == SQLITE_SYNC_FULL;
1063 fprintf(
stderr,
"trace: begin unixSync ...\n");
1065 assert((flags & 0x0F) == SQLITE_SYNC_NORMAL
1066 || (flags & 0x0F) == SQLITE_SYNC_FULL
1072 rc =
full_fsync(pFile->
h, isFullsync, isDataOnly);
1077 if (pFile->
dirfd >= 0) {
1109 ((
unixFile *)
id)->lastErrno = errno;
1110 return SQLITE_IOERR_FSTAT;
1112 *pSize = buf.st_size;
1150 case SQLITE_FCNTL_LOCKSTATE: {
1151 *(
int *)pArg = ((
unixFile *)id)->eFileLock;
1154 case SQLITE_LAST_ERRNO: {
1155 *(
int *)pArg = ((
unixFile *)id)->lastErrno;
1159 ((
unixFile *)
id)->szChunk = *(
int *)pArg;
1178 return SQLITE_NOTFOUND;
1234 sqlite3_file * pFile,
1243 int eType = flags & 0xFFFFFF00;
1246 int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE);
1247 int isDelete = (flags & SQLITE_OPEN_DELETEONCLOSE);
1248 int isCreate = (flags & SQLITE_OPEN_CREATE);
1249 int isReadonly = (flags & SQLITE_OPEN_READONLY);
1250 int isReadWrite = (flags & SQLITE_OPEN_READWRITE);
1255 int isOpenDirectory = (isCreate && (
1256 eType == SQLITE_OPEN_MASTER_JOURNAL
1257 || eType == SQLITE_OPEN_MAIN_JOURNAL
1264 const char * zName = zPath;
1265 fprintf(
stderr,
"trace: begin unixOpen ...\n");
1273 assert((isReadonly == 0 || isReadWrite == 0) && (isReadWrite || isReadonly));
1274 assert(isCreate == 0 || isReadWrite);
1275 assert(isExclusive == 0 || isCreate);
1276 assert(isDelete == 0 || isCreate);
1279 assert((!isDelete && zName) || eType != SQLITE_OPEN_MAIN_DB);
1280 assert((!isDelete && zName) || eType != SQLITE_OPEN_MAIN_JOURNAL);
1281 assert((!isDelete && zName) || eType != SQLITE_OPEN_MASTER_JOURNAL);
1284 assert(eType == SQLITE_OPEN_MAIN_DB || eType == SQLITE_OPEN_TEMP_DB
1285 || eType == SQLITE_OPEN_MAIN_JOURNAL || eType == SQLITE_OPEN_TEMP_JOURNAL
1286 || eType == SQLITE_OPEN_SUBJOURNAL || eType == SQLITE_OPEN_MASTER_JOURNAL
1290 if (eType == SQLITE_OPEN_MAIN_DB) {
1297 pUnused = sqlite3_malloc(
sizeof(*pUnused));
1299 return SQLITE_NOMEM;
1306 assert(isDelete && !isOpenDirectory);
1308 if (rc != SQLITE_OK) {
1318 openFlags |= O_RDONLY;
1321 openFlags |= O_RDWR;
1324 openFlags |= O_CREAT;
1333 if (rc != SQLITE_OK) {
1335 assert(eType ==
SQLITE_OPEN_WAL || eType == SQLITE_OPEN_MAIN_JOURNAL);
1339 if (fd < 0 && errno != EISDIR && isReadWrite && !isExclusive) {
1341 flags &= ~(SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE);
1342 openFlags &= ~(O_RDWR | O_CREAT);
1343 flags |= SQLITE_OPEN_READONLY;
1344 openFlags |= O_RDONLY;
1364 if (isOpenDirectory) {
1366 if (rc != SQLITE_OK) {
1371 assert(eType != SQLITE_OPEN_MAIN_DB);
1376 noLock = eType != SQLITE_OPEN_MAIN_DB;
1378 isDelete, isReadonly);
1380 if (rc != SQLITE_OK) {
1391 sqlite3_vfs * NotUsed,
1398 if (unlink(zPath) == (-1) && errno != ENOENT) {
1399 return unixLogError(SQLITE_IOERR_DELETE,
"unlink", zPath);
1404 if (rc == SQLITE_OK) {
1406 rc =
unixLogError(SQLITE_IOERR_DIR_FSYNC,
"fsync", zPath);
1425 sqlite3_vfs * NotUsed,
1434 case SQLITE_ACCESS_EXISTS:
1437 case SQLITE_ACCESS_READWRITE:
1438 amode = W_OK | R_OK;
1440 case SQLITE_ACCESS_READ:
1444 assert(!
"Invalid flags argument");
1446 *pResOut = (
osAccess(zPath, amode) == 0);
1447 if (flags == SQLITE_ACCESS_EXISTS && *pResOut) {
1449 if (0 ==
stat(zPath, &buf) && buf.st_size == 0) {
1479 zOut[nOut - 1] =
'\0';
1480 if (zPath[0] ==
'/') {
1481 sqlite3_snprintf(nOut, zOut,
"%s", zPath);
1485 if (
osGetcwd(zOut, nOut - 1) == 0) {
1488 nCwd = (
int)strlen(zOut);
1489 sqlite3_snprintf(nOut - nCwd, &zOut[nCwd],
"/%s", zPath);
1498 static void *
unixDlOpen(sqlite3_vfs * NotUsed,
const char * zFilename)
1501 return dlopen(zFilename, RTLD_NOW | RTLD_GLOBAL);
1511 static void unixDlError(sqlite3_vfs * NotUsed,
int nBuf,
char * zBufOut)
1517 sqlite3_snprintf(nBuf, zBufOut,
"%s", zErr);
1521 static void (*
unixDlSym(sqlite3_vfs * NotUsed,
void *
p,
const char * zSym))(void)
1540 void (*(*
x)(
void *,
const char *))(void);
1542 x = (void(*( *)(
void *,
const char *))(void))dlsym;
1543 return (*
x)(
p, zSym);
1558 assert((
size_t)nBuf >= (
sizeof(time_t) +
sizeof(
int)));
1571 memset(zBuf, 0, nBuf);
1578 memcpy(zBuf, &t,
sizeof(t));
1580 memcpy(&zBuf[
sizeof(t)], &pid,
sizeof(pid));
1581 assert(
sizeof(t) +
sizeof(pid) <= (
size_t)nBuf);
1582 nBuf =
sizeof(
t) +
sizeof(pid);
1586 nBuf =
osRead(fd, zBuf, nBuf);
1588 while (nBuf < 0 && errno == EINTR);
1604 static int unixSleep(sqlite3_vfs * NotUsed,
int microseconds)
1606 usleep(microseconds);
1608 return microseconds;
1621 *prNow = i / 86400000.0;
1651 static const sqlite3_int64 unixEpoch = 24405875 * (sqlite3_int64)8640000;
1652 struct timeval sNow;
1653 gettimeofday(&sNow, 0);
1654 *piNow = unixEpoch + 1000 * (sqlite3_int64)sNow.tv_sec + sNow.tv_usec / 1000;
1666 sqlite3_vfs * pNotUsed,
1668 sqlite3_syscall_ptr pNewFunc
1672 int rc = SQLITE_NOTFOUND;
1690 if (strcmp(zName,
aSyscall[i].zName) == 0) {
1695 if (pNewFunc == 0) {
1716 if (strcmp(zName,
aSyscall[i].zName) == 0) {
1735 if (strcmp(zName,
aSyscall[i].zName) == 0) {
1770 #define UNIXVFS(VFSNAME, FINDER) { \ 1801 static sqlite3_vfs aVfs[] = {
1809 for (i = 0; i < (
sizeof(aVfs) /
sizeof(sqlite3_vfs)); i++) {
1810 sqlite3_vfs_register(&aVfs[i], i == 0);
static int unixCurrentTimeInt64(sqlite3_vfs *NotUsed, sqlite3_int64 *piNow)
static int unixFileSize(sqlite3_file *id, i64 *pSize)
unsigned char transCntrChng
int sqlite3_os_init(void)
static int unixOpen(sqlite3_vfs *pVfs, const char *zPath, sqlite3_file *pFile, int flags, int *pOutFlags)
static const sqlite3_io_methods * nolockIoFinderImpl(const char *z, unixFile *p)
static const sqlite3_io_methods *(*const nolockIoFinder)(const char *, unixFile *p)
sqlite3_syscall_ptr pDefault
static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3)
static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf)
static int unixFullPathname(sqlite3_vfs *pVfs, const char *zPath, int nOut, char *zOut)
static int unixRead(sqlite3_file *id, void *pBuf, int amt, sqlite3_int64 offset)
#define SQLITE_DEFAULT_SECTOR_SIZE
#define UNUSED_PARAMETER(x)
static int robust_ftruncate(int h, sqlite3_int64 sz)
struct UnixUnusedFd * pUnused
static int unixSync(sqlite3_file *id, int flags)
sqlite3_syscall_ptr pCurrent
static int sqlite3CantopenError(int lineno)
static int unixSectorSize(sqlite3_file *NotUsed)
#define UNUSED_PARAMETER2(x, y)
static int sqlite3Strlen30(const char *z)
static void * unixDlOpen(sqlite3_vfs *NotUsed, const char *zFilename)
static int unixWrite(sqlite3_file *id, const void *pBuf, int amt, sqlite3_int64 offset)
#define SQLITE_FCNTL_SYNC_OMITTED
#define UNIXVFS(VFSNAME, FINDER)
static void unixDlError(sqlite3_vfs *NotUsed, int nBuf, char *zBufOut)
static int fillInUnixFile(sqlite3_vfs *pVfs, int h, int dirfd, sqlite3_file *pId, const char *zFilename, int noLock, int isDelete, int isReadOnly)
static int full_fsync(int fd, int fullSync, int dataOnly)
static int openDirectory(const char *zFilename, int *pFd)
struct unixInodeInfo * pNext
static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt)
static int unixLogErrorAtLine(int errcode, const char *zFunc, const char *zPath, int iLine)
static int unixTruncate(sqlite3_file *id, i64 nByte)
static const char * unixNextSystemCall(sqlite3_vfs *p, const char *zName)
#define SQLITE_FCNTL_SIZE_HINT
#define unixLogError(a, b, c)
unsigned char bProcessLock
static int findCreateFileMode(const char *zPath, int flags, mode_t *pMode)
static int unixSetSystemCall(sqlite3_vfs *pNotUsed, const char *zName, sqlite3_syscall_ptr pNewFunc)
#define SQLITE_TEMP_FILE_PREFIX
std::string getenv(std::string const &name)
static int closeUnixFile(sqlite3_file *id)
static struct UnixUnusedFd * findReusableFd(const char *zPath, int flags)
struct unixInodeInfo * pPrev
static int unixDeviceCharacteristics(sqlite3_file *NotUsed)
static int nolockUnlock(sqlite3_file *NotUsed, int NotUsed2)
#define SQLITE_DEFAULT_FILE_PERMISSIONS
static int robust_open(const char *z, int f, int m)
sqlite3_io_methods const * pMethod
static int nolockLock(sqlite3_file *NotUsed, int NotUsed2)
struct UnixUnusedFd * pUnused
unsigned char inNormalWrite
static int unixGetTempname(int nBuf, char *zBuf)
#define SQLITE_CANTOPEN_BKPT
static sqlite3_syscall_ptr unixGetSystemCall(sqlite3_vfs *pNotUsed, const char *zName)
static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow)
static int unixDelete(sqlite3_vfs *NotUsed, const char *zPath, int dirSync)
static int fcntlSizeHint(unixFile *pFile, i64 nByte)
static int unixFileControl(sqlite3_file *id, int op, void *pArg)
static struct unixInodeInfo * inodeList
static const char * unixTempFileDir(void)
static int unixSleep(sqlite3_vfs *NotUsed, int microseconds)
static int unixAccess(sqlite3_vfs *NotUsed, const char *zPath, int flags, int *pResOut)
static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt)
#define SQLITE_FCNTL_DB_UNCHANGED
struct unixInodeInfo * pInode
struct unixShmNode unixShmNode
static void(*)(void) unixDlSym(sqlite3_vfs *NotUsed, void *p, const char *zSym)
struct UnixUnusedFd * pNext
static int nolockClose(sqlite3_file *id)
def open(path, mode='r', buf=-1)
static struct unix_syscall aSyscall[]
static void unixDlClose(sqlite3_vfs *NotUsed, void *pHandle)
static int nolockCheckReservedLock(sqlite3_file *NotUsed, int *pResOut)
static const sqlite3_io_methods nolockIoMethods
#define SQLITE_FCNTL_CHUNK_SIZE
static void robust_close(unixFile *pFile, int h, int lineno)
h
training ###############################