/ Check-in [3dc334aa]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sure that when a connection is blocking on a RESERVED lock that it continues after the lock is released. Ticket #3093. (CVS 5078)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3dc334aa4a394e85858d2441225d64d73664b5b5
User & Date: drh 2008-05-02 14:23:55
Context
2008-05-05
11:33
Fix to test code to build when ENABLE_IOTRACE is not defined. (CVS 5079) check-in: 8fa2bda4 user: danielk1977 tags: trunk
2008-05-02
14:23
Make sure that when a connection is blocking on a RESERVED lock that it continues after the lock is released. Ticket #3093. (CVS 5078) check-in: 3dc334aa user: drh tags: trunk
14:08
Add a test case for ticket #3093. (CVS 5077) check-in: 288a7655 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

     5      5   ** a legal notice, here is a blessing:
     6      6   **
     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12         -** $Id: btree.c,v 1.452 2008/04/24 19:15:10 shane Exp $
           12  +** $Id: btree.c,v 1.453 2008/05/02 14:23:55 drh Exp $
    13     13   **
    14     14   ** This file implements a external (disk-based) database using BTrees.
    15     15   ** See the header comment on "btreeInt.h" for additional information.
    16     16   ** Including a description of file format and an overview of operation.
    17     17   */
    18     18   #include "btreeInt.h"
    19     19   
................................................................................
  1895   1895           goto trans_begun;
  1896   1896         }
  1897   1897       }
  1898   1898     }
  1899   1899   #endif
  1900   1900   
  1901   1901     do {
  1902         -    while( rc==SQLITE_OK && pBt->pPage1==0 ){
  1903         -      rc = lockBtree(pBt);
         1902  +    if( pBt->pPage1==0 ){
         1903  +      do{
         1904  +        rc = lockBtree(pBt);
         1905  +      }while( pBt->pPage1==0 && rc==SQLITE_OK );
  1904   1906       }
  1905   1907   
  1906   1908       if( rc==SQLITE_OK && wrflag ){
  1907   1909         if( pBt->readOnly ){
  1908   1910           rc = SQLITE_READONLY;
  1909   1911         }else{
  1910   1912           rc = sqlite3PagerBegin(pBt->pPage1->pDbPage, wrflag>1);

Changes to test/tkt3093.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Ticket #3093
    13     13   #
    14     14   # Verify that a busy callback waiting on a reserved lock resolves
    15     15   # once the lock clears.
    16     16   #
    17         -# $Id: tkt3093.test,v 1.1 2008/05/02 14:08:56 drh Exp $
           17  +# $Id: tkt3093.test,v 1.2 2008/05/02 14:23:55 drh Exp $
    18     18   #
    19     19   
    20     20   set testdir [file dirname $argv0]
    21     21   source $testdir/tester.tcl
    22     22   
    23     23   # Set up a test database
    24     24   #