/ Check-in [e87d499a]
Login

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

Overview
Comment:An SQLITE_PROTOCOL error counts as a locking error for verification purposes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e87d499a4f8a456111c1f96ca6da31d0810fb7c8
User & Date: drh 2011-02-19 23:18:12
Context
2011-02-21
11:46
Have os_unix.c call sqlite3_log() following errors in certain system calls. check-in: 01076528 user: dan tags: trunk
2011-02-19
23:18
An SQLITE_PROTOCOL error counts as a locking error for verification purposes. check-in: e87d499a user: drh tags: trunk
17:02
Change a testcase() added by the previous checkin into an assert(). check-in: 6f3dad32 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

  2016   2016     ** is more of a scheduler yield than an actual delay.  But on the 10th
  2017   2017     ** an subsequent retries, the delays start becoming longer and longer, 
  2018   2018     ** so that on the 100th (and last) RETRY we delay for 21 milliseconds.
  2019   2019     ** The total delay time before giving up is less than 1 second.
  2020   2020     */
  2021   2021     if( cnt>5 ){
  2022   2022       int nDelay = 1;                      /* Pause time in microseconds */
  2023         -    if( cnt>100 ) return SQLITE_PROTOCOL;
         2023  +    if( cnt>100 ){
         2024  +      VVA_ONLY( pWal->lockError = 1; )
         2025  +      return SQLITE_PROTOCOL;
         2026  +    }
  2024   2027       if( cnt>=10 ) nDelay = (cnt-9)*238;  /* Max delay 21ms. Total delay 996ms */
  2025   2028       sqlite3OsSleep(pWal->pVfs, nDelay);
  2026   2029     }
  2027   2030   
  2028   2031     if( !useWal ){
  2029   2032       rc = walIndexReadHdr(pWal, pChanged);
  2030   2033       if( rc==SQLITE_BUSY ){