mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Do not return SQLITE_IOERR when the user attempts to open a small file that is not a database with mmap enabled. Instead return SQLITE_NOTADB.
FossilOrigin-Name: bbcaab3e80d0ff776d8567094b137d1483b3377b
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Fix\sa\scase\sin\sthe\spager\swhere\san\sxFetch()\sreference\swas\sbeing\sleaked\sfollowing\san\sOOM\serror.
|
C Do\snot\sreturn\sSQLITE_IOERR\swhen\sthe\suser\sattempts\sto\sopen\sa\ssmall\sfile\sthat\sis\snot\sa\sdatabase\swith\smmap\senabled.\sInstead\sreturn\sSQLITE_NOTADB.
|
||||||
D 2013-03-25T13:50:49.946
|
D 2013-03-25T14:31:39.689
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in 9a804abbd3cae82d196e4d33aba13239e32522a5
|
F Makefile.in 9a804abbd3cae82d196e4d33aba13239e32522a5
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -162,7 +162,7 @@ F src/os.h 782980cd0d840b4240a6e29ba9f8ef0ca0d750ca
|
|||||||
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
|
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
|
||||||
F src/os_unix.c 1e61abcb664f3430ce13e5c5f32b2b2e204a6f23
|
F src/os_unix.c 1e61abcb664f3430ce13e5c5f32b2b2e204a6f23
|
||||||
F src/os_win.c 386f8c034b177b672f7819ddc5d80be6c8d593ac
|
F src/os_win.c 386f8c034b177b672f7819ddc5d80be6c8d593ac
|
||||||
F src/pager.c 3da35f3287791354f170824fd847e75ba9f2a0dc
|
F src/pager.c 2dd59f366b519d01d08b44f615058e7cfacd0bd7
|
||||||
F src/pager.h 241d72dc0905df042da165f086d03505cb0bb50c
|
F src/pager.h 241d72dc0905df042da165f086d03505cb0bb50c
|
||||||
F src/parse.y 5d5e12772845805fdfeb889163516b84fbb9ae95
|
F src/parse.y 5d5e12772845805fdfeb889163516b84fbb9ae95
|
||||||
F src/pcache.c f8043b433a57aba85384a531e3937a804432a346
|
F src/pcache.c f8043b433a57aba85384a531e3937a804432a346
|
||||||
@@ -1039,7 +1039,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||||
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
|
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
|
||||||
P 1431be95579160fb70408d43e17fc23c7b69ab4a
|
P 5885ba6ce768658ec25b60747430d147b315b55c
|
||||||
R 2702651dc0367254a02a7905a85901b0
|
R c243df2223b3431445e14c1469df7b20
|
||||||
U dan
|
U dan
|
||||||
Z 4827c382c08dac8144315d5de3ed2c37
|
Z 6b851eca8762089c75296a1160d8987e
|
||||||
|
@@ -1 +1 @@
|
|||||||
5885ba6ce768658ec25b60747430d147b315b55c
|
bbcaab3e80d0ff776d8567094b137d1483b3377b
|
@@ -5051,7 +5051,7 @@ int sqlite3PagerSharedLock(Pager *pPager){
|
|||||||
if( !pPager->tempFile && (
|
if( !pPager->tempFile && (
|
||||||
pPager->pBackup
|
pPager->pBackup
|
||||||
|| sqlite3PcachePagecount(pPager->pPCache)>0
|
|| sqlite3PcachePagecount(pPager->pPCache)>0
|
||||||
|| pPager->bUseFetch /* TODO: Currently required for xUnfetch(0) only. */
|
|| pPager->bUseFetch
|
||||||
)){
|
)){
|
||||||
/* The shared-lock has just been acquired on the database file
|
/* The shared-lock has just been acquired on the database file
|
||||||
** and there are already pages in the cache (from a previous
|
** and there are already pages in the cache (from a previous
|
||||||
@@ -5078,7 +5078,7 @@ int sqlite3PagerSharedLock(Pager *pPager){
|
|||||||
if( nPage>0 ){
|
if( nPage>0 ){
|
||||||
IOTRACE(("CKVERS %p %d\n", pPager, sizeof(dbFileVers)));
|
IOTRACE(("CKVERS %p %d\n", pPager, sizeof(dbFileVers)));
|
||||||
rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24);
|
rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24);
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK && rc!=SQLITE_IOERR_SHORT_READ ){
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
Reference in New Issue
Block a user