/ Check-in [abe5a25b]
Login
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 Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.44 2001/10/08 13:22:33 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"

/*
** This is the callback routine for the code that initializes the
** database.  See sqliteInit() below for additional information.
................................................................................
    delay = delay*2;
    if( delay>=1000 ){
      delay = 1000;
      prior_delay += 1000*(count - i - 1);
      break;
    }
  }
  if( prior_delay + delay > timeout*1000 ){
    delay = timeout*1000 - prior_delay;
    if( delay<=0 ) return 0;
  }
  sqliteOsSleep(delay);
  return 1;
#else
  int timeout = (int)Timeout;
  if( (count+1)*1000 > timeout ){







|







 







|
|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.45 2001/10/09 13:46:01 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"

/*
** This is the callback routine for the code that initializes the
** database.  See sqliteInit() below for additional information.
................................................................................
    delay = delay*2;
    if( delay>=1000 ){
      delay = 1000;
      prior_delay += 1000*(count - i - 1);
      break;
    }
  }
  if( prior_delay + delay > timeout ){
    delay = timeout - prior_delay;
    if( delay<=0 ) return 0;
  }
  sqliteOsSleep(delay);
  return 1;
#else
  int timeout = (int)Timeout;
  if( (count+1)*1000 > timeout ){