1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Catch an IO error case introduced by (3808). (CVS 3809)

FossilOrigin-Name: 383a08e26083964e79bfe22156f5f554522fa1fb
This commit is contained in:
danielk1977
2007-04-05 08:40:32 +00:00
parent 2026cefaf8
commit 3997b9bb6b
3 changed files with 14 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
C Zero\scached\spages\slocated\sbeyond\sthe\send\sof\sthe\sfile\sbefore\sreturning\sthem.\sTicket\s#2285.\s(CVS\s3808)
D 2007-04-05T05:46:14
C Catch\san\sIO\serror\scase\sintroduced\sby\s(3808).\s(CVS\s3809)
D 2007-04-05T08:40:32
F Makefile.in 29fbf08ce0989973bfed0b5a052a6bdf3e60fd0a
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -86,7 +86,7 @@ F src/os_unix.c 13c6f73a7b0c2c6c131c97ea26274db101b594cd
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
F src/os_win.c c9a99524d6b2bdec636264cad1b67553925e3309
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
F src/pager.c 1808ab8f0d96f9db663ae72f1430d7f03e944183
F src/pager.c 90c1b538c55b55ab4344aea35dd00e64cb70a7fa
F src/pager.h e79a24cf200b8771366217f5bca414f5b7823f42
F src/parse.y 207ab04273ae13aa4a729b96008d294d5f334ab3
F src/pragma.c 3b992b5b2640d6ae25cef05aa6a42cd1d6c43234
@@ -450,7 +450,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 25f49acc5662ed8dd321b83a60aeeab93a37e129
R 251ec34a8be2bb7fab2cf227d3aa0f5e
P 5180810eeaa3dfe3d934af0732a920ae117ec69f
R fa9d750859a9dcc77798d46c4d2af406
U danielk1977
Z cf8f427e30b9108b742d861c8c1c1fa0
Z e261a0bded6d94427e4a7769f391adc9

View File

@@ -1 +1 @@
5180810eeaa3dfe3d934af0732a920ae117ec69f
383a08e26083964e79bfe22156f5f554522fa1fb

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.317 2007/04/05 05:46:14 danielk1977 Exp $
** @(#) $Id: pager.c,v 1.318 2007/04/05 08:40:32 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -3034,6 +3034,12 @@ int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag){
** database file. Zero such pages before returning. Not doing this
** was causing the problem reported in ticket #2285.
*/
if( pPager->errCode ){
/* This case catches an IO error in sqlite3PagerPagecount(). If
** the error occured, PagerPagecount() returned 0.
*/
return pPager->errCode;
}
memset(PGHDR_TO_DATA(pPg), 0, pPager->pageSize);
}
TEST_INCR(pPager->nHit);