/ Check-in [e3357728]
Login

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

Overview
Comment:Fix a typo inside an assert() statement introduced by the previous commit.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | exp-busy-snapshot-fix
Files: files | file ages | folders
SHA3-256:e3357728472d5e57db6d7eef0ce008bdee071b5b07b60e242f383440eebe85bd
User & Date: dan 2018-07-05 17:03:43
Context
2018-07-05
17:16
In wal mode, if a "BEGIN EXCLUSIVE" command (or any other command that upgrades from no transaction directly to a write transaction) hits an SQLITE_BUSY_SNAPSHOT error, change the error code to SQLITE_BUSY to indicate to the caller that the condition may be transient. check-in: e6108047 user: dan tags: trunk
17:03
Fix a typo inside an assert() statement introduced by the previous commit. Closed-Leaf check-in: e3357728 user: dan tags: exp-busy-snapshot-fix
15:46
In wal mode, if a "BEGIN EXCLUSIVE" command (or any other command that upgrades from no transaction directly to a write transaction) hits an SQLITE_BUSY_SNAPSHOT error, change the error code to SQLITE_BUSY to indicate to the caller that the condition may be transient. check-in: 221ff63e user: dan tags: exp-busy-snapshot-fix
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/btree.c.

3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
    }
  }else if( rc==SQLITE_BUSY_SNAPSHOT && pBt->inTransaction==TRANS_NONE ){
    /* Even if there was no transaction opened when this function was
    ** called, a race condition may cause an SQLITE_BUSY_SNAPSHOT error
    ** in wal mode (since the code above opens a read-transaction and then
    ** upgrades it to a write-transaction - it does not take the write lock
    ** atomically). In this case change the error code to SQLITE_BUSY.  */
    assert( wrFlag );
    rc = SQLITE_BUSY;
  }


trans_begun:
  if( rc==SQLITE_OK ){
    if( pSchemaVersion ){







|







3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
    }
  }else if( rc==SQLITE_BUSY_SNAPSHOT && pBt->inTransaction==TRANS_NONE ){
    /* Even if there was no transaction opened when this function was
    ** called, a race condition may cause an SQLITE_BUSY_SNAPSHOT error
    ** in wal mode (since the code above opens a read-transaction and then
    ** upgrades it to a write-transaction - it does not take the write lock
    ** atomically). In this case change the error code to SQLITE_BUSY.  */
    assert( wrflag );
    rc = SQLITE_BUSY;
  }


trans_begun:
  if( rc==SQLITE_OK ){
    if( pSchemaVersion ){