/ Check-in [0f8102d7]
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:Updates to documentation and requirements marks. No code changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0f8102d71a0ee828629f037775ad86fe2a544120
User & Date: drh 2014-10-04 11:59:33
Context
2014-10-04
19:31
Tweaks to documentation on sqlite3_open() and sqlite3_bind(). No code changes. check-in: b8f7f19d user: drh tags: trunk
11:59
Updates to documentation and requirements marks. No code changes. check-in: 0f8102d7 user: drh tags: trunk
2014-10-03
16:00
Add requirements marks on the sqlite3_db_status() interface implementation. Fix a typo in the documentation. Fix the new sqlite3_result_text64() routine so that it works correctly with an encoding parameter of SQLITE_UTF16. check-in: d2fc3227 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/global.c.

   125    125     0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* e0..e7    ........ */
   126    126     0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* e8..ef    ........ */
   127    127     0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* f0..f7    ........ */
   128    128     0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40   /* f8..ff    ........ */
   129    129   };
   130    130   #endif
   131    131   
          132  +/* EVIDENCE-OF: R-02982-34736 In order to maintain full backwards
          133  +** compatibility for legacy applications, the URI filename capability is
          134  +** disabled by default.
          135  +**
          136  +** EVIDENCE-OF: R-38799-08373 URI filenames can be enabled or disabled
          137  +** using the SQLITE_USE_URI=1 or SQLITE_USE_URI=0 compile-time options.
          138  +*/
   132    139   #ifndef SQLITE_USE_URI
   133    140   # define  SQLITE_USE_URI 0
   134    141   #endif
   135    142   
   136    143   #ifndef SQLITE_ALLOW_COVERING_INDEX_SCAN
   137    144   # define SQLITE_ALLOW_COVERING_INDEX_SCAN 1
   138    145   #endif

