1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix a race condition in the locking code that would sometimes cause

SQLITE_PROTOCOL or SQLITE_CORRUPT to be returned when SQLITE_BUSY should
have been returned. (CVS 326)

FossilOrigin-Name: b0d218876442187af08161d989e6887b1cb4130c
This commit is contained in:
drh
2001-12-14 15:09:55 +00:00
parent 6a6cfb9b31
commit a7fcb05988
8 changed files with 267 additions and 228 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.42 2001/12/05 00:21:20 drh Exp $
** $Id: btree.c,v 1.43 2001/12/14 15:09:57 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -990,7 +990,10 @@ static int getPayload(BtCursor *pCur, int offset, int amt, char *zBuf){
}
sqlitepager_unref(pOvfl);
}
return amt==0 ? SQLITE_OK : SQLITE_CORRUPT;
if( amt>0 ){
return SQLITE_CORRUPT;
}
return SQLITE_OK;
}
/*