/ Check-in [abe5a25b]
Login

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

Overview
Comment:The sqlite_busy_timeout() function was interpreting its second argument as seconds, not milliseconds as advertised. This patch fixes the problem. (CVS 284)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:abe5a25b9dcf1e47f3cb37fd419f620db03bd4da
User & Date: drh 2001-10-09 13:46:01
Context
2001-10-09
14:00
Version 2.0.2 (CVS 468) check-in: 44d00a6f user: drh tags: trunk
13:46
The sqlite_busy_timeout() function was interpreting its second argument as seconds, not milliseconds as advertised. This patch fixes the problem. (CVS 284) check-in: abe5a25b user: drh tags: trunk
12:44
Remove files before rebuilding. (CVS 283) check-in: 6307641d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.44 2001/10/08 13:22:33 drh Exp $
           17  +** $Id: main.c,v 1.45 2001/10/09 13:46:01 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "os.h"
    21     21   
    22     22   /*
    23     23   ** This is the callback routine for the code that initializes the
    24     24   ** database.  See sqliteInit() below for additional information.
................................................................................
   470    470       delay = delay*2;
   471    471       if( delay>=1000 ){
   472    472         delay = 1000;
   473    473         prior_delay += 1000*(count - i - 1);
   474    474         break;
   475    475       }
   476    476     }
   477         -  if( prior_delay + delay > timeout*1000 ){
   478         -    delay = timeout*1000 - prior_delay;
          477  +  if( prior_delay + delay > timeout ){
          478  +    delay = timeout - prior_delay;
   479    479       if( delay<=0 ) return 0;
   480    480     }
   481    481     sqliteOsSleep(delay);
   482    482     return 1;
   483    483   #else
   484    484     int timeout = (int)Timeout;
   485    485     if( (count+1)*1000 > timeout ){