Changes to src/main.c.

   472    472         */
   473    473         typedef void(*LOGFUNC_t)(void*,int,const char*);
   474    474         sqlite3GlobalConfig.xLog = va_arg(ap, LOGFUNC_t);
   475    475         sqlite3GlobalConfig.pLogArg = va_arg(ap, void*);
   476    476         break;
   477    477       }
   478    478   
          479  +    /* EVIDENCE-OF: R-55548-33817 The compile-time setting for URI filenames
          480  +    ** can be changed at start-time using the
          481  +    ** sqlite3_config(SQLITE_CONFIG_URI,1) or
          482  +    ** sqlite3_config(SQLITE_CONFIG_URI,0) configuration calls.
          483  +    */
   479    484       case SQLITE_CONFIG_URI: {
   480    485         sqlite3GlobalConfig.bOpenUri = va_arg(ap, int);
   481    486         break;
   482    487       }
   483    488   
   484    489       case SQLITE_CONFIG_COVERING_INDEX_SCAN: {
   485    490         sqlite3GlobalConfig.bUseCis = va_arg(ap, int);
................................................................................
  2209   2214     char *zFile;
  2210   2215     char c;
  2211   2216     int nUri = sqlite3Strlen30(zUri);
  2212   2217   
  2213   2218     assert( *pzErrMsg==0 );
  2214   2219   
  2215   2220     if( ((flags & SQLITE_OPEN_URI) || sqlite3GlobalConfig.bOpenUri) 
  2216         -   && nUri>=5 && memcmp(zUri, "file:", 5)==0 
         2221  +   && nUri>=5 && memcmp(zUri, "file:", 5)==0 /* IMP: R-57884-37496 */
  2217   2222     ){
  2218   2223       char *zOpt;
  2219   2224       int eState;                   /* Parser state when parsing URI */
  2220   2225       int iIn;                      /* Input character index */
  2221   2226       int iOut = 0;                 /* Output character index */
  2222   2227       int nByte = nUri+2;           /* Bytes of space to allocate */
  2223   2228   
................................................................................
  2439   2444     */
  2440   2445     assert( SQLITE_OPEN_READONLY  == 0x01 );
  2441   2446     assert( SQLITE_OPEN_READWRITE == 0x02 );
  2442   2447     assert( SQLITE_OPEN_CREATE    == 0x04 );
  2443   2448     testcase( (1<<(flags&7))==0x02 ); /* READONLY */
  2444   2449     testcase( (1<<(flags&7))==0x04 ); /* READWRITE */
  2445   2450     testcase( (1<<(flags&7))==0x40 ); /* READWRITE | CREATE */
  2446         -  if( ((1<<(flags&7)) & 0x46)==0 ) return SQLITE_MISUSE_BKPT;
         2451  +  if( ((1<<(flags&7)) & 0x46)==0 ){
         2452  +    return SQLITE_MISUSE_BKPT;  /* IMP: R-65497-44594 */
         2453  +  }
  2447   2454   
  2448   2455     if( sqlite3GlobalConfig.bCoreMutex==0 ){
  2449   2456       isThreadsafe = 0;
  2450   2457     }else if( flags & SQLITE_OPEN_NOMUTEX ){
  2451   2458       isThreadsafe = 0;
  2452   2459     }else if( flags & SQLITE_OPEN_FULLMUTEX ){
  2453   2460       isThreadsafe = 1;

Changes to src/sqlite.h.in.

  2750   2750   ** present, is ignored.
  2751   2751   **
  2752   2752   ** ^SQLite uses the path component of the URI as the name of the disk file
  2753   2753   ** which contains the database. ^If the path begins with a '/' character, 
  2754   2754   ** then it is interpreted as an absolute path. ^If the path does not begin 
  2755   2755   ** with a '/' (meaning that the authority section is omitted from the URI)
  2756   2756   ** then the path is interpreted as a relative path. 
  2757         -** ^On windows, the first component of an absolute path 
  2758         -** is a drive specification (e.g. "C:").
         2757  +** ^(On windows, the first component of an absolute path 
         2758  +** is a drive specification (e.g. "C:").)^
  2759   2759   **
  2760   2760   ** [[core URI query parameters]]
  2761   2761   ** The query component of a URI may contain parameters that are interpreted
  2762   2762   ** either by SQLite itself, or by a [VFS | custom VFS implementation].
  2763         -** SQLite interprets the following three query parameters:
         2763  +** SQLite and its built-in [VFSes] interpret the
         2764  +** following query parameters:
  2764   2765   **
  2765   2766   ** <ul>
  2766   2767   **   <li> <b>vfs</b>: ^The "vfs" parameter may be used to specify the name of
  2767   2768   **     a VFS object that provides the operating system interface that should
  2768   2769   **     be used to access the database file on disk. ^If this option is set to
  2769   2770   **     an empty string the default VFS object is used. ^Specifying an unknown
  2770   2771   **     VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is
................................................................................
  2791   2792   **     SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to
  2792   2793   **     sqlite3_open_v2(). ^Setting the cache parameter to "private" is 
  2793   2794   **     equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit.
  2794   2795   **     ^If sqlite3_open_v2() is used and the "cache" parameter is present in
  2795   2796   **     a URI filename, its value overrides any behavior requested by setting
  2796   2797   **     SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag.
  2797   2798   **
  2798         -**  <li> <b>psow</b>: ^The psow parameter may be "true" (or "on" or "yes" or
  2799         -**     "1") or "false" (or "off" or "no" or "0") to indicate that the
         2799  +**  <li> <b>psow</b>: ^The psow parameter indicates whether or not the
  2800   2800   **     [powersafe overwrite] property does or does not apply to the
  2801         -**     storage media on which the database file resides.  ^The psow query
  2802         -**     parameter only works for the built-in unix and Windows VFSes.
         2801  +**     storage media on which the database file resides.
  2803   2802   **
  2804   2803   **  <li> <b>nolock</b>: ^The nolock parameter is a boolean query parameter
  2805   2804   **     which if set disables file locking in rollback journal modes.  This
  2806   2805   **     is useful for accessing a database on a filesystem that does not
  2807   2806   **     support locking.  Caution:  Database corruption might result if two
  2808   2807   **     or more processes write to the same database and any one of those
  2809   2808   **     processes uses nolock=1.

Changes to test/e_uri.test.

   121    121     sqlite3_close $DB
   122    122   }
   123    123   
   124    124   # ensure uri processing enabled for the rest of the tests
   125    125   sqlite3_shutdown
   126    126   sqlite3_config_uri 1
   127    127   
          128  +# EVIDENCE-OF: R-06842-00595 If the URI contains an authority, then it
          129  +# must be either an empty string or the string "localhost".
          130  +#
   128    131   # EVIDENCE-OF: R-17482-00398 If the authority is not an empty string or
   129    132   # "localhost", an error is returned to the caller.
   130    133   #
   131    134   if {$tcl_platform(platform) == "unix"} {
   132    135     set flags [list SQLITE_OPEN_READWRITE SQLITE_OPEN_CREATE SQLITE_OPEN_URI]
   133    136     foreach {tn uri error} "
   134    137       1  {file://localhost[test_pwd /]test.db}   {not an error}