mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Reset the busy callback iteration counter at the beginning of each
lock test loop. (CVS 4864) FossilOrigin-Name: 66777f048195e4242905c40f790ed7360af7028b
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.415 2008/03/10 14:12:53 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.416 2008/03/14 19:33:06 drh Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@@ -2572,6 +2572,7 @@ static int pager_wait_on_lock(Pager *pPager, int locktype){
|
||||
if( pPager->state>=locktype ){
|
||||
rc = SQLITE_OK;
|
||||
}else{
|
||||
if( pPager->pBusyHandler ) pPager->pBusyHandler->nBusy = 0;
|
||||
do {
|
||||
rc = sqlite3OsLock(pPager->fd, locktype);
|
||||
}while( rc==SQLITE_BUSY && sqlite3InvokeBusyHandler(pPager->pBusyHandler) );
|
||||
|
Reference in New Issue
Block a user