-C Avoid\sattempting\sto\sread\s0\sbytes\sfrom\sa\sfile\sin\sthe\sosinst\svtab\scode.
-D 2019-10-07T10:29:18.641
+C Store\s64-bit\soffset\svalues\sin\sosinst\slog\sfiles.
+D 2019-10-08T19:45:17.191
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/test_multiplex.h 5436d03f2d0501d04f3ed50a75819e190495b635
F src/test_mutex.c 7f4337ba23ee6b1d2ec81c189653608cb069926a
F src/test_onefile.c f31e52e891c5fef6709b9fcef54ce660648a34172423a9cbdf4cbce3ba0049f4
-F src/test_osinst.c 446494a025eb5ece24de6a9a1b97b1e390c27d59ccf42d1e5cddd61c16f811c4
+F src/test_osinst.c 0a58f8a4b03274c84c97a1060dd702004f8f2f6d9af2dba9b4daa93786bf697a
F src/test_pcache.c a5cd24730cb43c5b18629043314548c9169abb00
F src/test_quota.c 6cb9297115b551f433a9ad1741817a9831abed99
F src/test_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P ed3499a1a5c0f860b940af0edc6a6184d834001a68d59b36b0e1b21d2e6579ca
-R 167c91f002f8b3259c9adc1d3ec59b39
+P 1fb76c3e7d904cd2754270997d3d0c86237b0a630d6b1417578a8191e6e1687f
+R 3cd7734ca3a0cffa4c22dd2b9933bced
U dan
-Z 798e91aaa2dcc84e3d48ac174ec14d84
+Z 83be8f87e7b61aedcd3403b05fb69071
#endif
static void vfslog_call(
-sqlite3_vfs *, int, int, sqlite3_uint64, sqlite3_int64, int, int, int);
+sqlite3_vfs *, int, int, sqlite3_uint64, sqlite3_int64, int, int, sqlite_int64);
static void vfslog_string(sqlite3_vfs *, const char *);
/*
t = vfslog_time();
rc = p->pReal->pMethods->xRead(p->pReal, zBuf, iAmt, iOfst);
t2 = vfslog_time() - t;
- vfslog_call(p->pVfslog, OS_READ, p->iFileId, t, t2, rc, iAmt, (int)iOfst);
+ vfslog_call(p->pVfslog, OS_READ, p->iFileId, t, t2, rc, iAmt, iOfst);
return rc;
}
t = vfslog_time();
rc = p->pReal->pMethods->xWrite(p->pReal, z, iAmt, iOfst);
t2 = vfslog_time() - t;
- vfslog_call(p->pVfslog, OS_WRITE, p->iFileId, t, t2, rc, iAmt, (int)iOfst);
+ vfslog_call(p->pVfslog, OS_WRITE, p->iFileId, t, t2, rc, iAmt, iOfst);
return rc;
}
t = vfslog_time();
rc = p->pReal->pMethods->xTruncate(p->pReal, size);
t2 = vfslog_time() - t;
- vfslog_call(p->pVfslog, OS_TRUNCATE, p->iFileId, t, t2, rc, 0, (int)size);
+ vfslog_call(p->pVfslog, OS_TRUNCATE, p->iFileId, t, t2, rc, 0, size);
return rc;
}
t = vfslog_time();
rc = p->pReal->pMethods->xFileSize(p->pReal, pSize);
t2 = vfslog_time() - t;
- vfslog_call(p->pVfslog, OS_FILESIZE, p->iFileId, t, t2, rc, 0, (int)*pSize);
+ vfslog_call(p->pVfslog, OS_FILESIZE, p->iFileId, t, t2, rc, 0, *pSize);
return rc;
}
t = vfslog_time();
rc = REALVFS(pVfs)->xAccess(REALVFS(pVfs), zPath, flags, pResOut);
t2 = vfslog_time() - t;
- vfslog_call(pVfs, OS_ACCESS, 0, t, t2, rc, flags, *pResOut);
+ vfslog_call(pVfs, OS_ACCESS, 0, t, t2, rc, flags, (sqlite3_int64)*pResOut);
vfslog_string(pVfs, zPath);
return rc;
}
p[3] = (unsigned char)v;
}
+static void vfslogPut64bits(unsigned char *p, sqlite3_int64 v){
+ vfslogPut32bits(p, (v >> 32) & 0xFFFFFFFF);
+ vfslogPut32bits(&p[4], v & 0xFFFFFFFF);
+}
+
+#define VFSLOG_RECORD_SIZE 36
+
static void vfslog_call(
sqlite3_vfs *pVfs,
int eEvent,
sqlite3_int64 nClick,
int return_code,
int size,
- int offset
+ sqlite3_int64 offset
){
VfslogVfs *p = (VfslogVfs *)pVfs;
unsigned char *zRec;
- if( (32+p->nBuf)>sizeof(p->aBuf) ){
+ if( (VFSLOG_RECORD_SIZE+p->nBuf)>sizeof(p->aBuf) ){
vfslog_flush(p);
}
zRec = (unsigned char *)&p->aBuf[p->nBuf];
vfslogPut32bits(&zRec[0], eEvent);
vfslogPut32bits(&zRec[4], iFileid);
- vfslogPut32bits(&zRec[8], (unsigned int)((tStamp>>32)&0xffffffff));
- vfslogPut32bits(&zRec[12], (unsigned int)(tStamp&0xffffffff));
+ vfslogPut64bits(&zRec[8], (sqlite3_int64)tStamp);
vfslogPut32bits(&zRec[16], (unsigned int)(nClick&0xffffffff));
vfslogPut32bits(&zRec[20], return_code);
vfslogPut32bits(&zRec[24], size);
- vfslogPut32bits(&zRec[28], offset);
- p->nBuf += 32;
+ vfslogPut64bits(&zRec[28], offset);
+
+ p->nBuf += VFSLOG_RECORD_SIZE;
}
static void vfslog_string(sqlite3_vfs *pVfs, const char *zStr){
sqlite3_free(pCsr->zTransient);
pCsr->zTransient = 0;
- nRead = 32;
+ nRead = VFSLOG_RECORD_SIZE;
if( pCsr->iOffset+nRead<=p->nByte ){
int eEvent;
rc = p->pFd->pMethods->xRead(p->pFd, pCsr->aBuf, nRead, pCsr->iOffset);
case 2: {
unsigned int v1 = get32bits(&pCsr->aBuf[8]);
unsigned int v2 = get32bits(&pCsr->aBuf[12]);
- sqlite3_result_int64(ctx,(((sqlite3_int64)v1) << 32) + (sqlite3_int64)v2);
+ sqlite3_result_int64(
+ ctx,(((sqlite3_int64)v1) << 32) + (sqlite3_int64)v2
+ );
+ break;
+ }
+ case 6: {
+ unsigned int v1 = get32bits(&pCsr->aBuf[28]);
+ unsigned int v2 = get32bits(&pCsr->aBuf[32]);
+ sqlite3_result_int64(
+ ctx,(((sqlite3_int64)v1) << 32) + (sqlite3_int64)v2
+ );
break;
}
default: {