/ Check-in [a42cb81d]
Login

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

Overview
Comment:Fix a bug in the default busy handler for systems that lack usleep(). Ticket #1284. (CVS 2514)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a42cb81d1173532537aed4e71091d4cd3f3a88a0
User & Date: drh 2005-06-14 02:24:32
Context
2005-06-14
16:04
Provide the SQLITE_FILE_HEADER command-line option for changing the text that appears at the beginning of databases. (CVS 2515) check-in: 3d7ee5b9 user: drh tags: trunk
02:24
Fix a bug in the default busy handler for systems that lack usleep(). Ticket #1284. (CVS 2514) check-in: a42cb81d user: drh tags: trunk
02:12
Do not record existance the sqlite_sequence table until it is actually created. Ticket #1283. (CVS 2513) check-in: 95256d95 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
...
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
**
*************************************************************************
** 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.293 2005/05/26 16:23:34 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** The following constant value is used by the SQLITE_BIGENDIAN and
................................................................................
  if( prior + delay > timeout ){
    delay = timeout - prior;
    if( delay<=0 ) return 0;
  }
  sqlite3OsSleep(delay);
  return 1;
#else
  int timeout = (int)Timeout;
  if( (count+1)*1000 > timeout ){
    return 0;
  }
  sqlite3OsSleep(1000);
  return 1;
#endif
}







|







 







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
**
*************************************************************************
** 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.294 2005/06/14 02:24:32 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** The following constant value is used by the SQLITE_BIGENDIAN and
................................................................................
  if( prior + delay > timeout ){
    delay = timeout - prior;
    if( delay<=0 ) return 0;
  }
  sqlite3OsSleep(delay);
  return 1;
#else
  int timeout = ((sqlite3 *)ptr)->busyTimeout;
  if( (count+1)*1000 > timeout ){
    return 0;
  }
  sqlite3OsSleep(1000);
  return 1;
#endif
}