SQLite

Check-in [3dc334aa4a]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3dc334aa4a394e85858d2441225d64d73664b5b5
User & Date: drh 2008-05-02 14:23:55.000
Context
2008-05-05
11:33
Fix to test code to build when ENABLE_IOTRACE is not defined. (CVS 5079) (check-in: 8fa2bda4c5 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: 3dc334aa4a user: drh tags: trunk)
14:08
Add a test case for ticket #3093. (CVS 5077) (check-in: 288a7655c9 user: drh tags: trunk)
Changes
Unified Diff Show Whitespace Changes Patch
Changes to src/btree.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
** 2004 April 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    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 $
**
** 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.
*/
#include "btreeInt.h"












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
** 2004 April 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    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.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.
*/
#include "btreeInt.h"

1895
1896
1897
1898
1899
1900
1901
1902

1903

1904
1905
1906
1907
1908
1909
1910
        goto trans_begun;
      }
    }
  }
#endif

  do {
    while( rc==SQLITE_OK && pBt->pPage1==0 ){

      rc = lockBtree(pBt);

    }

    if( rc==SQLITE_OK && wrflag ){
      if( pBt->readOnly ){
        rc = SQLITE_READONLY;
      }else{
        rc = sqlite3PagerBegin(pBt->pPage1->pDbPage, wrflag>1);







|
>

>







1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
        goto trans_begun;
      }
    }
  }
#endif

  do {
    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;
      }else{
        rc = sqlite3PagerBegin(pBt->pPage1->pDbPage, wrflag>1);
Changes to test/tkt3093.test.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#***********************************************************************
#
# 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 $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Set up a test database
#







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#***********************************************************************
#
# Ticket #3093
#
# Verify that a busy callback waiting on a reserved lock resolves
# once the lock clears.
#
# $Id: tkt3093.test,v 1.2 2008/05/02 14:23:55 drh Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Set up a test database
#