SQLite

Check-in [f6e956525b]
Login

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

Overview
Comment:Fix compilation issues with the VFS stat extension.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f6e956525b03fa07190e5521edac4758c386cc80
User & Date: mistachkin 2016-06-01 05:02:05.387
Context
2016-06-01
10:37
Fix an issue preventing RBU vacuum from working with virtual tables. (check-in: 3bd85fa5a9 user: dan tags: trunk)
05:02
Fix compilation issues with the VFS stat extension. (check-in: f6e956525b user: mistachkin tags: trunk)
2016-05-31
18:44
Add the columns=N parameter to the CSV extension. (check-in: 28ebeadd6a user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/misc/vfsstat.c.
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
  VStatFile *p = (VStatFile *)pFile;
  return p->pReal->pMethods->xShmLock(p->pReal, offset, n, flags);
}

/* Memory barrier operation on shared memory */
static void vstatShmBarrier(sqlite3_file *pFile){
  VStatFile *p = (VStatFile *)pFile;
  return p->pReal->pMethods->xShmBarrier(p->pReal);
}

/* Unmap a shared memory segment */
static int vstatShmUnmap(sqlite3_file *pFile, int deleteFlag){
  VStatFile *p = (VStatFile *)pFile;
  return p->pReal->pMethods->xShmUnmap(p->pReal, deleteFlag);
}







|







398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
  VStatFile *p = (VStatFile *)pFile;
  return p->pReal->pMethods->xShmLock(p->pReal, offset, n, flags);
}

/* Memory barrier operation on shared memory */
static void vstatShmBarrier(sqlite3_file *pFile){
  VStatFile *p = (VStatFile *)pFile;
  p->pReal->pMethods->xShmBarrier(p->pReal);
}

/* Unmap a shared memory segment */
static int vstatShmUnmap(sqlite3_file *pFile, int deleteFlag){
  VStatFile *p = (VStatFile *)pFile;
  return p->pReal->pMethods->xShmUnmap(p->pReal, deleteFlag);
}
802
803
804
805
806
807
808
809
810
811
812
813
814
815
  sqlite3 *db, 
  char **pzErrMsg, 
  const sqlite3_api_routines *pApi
){
  int rc = SQLITE_OK;
  SQLITE_EXTENSION_INIT2(pApi);
  vstat_vfs.pVfs = sqlite3_vfs_find(0);
  vstat_vfs.base.szOsFile = sizeof(VStatFile) + pNew->pVfs->szOsFile;
  rc = sqlite3_vfs_register(&vstat_vfs.base, 1);
  if( rc==SQLITE_OK ){
    rc = sqlite3_auto_extension((void(*)(void))vstatRegister);
  }
  return rc;
}







|






802
803
804
805
806
807
808
809
810
811
812
813
814
815
  sqlite3 *db, 
  char **pzErrMsg, 
  const sqlite3_api_routines *pApi
){
  int rc = SQLITE_OK;
  SQLITE_EXTENSION_INIT2(pApi);
  vstat_vfs.pVfs = sqlite3_vfs_find(0);
  vstat_vfs.base.szOsFile = sizeof(VStatFile) + vstat_vfs.pVfs->szOsFile;
  rc = sqlite3_vfs_register(&vstat_vfs.base, 1);
  if( rc==SQLITE_OK ){
    rc = sqlite3_auto_extension((void(*)(void))vstatRegister);
  }
  return rc;
}