SQLite

Check-in [4a9999a36d]
Login

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

Overview
Comment:The sqlite3_vfs_register() interface now calls sqlite3_vfs_find(0) to make sure the VFS subsystem is initialized. Ticket #2611. (CVS 4369)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4a9999a36d01a8c6490792605a6f7e233cc4402c
User & Date: drh 2007-09-02 17:52:04.000
Context
2007-09-03
07:31
Fixes to test code so that the test suite passes without SQLITE_MEMDEBUG defined. (CVS 4370) (check-in: ed2a2e0102 user: danielk1977 tags: trunk)
2007-09-02
17:52
The sqlite3_vfs_register() interface now calls sqlite3_vfs_find(0) to make sure the VFS subsystem is initialized. Ticket #2611. (CVS 4369) (check-in: 4a9999a36d user: drh tags: trunk)
17:50
Fix function name typo in mem1.c. This bug managed to make it into the tree because the code in mem1.c is only compiled when the -DSQLITE_MEMDEBUG compile-time option is omitted. But pre-checkin tests usually include this option. Ticket #2612. (CVS 4368) (check-in: 59e02db240 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os.c.
1
2
3
4
5
6
7
8
/*
** 2005 November 29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
|







1
2
3
4
5
6
7
8
 /*
** 2005 November 29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
213
214
215
216
217
218
219

220
221
222
223
224
225
226
/*
** Register a VFS with the system.  It is harmless to register the same
** VFS multiple times.  The new VFS becomes the default if makeDflt is
** true.
*/
int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
  sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);

  sqlite3_mutex_enter(mutex);
  vfsUnlink(pVfs);
  if( makeDflt || vfsList==0 ){
    pVfs->pNext = vfsList;
    vfsList = pVfs;
  }else{
    pVfs->pNext = vfsList->pNext;







>







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
/*
** Register a VFS with the system.  It is harmless to register the same
** VFS multiple times.  The new VFS becomes the default if makeDflt is
** true.
*/
int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
  sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
  sqlite3_vfs_find(0);  /* Make sure we are initialized */
  sqlite3_mutex_enter(mutex);
  vfsUnlink(pVfs);
  if( makeDflt || vfsList==0 ){
    pVfs->pNext = vfsList;
    vfsList = pVfs;
  }else{
    pVfs->pNext = vfsList->pNext;