diff options
author | drh <drh@noemail.net> | 2008-07-11 21:02:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-07-11 21:02:53 +0000 |
commit | a34605859d16febe0b51db0231827cd0458f55b3 (patch) | |
tree | 122be86383110e49ba55ec92fade12274fc4c643 /src/vdbeaux.c | |
parent | f46080903008c923aaba6936590ab27ad80d0e4b (diff) | |
download | sqlite-a34605859d16febe0b51db0231827cd0458f55b3.tar.gz sqlite-a34605859d16febe0b51db0231827cd0458f55b3.zip |
Detect and handles the case where a row is modified or deleted while it
is being read during SELECT processing. (CVS 5399)
FossilOrigin-Name: c80a5d09935c60a2a50bc262c172a94073355f0d
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r-- | src/vdbeaux.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 6e61ce446..79fe89f00 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -14,7 +14,7 @@ ** to version 2.8.7, all this code was combined into the vdbe.c source file. ** But that file was getting too big so this subroutines were split out. ** -** $Id: vdbeaux.c,v 1.396 2008/07/11 16:15:18 drh Exp $ +** $Id: vdbeaux.c,v 1.397 2008/07/11 21:02:54 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -1864,6 +1864,14 @@ int sqlite3VdbeCursorMoveto(Cursor *p){ #endif p->deferredMoveto = 0; p->cacheStatus = CACHE_STALE; + }else if( p->pCursor ){ + int hasMoved; + int rc = sqlite3BtreeCursorHasMoved(p->pCursor, &hasMoved); + if( rc ) return rc; + if( hasMoved ){ + p->cacheStatus = CACHE_STALE; + p->nullRow = 1; + } } return SQLITE_OK; } |