mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix spurious errors that may occur if an empty database is opened and then initialized as a WAL database by a second connection.
FossilOrigin-Name: 16330a2f7262173a32ae48a72c0ee2522b6dc554
This commit is contained in:
@@ -2397,7 +2397,7 @@ int sqlite3WalRead(
|
||||
iOffset = walFrameOffset(iRead, sz) + WAL_FRAME_HDRSIZE;
|
||||
*pInWal = 1;
|
||||
/* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */
|
||||
return sqlite3OsRead(pWal->pWalFd, pOut, nOut, iOffset);
|
||||
return sqlite3OsRead(pWal->pWalFd, pOut, (nOut>sz ? sz : nOut), iOffset);
|
||||
}
|
||||
|
||||
*pInWal = 0;
|
||||
|
Reference in New Issue
Block a user