Index: src/btree.c ================================================================== --- src/btree.c +++ src/btree.c @@ -7,11 +7,11 @@ ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.452 2008/04/24 19:15:10 shane Exp $ +** $Id: btree.c,v 1.453 2008/05/02 14:23:55 drh Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. ** Including a description of file format and an overview of operation. */ @@ -1897,12 +1897,14 @@ } } #endif do { - while( rc==SQLITE_OK && pBt->pPage1==0 ){ - rc = lockBtree(pBt); + if( pBt->pPage1==0 ){ + do{ + rc = lockBtree(pBt); + }while( pBt->pPage1==0 && rc==SQLITE_OK ); } if( rc==SQLITE_OK && wrflag ){ if( pBt->readOnly ){ rc = SQLITE_READONLY; Index: test/tkt3093.test ================================================================== --- test/tkt3093.test +++ test/tkt3093.test @@ -12,11 +12,11 @@ # Ticket #3093 # # Verify that a busy callback waiting on a reserved lock resolves # once the lock clears. # -# $Id: tkt3093.test,v 1.1 2008/05/02 14:08:56 drh Exp $ +# $Id: tkt3093.test,v 1.2 2008/05/02 14:23:55 drh Exp $ # set testdir [file dirname $argv0] source $testdir/tester.tcl