/ Check-in [ad5fcaa5]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:In the shell tool, avoid testing if (sqlite3_vfs.xGetCurrentInt64) is NULL for a version 1 VFS. This field is only defined for version 2 and greater.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ad5fcaa583ef743d143b6c030e0d78019709fe71
User & Date: dan 2015-11-16 08:54:10
Context
2015-11-16
16:00
Import the LSM code from SQLite4 for use in an experimental virtual table. NB: This is a speculative experiment and could easily result in a dead-end branch. check-in: 3d930501 user: drh tags: lsm-vtab
15:28
Add testfixture command "vfs_current_time_int64". Returns the value returned by the xCurrentTimeInt64 method of the default VFS. check-in: f79d5b18 user: dan tags: trunk
08:54
In the shell tool, avoid testing if (sqlite3_vfs.xGetCurrentInt64) is NULL for a version 1 VFS. This field is only defined for version 2 and greater. check-in: ad5fcaa5 user: dan tags: trunk
2015-11-15
11:13
Fix the column name uniquifier so that it works with zero-length column names. check-in: 791761eb user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

   161    161   static int enableTimer = 0;
   162    162   
   163    163   /* Return the current wall-clock time */
   164    164   static sqlite3_int64 timeOfDay(void){
   165    165     static sqlite3_vfs *clockVfs = 0;
   166    166     sqlite3_int64 t;
   167    167     if( clockVfs==0 ) clockVfs = sqlite3_vfs_find(0);
   168         -  if( clockVfs->iVersion>=1 && clockVfs->xCurrentTimeInt64!=0 ){
          168  +  if( clockVfs->iVersion>=2 && clockVfs->xCurrentTimeInt64!=0 ){
   169    169       clockVfs->xCurrentTimeInt64(clockVfs, &t);
   170    170     }else{
   171    171       double r;
   172    172       clockVfs->xCurrentTime(clockVfs, &r);
   173    173       t = (sqlite3_int64)(r*86400000.0);
   174    174     }
   175    175     return t;