/ Check-in [733778df]
Login

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

Overview
Comment:Remove the compile_option pragma (retaining compile_options - with an "s"). Updates to documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 733778df996a2dda7c31ff7b544cb6f9a6ed4c97
User & Date: drh 2010-02-26 15:39:24
Context
2010-02-26
16:37
Rename the sqlite_compile_option_*() SQL functions to sqlite_compileoption_*() for consistency with the C/C++ interface. check-in: dd4962aa user: drh tags: trunk
15:39
Remove the compile_option pragma (retaining compile_options - with an "s"). Updates to documentation. check-in: 733778df user: drh tags: trunk
15:09
Avoid a buffer overwrite that can occur with a corrupt database if secure-delete is enabled. check-in: 7bdb1e05 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

  1359   1359       }
  1360   1360     }else
  1361   1361   #endif /* SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */
  1362   1362   
  1363   1363   #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
  1364   1364     /*
  1365   1365     **   PRAGMA compile_options
  1366         -  **   PRAGMA compile_option(<option>)
  1367   1366     **
  1368         -  ** The first form returns a single row for each option that was 
  1369         -  ** defined at compile time.  The second form returns 0 or 1 
  1370         -  ** indicating whether the specified option was defined at 
  1371         -  ** compile time.
         1367  +  ** Return the names of all compile-time options used in this build,
         1368  +  ** one option per row.
  1372   1369     */
  1373         -  if( sqlite3StrICmp(zLeft, "compile_option")==0 && zRight ){
  1374         -    int used = sqlite3_compileoption_used(zRight);
  1375         -    returnSingleInt(pParse, zRight, used);
  1376         -  }else
  1377         -
  1378   1370     if( sqlite3StrICmp(zLeft, "compile_options")==0 ){
  1379   1371       int i = 0;
  1380   1372       const char *zOpt;
  1381   1373       sqlite3VdbeSetNumCols(v, 1);
  1382   1374       pParse->nMem = 1;
  1383   1375       sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "compile_option", SQLITE_STATIC);
  1384   1376       while( (zOpt = sqlite3_compileoption_get(i++))!=0 ){

Changes to src/sqlite.h.in.

   137    137   ** See also: [sqlite_version()] and [sqlite_source_id()].
   138    138   */
   139    139   SQLITE_EXTERN const char sqlite3_version[];
   140    140   const char *sqlite3_libversion(void);
   141    141   const char *sqlite3_sourceid(void);
   142    142   int sqlite3_libversion_number(void);
   143    143   
          144  +#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
   144    145   /*
   145    146   ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
   146         -** KEYWORDS: sqlite3_compileoption_used, sqlite3_compileoption_get
   147    147   **
   148    148   ** ^The sqlite3_compileoption_used() function returns 0 or 1 
   149    149   ** indicating whether the specified option was defined at 
   150    150   ** compile time.  ^The SQLITE_ prefix may be omitted from the 
   151    151   ** option name passed to sqlite3_compileoption_used().  
   152    152   **
   153    153   ** ^The sqlite3_compileoption_get() function allows interating
................................................................................
   155    155   ** returning the N-th compile time option string.  ^If N is out of range,
   156    156   ** sqlite3_compileoption_get() returns a NULL pointer.  ^The SQLITE_ 
   157    157   ** prefix is omitted from any strings returned by 
   158    158   ** sqlite3_compileoption_get().
   159    159   **
   160    160   ** ^Support for the diagnostic functions sqlite3_compileoption_used()
   161    161   ** and sqlite3_compileoption_get() may be omitted by specifing the 
   162         -** SQLITE_OMIT_COMPILEOPTION_DIAGS option at compile time.
          162  +** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.
   163    163   **
   164         -** See also: [sqlite_compile_option_used()] and [sqlite_compile_option_get()].
          164  +** See also: SQL functions [sqlite_compileoption_used()] and
          165  +** [sqlite_compileoption_get()] and the [compile_options pragma].
   165    166   */
   166         -#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
   167    167   int sqlite3_compileoption_used(const char *zOptName);
   168    168   const char *sqlite3_compileoption_get(int N);
   169    169   #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
   170    170   
   171    171   /*
   172    172   ** CAPI3REF: Test To See If The Library Is Threadsafe
   173    173   **
................................................................................
  5691   5691   int sqlite3_strnicmp(const char *, const char *, int);
  5692   5692   
  5693   5693   /*
  5694   5694   ** CAPI3REF: Error Logging Interface
  5695   5695   ** EXPERIMENTAL
  5696   5696   **
  5697   5697   ** ^The [sqlite3_log()] interface writes a message into the error log
  5698         -** established by the [SQLITE_CONFIG_ERRORLOG] option to [sqlite3_config()].
         5698  +** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].
  5699   5699   ** ^If logging is enabled, the zFormat string and subsequent arguments are
  5700   5700   ** passed through to [sqlite3_vmprintf()] to generate the final output string.
  5701   5701   **
  5702   5702   ** The sqlite3_log() interface is intended for use by extensions such as
  5703   5703   ** virtual tables, collating functions, and SQL functions.  While there is
  5704   5704   ** nothing to prevent an application from calling sqlite3_log(), doing so
  5705   5705   ** is considered bad form.