SQLite Android Bindings
Check-in [f9a25feeb0]
Not logged in

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

Overview
Comment:Update to 3.8.7. Add -DHAVE_STRCHRNUL to Android.mk file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f9a25feeb07682cf631de7d07b9e0e29ee1060d8
User & Date: dan 2014-10-16 20:06:33
Context
2014-11-05
19:17
Add -DSQLITE_TEMP_STORE=3 to the SQLite compilation flags. check-in: 57831c6020 user: dan tags: trunk
2014-10-16
20:06
Update to 3.8.7. Add -DHAVE_STRCHRNUL to Android.mk file. check-in: f9a25feeb0 user: dan tags: trunk
2014-06-18
10:11
Fix a resource leak in SQLiteConnection.nativeExecuteForCursorWindow(). check-in: 3558b4d73c user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to jni/sqlite/Android.mk.

     4      4   
     5      5   # If using SEE, uncomment the following:
     6      6   # LOCAL_CFLAGS += -DSQLITE_HAS_CODEC
     7      7   
     8      8   LOCAL_CFLAGS += -DHAVE_CONFIG_H -DKHTML_NO_EXCEPTIONS -DGKWQ_NO_JAVA
     9      9   LOCAL_CFLAGS += -DNO_SUPPORT_JS_BINDING -DQT_NO_WHEELEVENT -DKHTML_NO_XBL
    10     10   LOCAL_CFLAGS += -U__APPLE__
           11  +LOCAL_CFLAGS += -DHAVE_STRCHRNUL=0
    11     12   LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast
    12     13   LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses
    13     14   LOCAL_CPPFLAGS += -Wno-conversion-null
    14     15   
    15     16   
    16     17   ifeq ($(TARGET_ARCH), arm)
    17     18   	LOCAL_CFLAGS += -DPACKED="__attribute__ ((packed))"

Changes to jni/sqlite/sqlite3.c.

more than 10,000 changes

Changes to jni/sqlite/sqlite3.h.

   103    103   ** string contains the date and time of the check-in (UTC) and an SHA1
   104    104   ** hash of the entire source tree.
   105    105   **
   106    106   ** See also: [sqlite3_libversion()],
   107    107   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
   108    108   ** [sqlite_version()] and [sqlite_source_id()].
   109    109   */
   110         -#define SQLITE_VERSION        "3.8.3"
   111         -#define SQLITE_VERSION_NUMBER 3008003
   112         -#define SQLITE_SOURCE_ID      "2013-12-17 16:32:56 93121d3097a43997af3c0de65bd9bd7663845fa2"
          110  +#define SQLITE_VERSION        "3.8.7"
          111  +#define SQLITE_VERSION_NUMBER 3008007
          112  +#define SQLITE_SOURCE_ID      "2014-10-16 18:34:50 1418c006e377d7915a50577d4ccb21125b750bae"
   113    113   
   114    114   /*
   115    115   ** CAPI3REF: Run-Time Library Version Numbers
   116    116   ** KEYWORDS: sqlite3_version, sqlite3_sourceid
   117    117   **
   118    118   ** These interfaces provide the same information as the [SQLITE_VERSION],
   119    119   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
................................................................................
   265    265   #endif
   266    266   
   267    267   /*
   268    268   ** CAPI3REF: Closing A Database Connection
   269    269   **
   270    270   ** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors
   271    271   ** for the [sqlite3] object.
   272         -** ^Calls to sqlite3_close() and sqlite3_close_v2() return SQLITE_OK if
          272  +** ^Calls to sqlite3_close() and sqlite3_close_v2() return [SQLITE_OK] if
   273    273   ** the [sqlite3] object is successfully destroyed and all associated
   274    274   ** resources are deallocated.
   275    275   **
   276    276   ** ^If the database connection is associated with unfinalized prepared
   277    277   ** statements or unfinished sqlite3_backup objects then sqlite3_close()
   278    278   ** will leave the database connection open and return [SQLITE_BUSY].
   279    279   ** ^If sqlite3_close_v2() is called with unfinalized prepared statements
   280         -** and unfinished sqlite3_backups, then the database connection becomes
          280  +** and/or unfinished sqlite3_backups, then the database connection becomes
   281    281   ** an unusable "zombie" which will automatically be deallocated when the
   282    282   ** last prepared statement is finalized or the last sqlite3_backup is
   283    283   ** finished.  The sqlite3_close_v2() interface is intended for use with
   284    284   ** host languages that are garbage collected, and where the order in which
   285    285   ** destructors are called is arbitrary.
   286    286   **
   287    287   ** Applications should [sqlite3_finalize | finalize] all [prepared statements],
   288    288   ** [sqlite3_blob_close | close] all [BLOB handles], and 
   289    289   ** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated
   290    290   ** with the [sqlite3] object prior to attempting to close the object.  ^If
   291    291   ** sqlite3_close_v2() is called on a [database connection] that still has
   292    292   ** outstanding [prepared statements], [BLOB handles], and/or
   293         -** [sqlite3_backup] objects then it returns SQLITE_OK but the deallocation
          293  +** [sqlite3_backup] objects then it returns [SQLITE_OK] and the deallocation
   294    294   ** of resources is deferred until all [prepared statements], [BLOB handles],
   295    295   ** and [sqlite3_backup] objects are also destroyed.
   296    296   **
   297    297   ** ^If an [sqlite3] object is destroyed while a transaction is open,
   298    298   ** the transaction is automatically rolled back.
   299    299   **
   300    300   ** The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)]
................................................................................
   382    382     int (*callback)(void*,int,char**,char**),  /* Callback function */
   383    383     void *,                                    /* 1st argument to callback */
   384    384     char **errmsg                              /* Error msg written here */
   385    385   );
   386    386   
   387    387   /*
   388    388   ** CAPI3REF: Result Codes
   389         -** KEYWORDS: SQLITE_OK {error code} {error codes}
   390         -** KEYWORDS: {result code} {result codes}
          389  +** KEYWORDS: {result code definitions}
   391    390   **
   392    391   ** Many SQLite functions return an integer result code from the set shown
   393    392   ** here in order to indicate success or failure.
   394    393   **
   395    394   ** New error codes may be added in future versions of SQLite.
   396    395   **
   397         -** See also: [SQLITE_IOERR_READ | extended result codes],
   398         -** [sqlite3_vtab_on_conflict()] [SQLITE_ROLLBACK | result codes].
          396  +** See also: [extended result code definitions]
   399    397   */
   400    398   #define SQLITE_OK           0   /* Successful result */
   401    399   /* beginning-of-error-codes */
   402    400   #define SQLITE_ERROR        1   /* SQL error or missing database */
   403    401   #define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */
   404    402   #define SQLITE_PERM         3   /* Access permission denied */
   405    403   #define SQLITE_ABORT        4   /* Callback routine requested an abort */
................................................................................
   429    427   #define SQLITE_WARNING     28   /* Warnings from sqlite3_log() */
   430    428   #define SQLITE_ROW         100  /* sqlite3_step() has another row ready */
   431    429   #define SQLITE_DONE        101  /* sqlite3_step() has finished executing */
   432    430   /* end-of-error-codes */
   433    431   
   434    432   /*
   435    433   ** CAPI3REF: Extended Result Codes
   436         -** KEYWORDS: {extended error code} {extended error codes}
   437         -** KEYWORDS: {extended result code} {extended result codes}
          434  +** KEYWORDS: {extended result code definitions}
   438    435   **
   439         -** In its default configuration, SQLite API routines return one of 26 integer
   440         -** [SQLITE_OK | result codes].  However, experience has shown that many of
          436  +** In its default configuration, SQLite API routines return one of 30 integer
          437  +** [result codes].  However, experience has shown that many of
   441    438   ** these result codes are too coarse-grained.  They do not provide as
   442    439   ** much information about problems as programmers might like.  In an effort to
   443    440   ** address this, newer versions of SQLite (version 3.3.8 and later) include
   444    441   ** support for additional result codes that provide more detailed information
   445         -** about errors. The extended result codes are enabled or disabled
          442  +** about errors. These [extended result codes] are enabled or disabled
   446    443   ** on a per database connection basis using the
   447         -** [sqlite3_extended_result_codes()] API.
   448         -**
   449         -** Some of the available extended result codes are listed here.
   450         -** One may expect the number of extended result codes will increase
   451         -** over time.  Software that uses extended result codes should expect
   452         -** to see new result codes in future releases of SQLite.
   453         -**
   454         -** The SQLITE_OK result code will never be extended.  It will always
   455         -** be exactly zero.
          444  +** [sqlite3_extended_result_codes()] API.  Or, the extended code for
          445  +** the most recent error can be obtained using
          446  +** [sqlite3_extended_errcode()].
   456    447   */
   457    448   #define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))
   458    449   #define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))
   459    450   #define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))
   460    451   #define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))
   461    452   #define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))
   462    453   #define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))
................................................................................
   502    493   #define SQLITE_CONSTRAINT_TRIGGER      (SQLITE_CONSTRAINT | (7<<8))
   503    494   #define SQLITE_CONSTRAINT_UNIQUE       (SQLITE_CONSTRAINT | (8<<8))
   504    495   #define SQLITE_CONSTRAINT_VTAB         (SQLITE_CONSTRAINT | (9<<8))
   505    496   #define SQLITE_CONSTRAINT_ROWID        (SQLITE_CONSTRAINT |(10<<8))
   506    497   #define SQLITE_NOTICE_RECOVER_WAL      (SQLITE_NOTICE | (1<<8))
   507    498   #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
   508    499   #define SQLITE_WARNING_AUTOINDEX       (SQLITE_WARNING | (1<<8))
          500  +#define SQLITE_AUTH_USER               (SQLITE_AUTH | (1<<8))
   509    501   
   510    502   /*
   511    503   ** CAPI3REF: Flags For File Open Operations
   512    504   **
   513    505   ** These bit values are intended for use in the
   514    506   ** 3rd parameter to the [sqlite3_open_v2()] interface and
   515    507   ** in the 4th parameter to the [sqlite3_vfs.xOpen] method.
................................................................................
   556    548   ** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
   557    549   ** information is written to disk in the same order as calls
   558    550   ** to xWrite().  The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that
   559    551   ** after reboot following a crash or power loss, the only bytes in a
   560    552   ** file that were written at the application level might have changed
   561    553   ** and that adjacent bytes, even bytes within the same sector are
   562    554   ** guaranteed to be unchanged.  The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
   563         -** flag indicate that a file cannot be deleted when open.
          555  +** flag indicate that a file cannot be deleted when open.  The
          556  +** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
          557  +** read-only media and cannot be changed even by processes with
          558  +** elevated privileges.
   564    559   */
   565    560   #define SQLITE_IOCAP_ATOMIC                 0x00000001
   566    561   #define SQLITE_IOCAP_ATOMIC512              0x00000002
   567    562   #define SQLITE_IOCAP_ATOMIC1K               0x00000004
   568    563   #define SQLITE_IOCAP_ATOMIC2K               0x00000008
   569    564   #define SQLITE_IOCAP_ATOMIC4K               0x00000010
   570    565   #define SQLITE_IOCAP_ATOMIC8K               0x00000020
................................................................................
   571    566   #define SQLITE_IOCAP_ATOMIC16K              0x00000040
   572    567   #define SQLITE_IOCAP_ATOMIC32K              0x00000080
   573    568   #define SQLITE_IOCAP_ATOMIC64K              0x00000100
   574    569   #define SQLITE_IOCAP_SAFE_APPEND            0x00000200
   575    570   #define SQLITE_IOCAP_SEQUENTIAL             0x00000400
   576    571   #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN  0x00000800
   577    572   #define SQLITE_IOCAP_POWERSAFE_OVERWRITE    0x00001000
          573  +#define SQLITE_IOCAP_IMMUTABLE              0x00002000
   578    574   
   579    575   /*
   580    576   ** CAPI3REF: File Locking Levels
   581    577   **
   582    578   ** SQLite uses one of these integer values as the second
   583    579   ** argument to calls it makes to the xLock() and xUnlock() methods
   584    580   ** of an [sqlite3_io_methods] object.
................................................................................
   677    673   ** integer opcode.  The third argument is a generic pointer intended to
   678    674   ** point to a structure that may contain arguments or space in which to
   679    675   ** write return values.  Potential uses for xFileControl() might be
   680    676   ** functions to enable blocking locks with timeouts, to change the
   681    677   ** locking strategy (for example to use dot-file locks), to inquire
   682    678   ** about the status of a lock, or to break stale locks.  The SQLite
   683    679   ** core reserves all opcodes less than 100 for its own use.
   684         -** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available.
          680  +** A [file control opcodes | list of opcodes] less than 100 is available.
   685    681   ** Applications that define a custom xFileControl method should use opcodes
   686    682   ** greater than 100 to avoid conflicts.  VFS implementations should
   687    683   ** return [SQLITE_NOTFOUND] for file control opcodes that they do not
   688    684   ** recognize.
   689    685   **
   690    686   ** The xSectorSize() method returns the sector size of the
   691    687   ** device that underlies the file.  The sector size is the
................................................................................
   750    746     int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p);
   751    747     /* Methods above are valid for version 3 */
   752    748     /* Additional methods may be added in future releases */
   753    749   };
   754    750   
   755    751   /*
   756    752   ** CAPI3REF: Standard File Control Opcodes
          753  +** KEYWORDS: {file control opcodes} {file control opcode}
   757    754   **
   758    755   ** These integer constants are opcodes for the xFileControl method
   759    756   ** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]
   760    757   ** interface.
   761    758   **
   762    759   ** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging.  This
   763    760   ** opcode causes the xFileControl method to write the current state of
................................................................................
   939    936   **
   940    937   ** <li>[[SQLITE_FCNTL_HAS_MOVED]]
   941    938   ** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
   942    939   ** pointer to an integer and it writes a boolean into that integer depending
   943    940   ** on whether or not the file has been renamed, moved, or deleted since it
   944    941   ** was first opened.
   945    942   **
          943  +** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
          944  +** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging.  This
          945  +** opcode causes the xFileControl method to swap the file handle with the one
          946  +** pointed to by the pArg argument.  This capability is used during testing
          947  +** and only needs to be supported when SQLITE_TEST is defined.
          948  +**
   946    949   ** </ul>
   947    950   */
   948    951   #define SQLITE_FCNTL_LOCKSTATE               1
   949    952   #define SQLITE_GET_LOCKPROXYFILE             2
   950    953   #define SQLITE_SET_LOCKPROXYFILE             3
   951    954   #define SQLITE_LAST_ERRNO                    4
   952    955   #define SQLITE_FCNTL_SIZE_HINT               5
................................................................................
   962    965   #define SQLITE_FCNTL_BUSYHANDLER            15
   963    966   #define SQLITE_FCNTL_TEMPFILENAME           16
   964    967   #define SQLITE_FCNTL_MMAP_SIZE              18
   965    968   #define SQLITE_FCNTL_TRACE                  19
   966    969   #define SQLITE_FCNTL_HAS_MOVED              20
   967    970   #define SQLITE_FCNTL_SYNC                   21
   968    971   #define SQLITE_FCNTL_COMMIT_PHASETWO        22
          972  +#define SQLITE_FCNTL_WIN32_SET_HANDLE       23
   969    973   
   970    974   /*
   971    975   ** CAPI3REF: Mutex Handle
   972    976   **
   973    977   ** The mutex module within SQLite defines [sqlite3_mutex] to be an
   974    978   ** abstract type for a mutex object.  The SQLite core never looks
   975    979   ** at the internal representation of an [sqlite3_mutex].  It only
................................................................................
  2022   2026   */
  2023   2027   SQLITE_API int sqlite3_complete(const char *sql);
  2024   2028   SQLITE_API int sqlite3_complete16(const void *sql);
  2025   2029   
  2026   2030   /*
  2027   2031   ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
  2028   2032   **
  2029         -** ^This routine sets a callback function that might be invoked whenever
  2030         -** an attempt is made to open a database table that another thread
  2031         -** or process has locked.
         2033  +** ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X
         2034  +** that might be invoked with argument P whenever
         2035  +** an attempt is made to access a database table associated with
         2036  +** [database connection] D when another thread
         2037  +** or process has the table locked.
         2038  +** The sqlite3_busy_handler() interface is used to implement
         2039  +** [sqlite3_busy_timeout()] and [PRAGMA busy_timeout].
  2032   2040   **
  2033         -** ^If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]
         2041  +** ^If the busy callback is NULL, then [SQLITE_BUSY]
  2034   2042   ** is returned immediately upon encountering the lock.  ^If the busy callback
  2035   2043   ** is not NULL, then the callback might be invoked with two arguments.
  2036   2044   **
  2037   2045   ** ^The first argument to the busy handler is a copy of the void* pointer which
  2038   2046   ** is the third argument to sqlite3_busy_handler().  ^The second argument to
  2039   2047   ** the busy handler callback is the number of times that the busy handler has
  2040         -** been invoked for this locking event.  ^If the
         2048  +** been invoked for the same locking event.  ^If the
  2041   2049   ** busy callback returns 0, then no additional attempts are made to
  2042         -** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned.
         2050  +** access the database and [SQLITE_BUSY] is returned
         2051  +** to the application.
  2043   2052   ** ^If the callback returns non-zero, then another attempt
  2044         -** is made to open the database for reading and the cycle repeats.
         2053  +** is made to access the database and the cycle repeats.
  2045   2054   **
  2046   2055   ** The presence of a busy handler does not guarantee that it will be invoked
  2047   2056   ** when there is lock contention. ^If SQLite determines that invoking the busy
  2048   2057   ** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]
  2049         -** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler.
         2058  +** to the application instead of invoking the 
         2059  +** busy handler.
  2050   2060   ** Consider a scenario where one process is holding a read lock that
  2051   2061   ** it is trying to promote to a reserved lock and
  2052   2062   ** a second process is holding a reserved lock that it is trying
  2053   2063   ** to promote to an exclusive lock.  The first process cannot proceed
  2054   2064   ** because it is blocked by the second and the second process cannot
  2055   2065   ** proceed because it is blocked by the first.  If both processes
  2056   2066   ** invoke the busy handlers, neither will make any progress.  Therefore,
  2057   2067   ** SQLite returns [SQLITE_BUSY] for the first process, hoping that this
  2058   2068   ** will induce the first process to release its read lock and allow
  2059   2069   ** the second process to proceed.
  2060   2070   **
  2061   2071   ** ^The default busy callback is NULL.
  2062   2072   **
  2063         -** ^The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED]
  2064         -** when SQLite is in the middle of a large transaction where all the
  2065         -** changes will not fit into the in-memory cache.  SQLite will
  2066         -** already hold a RESERVED lock on the database file, but it needs
  2067         -** to promote this lock to EXCLUSIVE so that it can spill cache
  2068         -** pages into the database file without harm to concurrent
  2069         -** readers.  ^If it is unable to promote the lock, then the in-memory
  2070         -** cache will be left in an inconsistent state and so the error
  2071         -** code is promoted from the relatively benign [SQLITE_BUSY] to
  2072         -** the more severe [SQLITE_IOERR_BLOCKED].  ^This error code promotion
  2073         -** forces an automatic rollback of the changes.  See the
  2074         -** <a href="/cvstrac/wiki?p=CorruptionFollowingBusyError">
  2075         -** CorruptionFollowingBusyError</a> wiki page for a discussion of why
  2076         -** this is important.
  2077         -**
  2078   2073   ** ^(There can only be a single busy handler defined for each
  2079   2074   ** [database connection].  Setting a new busy handler clears any
  2080   2075   ** previously set handler.)^  ^Note that calling [sqlite3_busy_timeout()]
  2081         -** will also set or clear the busy handler.
         2076  +** or evaluating [PRAGMA busy_timeout=N] will change the
         2077  +** busy handler and thus clear any previously set busy handler.
  2082   2078   **
  2083   2079   ** The busy callback should not take any actions which modify the
  2084         -** database connection that invoked the busy handler.  Any such actions
         2080  +** database connection that invoked the busy handler.  In other words,
         2081  +** the busy handler is not reentrant.  Any such actions
  2085   2082   ** result in undefined behavior.
  2086   2083   ** 
  2087   2084   ** A busy handler must not close the database connection
  2088   2085   ** or [prepared statement] that invoked the busy handler.
  2089   2086   */
  2090   2087   SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
  2091   2088   
................................................................................
  2093   2090   ** CAPI3REF: Set A Busy Timeout
  2094   2091   **
  2095   2092   ** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps
  2096   2093   ** for a specified amount of time when a table is locked.  ^The handler
  2097   2094   ** will sleep multiple times until at least "ms" milliseconds of sleeping
  2098   2095   ** have accumulated.  ^After at least "ms" milliseconds of sleeping,
  2099   2096   ** the handler returns 0 which causes [sqlite3_step()] to return
  2100         -** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED].
         2097  +** [SQLITE_BUSY].
  2101   2098   **
  2102   2099   ** ^Calling this routine with an argument less than or equal to zero
  2103   2100   ** turns off all busy handlers.
  2104   2101   **
  2105   2102   ** ^(There can only be a single busy handler for a particular
  2106         -** [database connection] any any given moment.  If another busy handler
         2103  +** [database connection] at any given moment.  If another busy handler
  2107   2104   ** was defined  (using [sqlite3_busy_handler()]) prior to calling
  2108   2105   ** this routine, that other busy handler is cleared.)^
         2106  +**
         2107  +** See also:  [PRAGMA busy_timeout]
  2109   2108   */
  2110   2109   SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
  2111   2110   
  2112   2111   /*
  2113   2112   ** CAPI3REF: Convenience Routines For Running Queries
  2114   2113   **
  2115   2114   ** This is a legacy interface that is preserved for backwards compatibility.
................................................................................
  2300   2299   **
  2301   2300   ** ^The sqlite3_malloc() routine returns a pointer to a block
  2302   2301   ** of memory at least N bytes in length, where N is the parameter.
  2303   2302   ** ^If sqlite3_malloc() is unable to obtain sufficient free
  2304   2303   ** memory, it returns a NULL pointer.  ^If the parameter N to
  2305   2304   ** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
  2306   2305   ** a NULL pointer.
         2306  +**
         2307  +** ^The sqlite3_malloc64(N) routine works just like
         2308  +** sqlite3_malloc(N) except that N is an unsigned 64-bit integer instead
         2309  +** of a signed 32-bit integer.
  2307   2310   **
  2308   2311   ** ^Calling sqlite3_free() with a pointer previously returned
  2309   2312   ** by sqlite3_malloc() or sqlite3_realloc() releases that memory so
  2310   2313   ** that it might be reused.  ^The sqlite3_free() routine is
  2311   2314   ** a no-op if is called with a NULL pointer.  Passing a NULL pointer
  2312   2315   ** to sqlite3_free() is harmless.  After being freed, memory
  2313   2316   ** should neither be read nor written.  Even reading previously freed
  2314   2317   ** memory might result in a segmentation fault or other severe error.
  2315   2318   ** Memory corruption, a segmentation fault, or other severe error
  2316   2319   ** might result if sqlite3_free() is called with a non-NULL pointer that
  2317   2320   ** was not obtained from sqlite3_malloc() or sqlite3_realloc().
  2318   2321   **
  2319         -** ^(The sqlite3_realloc() interface attempts to resize a
  2320         -** prior memory allocation to be at least N bytes, where N is the
  2321         -** second parameter.  The memory allocation to be resized is the first
  2322         -** parameter.)^ ^ If the first parameter to sqlite3_realloc()
         2322  +** ^The sqlite3_realloc(X,N) interface attempts to resize a
         2323  +** prior memory allocation X to be at least N bytes.
         2324  +** ^If the X parameter to sqlite3_realloc(X,N)
  2323   2325   ** is a NULL pointer then its behavior is identical to calling
  2324         -** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc().
  2325         -** ^If the second parameter to sqlite3_realloc() is zero or
         2326  +** sqlite3_malloc(N).
         2327  +** ^If the N parameter to sqlite3_realloc(X,N) is zero or
  2326   2328   ** negative then the behavior is exactly the same as calling
  2327         -** sqlite3_free(P) where P is the first parameter to sqlite3_realloc().
  2328         -** ^sqlite3_realloc() returns a pointer to a memory allocation
  2329         -** of at least N bytes in size or NULL if sufficient memory is unavailable.
         2329  +** sqlite3_free(X).
         2330  +** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation
         2331  +** of at least N bytes in size or NULL if insufficient memory is available.
  2330   2332   ** ^If M is the size of the prior allocation, then min(N,M) bytes
  2331   2333   ** of the prior allocation are copied into the beginning of buffer returned
  2332         -** by sqlite3_realloc() and the prior allocation is freed.
  2333         -** ^If sqlite3_realloc() returns NULL, then the prior allocation
  2334         -** is not freed.
         2334  +** by sqlite3_realloc(X,N) and the prior allocation is freed.
         2335  +** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the
         2336  +** prior allocation is not freed.
  2335   2337   **
  2336         -** ^The memory returned by sqlite3_malloc() and sqlite3_realloc()
         2338  +** ^The sqlite3_realloc64(X,N) interfaces works the same as
         2339  +** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead
         2340  +** of a 32-bit signed integer.
         2341  +**
         2342  +** ^If X is a memory allocation previously obtained from sqlite3_malloc(),
         2343  +** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then
         2344  +** sqlite3_msize(X) returns the size of that memory allocation in bytes.
         2345  +** ^The value returned by sqlite3_msize(X) might be larger than the number
         2346  +** of bytes requested when X was allocated.  ^If X is a NULL pointer then
         2347  +** sqlite3_msize(X) returns zero.  If X points to something that is not
         2348  +** the beginning of memory allocation, or if it points to a formerly
         2349  +** valid memory allocation that has now been freed, then the behavior
         2350  +** of sqlite3_msize(X) is undefined and possibly harmful.
         2351  +**
         2352  +** ^The memory returned by sqlite3_malloc(), sqlite3_realloc(),
         2353  +** sqlite3_malloc64(), and sqlite3_realloc64()
  2337   2354   ** is always aligned to at least an 8 byte boundary, or to a
  2338   2355   ** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time
  2339   2356   ** option is used.
  2340   2357   **
  2341   2358   ** In SQLite version 3.5.0 and 3.5.1, it was possible to define
  2342   2359   ** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
  2343   2360   ** implementation of these routines to be omitted.  That capability
................................................................................
  2357   2374   ** not yet been released.
  2358   2375   **
  2359   2376   ** The application must not read or write any part of
  2360   2377   ** a block of memory after it has been released using
  2361   2378   ** [sqlite3_free()] or [sqlite3_realloc()].
  2362   2379   */
  2363   2380   SQLITE_API void *sqlite3_malloc(int);
         2381  +SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
  2364   2382   SQLITE_API void *sqlite3_realloc(void*, int);
         2383  +SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
  2365   2384   SQLITE_API void sqlite3_free(void*);
         2385  +SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
  2366   2386   
  2367   2387   /*
  2368   2388   ** CAPI3REF: Memory Allocator Statistics
  2369   2389   **
  2370   2390   ** SQLite provides these two interfaces for reporting on the status
  2371   2391   ** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]
  2372   2392   ** routines, which form the built-in memory allocation subsystem.
................................................................................
  2396   2416   ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
  2397   2417   ** select random [ROWID | ROWIDs] when inserting new records into a table that
  2398   2418   ** already uses the largest possible [ROWID].  The PRNG is also used for
  2399   2419   ** the build-in random() and randomblob() SQL functions.  This interface allows
  2400   2420   ** applications to access the same PRNG for other purposes.
  2401   2421   **
  2402   2422   ** ^A call to this routine stores N bytes of randomness into buffer P.
         2423  +** ^If N is less than one, then P can be a NULL pointer.
  2403   2424   **
  2404         -** ^The first time this routine is invoked (either internally or by
  2405         -** the application) the PRNG is seeded using randomness obtained
  2406         -** from the xRandomness method of the default [sqlite3_vfs] object.
  2407         -** ^On all subsequent invocations, the pseudo-randomness is generated
         2425  +** ^If this routine has not been previously called or if the previous
         2426  +** call had N less than one, then the PRNG is seeded using randomness
         2427  +** obtained from the xRandomness method of the default [sqlite3_vfs] object.
         2428  +** ^If the previous call to this routine had an N of 1 or more then
         2429  +** the pseudo-randomness is generated
  2408   2430   ** internally and without recourse to the [sqlite3_vfs] xRandomness
  2409   2431   ** method.
  2410   2432   */
  2411   2433   SQLITE_API void sqlite3_randomness(int N, void *P);
  2412   2434   
  2413   2435   /*
  2414   2436   ** CAPI3REF: Compile-Time Authorization Callbacks
................................................................................
  2501   2523   **
  2502   2524   ** The [sqlite3_set_authorizer | authorizer callback function] must
  2503   2525   ** return either [SQLITE_OK] or one of these two constants in order
  2504   2526   ** to signal SQLite whether or not the action is permitted.  See the
  2505   2527   ** [sqlite3_set_authorizer | authorizer documentation] for additional
  2506   2528   ** information.
  2507   2529   **
  2508         -** Note that SQLITE_IGNORE is also used as a [SQLITE_ROLLBACK | return code]
  2509         -** from the [sqlite3_vtab_on_conflict()] interface.
         2530  +** Note that SQLITE_IGNORE is also used as a [conflict resolution mode]
         2531  +** returned from the [sqlite3_vtab_on_conflict()] interface.
  2510   2532   */
  2511   2533   #define SQLITE_DENY   1   /* Abort the SQL statement with an error */
  2512   2534   #define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */
  2513   2535   
  2514   2536   /*
  2515   2537   ** CAPI3REF: Authorizer Action Codes
  2516   2538   **
................................................................................
  2560   2582   #define SQLITE_REINDEX              27   /* Index Name      NULL            */
  2561   2583   #define SQLITE_ANALYZE              28   /* Table Name      NULL            */
  2562   2584   #define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
  2563   2585   #define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
  2564   2586   #define SQLITE_FUNCTION             31   /* NULL            Function Name   */
  2565   2587   #define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */
  2566   2588   #define SQLITE_COPY                  0   /* No longer used */
         2589  +#define SQLITE_RECURSIVE            33   /* NULL            NULL            */
  2567   2590   
  2568   2591   /*
  2569   2592   ** CAPI3REF: Tracing And Profiling Functions
  2570   2593   **
  2571   2594   ** These routines register callback functions that can be used for
  2572   2595   ** tracing and profiling the execution of SQL statements.
  2573   2596   **
................................................................................
  2642   2665   ** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
  2643   2666   ** object.)^ ^(If the database is opened (and/or created) successfully, then
  2644   2667   ** [SQLITE_OK] is returned.  Otherwise an [error code] is returned.)^ ^The
  2645   2668   ** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain
  2646   2669   ** an English language description of the error following a failure of any
  2647   2670   ** of the sqlite3_open() routines.
  2648   2671   **
  2649         -** ^The default encoding for the database will be UTF-8 if
  2650         -** sqlite3_open() or sqlite3_open_v2() is called and
  2651         -** UTF-16 in the native byte order if sqlite3_open16() is used.
         2672  +** ^The default encoding will be UTF-8 for databases created using
         2673  +** sqlite3_open() or sqlite3_open_v2().  ^The default encoding for databases
         2674  +** created using sqlite3_open16() will be UTF-16 in the native byte order.
  2652   2675   **
  2653   2676   ** Whether or not an error occurs when it is opened, resources
  2654   2677   ** associated with the [database connection] handle should be released by
  2655   2678   ** passing it to [sqlite3_close()] when it is no longer required.
  2656   2679   **
  2657   2680   ** The sqlite3_open_v2() interface works like sqlite3_open()
  2658   2681   ** except that it accepts two additional parameters for additional control
................................................................................
  2732   2755   ** present, is ignored.
  2733   2756   **
  2734   2757   ** ^SQLite uses the path component of the URI as the name of the disk file
  2735   2758   ** which contains the database. ^If the path begins with a '/' character, 
  2736   2759   ** then it is interpreted as an absolute path. ^If the path does not begin 
  2737   2760   ** with a '/' (meaning that the authority section is omitted from the URI)
  2738   2761   ** then the path is interpreted as a relative path. 
  2739         -** ^On windows, the first component of an absolute path 
  2740         -** is a drive specification (e.g. "C:").
         2762  +** ^(On windows, the first component of an absolute path 
         2763  +** is a drive specification (e.g. "C:").)^
  2741   2764   **
  2742   2765   ** [[core URI query parameters]]
  2743   2766   ** The query component of a URI may contain parameters that are interpreted
  2744   2767   ** either by SQLite itself, or by a [VFS | custom VFS implementation].
  2745         -** SQLite interprets the following three query parameters:
         2768  +** SQLite and its built-in [VFSes] interpret the
         2769  +** following query parameters:
  2746   2770   **
  2747   2771   ** <ul>
  2748   2772   **   <li> <b>vfs</b>: ^The "vfs" parameter may be used to specify the name of
  2749   2773   **     a VFS object that provides the operating system interface that should
  2750   2774   **     be used to access the database file on disk. ^If this option is set to
  2751   2775   **     an empty string the default VFS object is used. ^Specifying an unknown
  2752   2776   **     VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is
................................................................................
  2772   2796   **     "private". ^Setting it to "shared" is equivalent to setting the
  2773   2797   **     SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to
  2774   2798   **     sqlite3_open_v2(). ^Setting the cache parameter to "private" is 
  2775   2799   **     equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit.
  2776   2800   **     ^If sqlite3_open_v2() is used and the "cache" parameter is present in
  2777   2801   **     a URI filename, its value overrides any behavior requested by setting
  2778   2802   **     SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag.
         2803  +**
         2804  +**  <li> <b>psow</b>: ^The psow parameter indicates whether or not the
         2805  +**     [powersafe overwrite] property does or does not apply to the
         2806  +**     storage media on which the database file resides.
         2807  +**
         2808  +**  <li> <b>nolock</b>: ^The nolock parameter is a boolean query parameter
         2809  +**     which if set disables file locking in rollback journal modes.  This
         2810  +**     is useful for accessing a database on a filesystem that does not
         2811  +**     support locking.  Caution:  Database corruption might result if two
         2812  +**     or more processes write to the same database and any one of those
         2813  +**     processes uses nolock=1.
         2814  +**
         2815  +**  <li> <b>immutable</b>: ^The immutable parameter is a boolean query
         2816  +**     parameter that indicates that the database file is stored on
         2817  +**     read-only media.  ^When immutable is set, SQLite assumes that the
         2818  +**     database file cannot be changed, even by a process with higher
         2819  +**     privilege, and so the database is opened read-only and all locking
         2820  +**     and change detection is disabled.  Caution: Setting the immutable
         2821  +**     property on a database file that does in fact change can result
         2822  +**     in incorrect query results and/or [SQLITE_CORRUPT] errors.
         2823  +**     See also: [SQLITE_IOCAP_IMMUTABLE].
         2824  +**       
  2779   2825   ** </ul>
  2780   2826   **
  2781   2827   ** ^Specifying an unknown parameter in the query component of a URI is not an
  2782   2828   ** error.  Future versions of SQLite might understand additional query
  2783   2829   ** parameters.  See "[query parameters with special meaning to SQLite]" for
  2784   2830   ** additional information.
  2785   2831   **
................................................................................
  2801   2847   **          C:. Note that the %20 escaping in this example is not strictly 
  2802   2848   **          necessary - space characters can be used literally
  2803   2849   **          in URI filenames.
  2804   2850   ** <tr><td> file:data.db?mode=ro&cache=private <td> 
  2805   2851   **          Open file "data.db" in the current directory for read-only access.
  2806   2852   **          Regardless of whether or not shared-cache mode is enabled by
  2807   2853   **          default, use a private cache.
  2808         -** <tr><td> file:/home/fred/data.db?vfs=unix-nolock <td>
  2809         -**          Open file "/home/fred/data.db". Use the special VFS "unix-nolock".
         2854  +** <tr><td> file:/home/fred/data.db?vfs=unix-dotfile <td>
         2855  +**          Open file "/home/fred/data.db". Use the special VFS "unix-dotfile"
         2856  +**          that uses dot-files in place of posix advisory locking.
  2810   2857   ** <tr><td> file:data.db?mode=readonly <td> 
  2811   2858   **          An error. "readonly" is not a valid option for the "mode" parameter.
  2812   2859   ** </table>
  2813   2860   **
  2814   2861   ** ^URI hexadecimal escape sequences (%HH) are supported within the path and
  2815   2862   ** query components of a URI. A hexadecimal escape sequence consists of a
  2816   2863   ** percent sign - "%" - followed by exactly two hexadecimal digits 
................................................................................
  3048   3095   **
  3049   3096   ** [[SQLITE_LIMIT_VARIABLE_NUMBER]]
  3050   3097   ** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>
  3051   3098   ** <dd>The maximum index number of any [parameter] in an SQL statement.)^
  3052   3099   **
  3053   3100   ** [[SQLITE_LIMIT_TRIGGER_DEPTH]] ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>
  3054   3101   ** <dd>The maximum depth of recursion for triggers.</dd>)^
         3102  +**
         3103  +** [[SQLITE_LIMIT_WORKER_THREADS]] ^(<dt>SQLITE_LIMIT_WORKER_THREADS</dt>
         3104  +** <dd>The maximum number of auxiliary worker threads that a single
         3105  +** [prepared statement] may start.</dd>)^
  3055   3106   ** </dl>
  3056   3107   */
  3057   3108   #define SQLITE_LIMIT_LENGTH                    0
  3058   3109   #define SQLITE_LIMIT_SQL_LENGTH                1
  3059   3110   #define SQLITE_LIMIT_COLUMN                    2
  3060   3111   #define SQLITE_LIMIT_EXPR_DEPTH                3
  3061   3112   #define SQLITE_LIMIT_COMPOUND_SELECT           4
  3062   3113   #define SQLITE_LIMIT_VDBE_OP                   5
  3063   3114   #define SQLITE_LIMIT_FUNCTION_ARG              6
  3064   3115   #define SQLITE_LIMIT_ATTACHED                  7
  3065   3116   #define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8
  3066   3117   #define SQLITE_LIMIT_VARIABLE_NUMBER           9
  3067   3118   #define SQLITE_LIMIT_TRIGGER_DEPTH            10
         3119  +#define SQLITE_LIMIT_WORKER_THREADS           11
  3068   3120   
  3069   3121   /*
  3070   3122   ** CAPI3REF: Compiling An SQL Statement
  3071   3123   ** KEYWORDS: {SQL statement compiler}
  3072   3124   **
  3073   3125   ** To execute an SQL query, it must first be compiled into a byte-code
  3074   3126   ** program using one of these routines.
................................................................................
  3334   3386   ** number of <u>bytes</u> in the value, not the number of characters.)^
  3335   3387   ** ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16()
  3336   3388   ** is negative, then the length of the string is
  3337   3389   ** the number of bytes up to the first zero terminator.
  3338   3390   ** If the fourth parameter to sqlite3_bind_blob() is negative, then
  3339   3391   ** the behavior is undefined.
  3340   3392   ** If a non-negative fourth parameter is provided to sqlite3_bind_text()
  3341         -** or sqlite3_bind_text16() then that parameter must be the byte offset
         3393  +** or sqlite3_bind_text16() or sqlite3_bind_text64() then
         3394  +** that parameter must be the byte offset
  3342   3395   ** where the NUL terminator would occur assuming the string were NUL
  3343   3396   ** terminated.  If any NUL characters occur at byte offsets less than 
  3344   3397   ** the value of the fourth parameter then the resulting string value will
  3345   3398   ** contain embedded NULs.  The result of expressions involving strings
  3346   3399   ** with embedded NULs is undefined.
  3347   3400   **
  3348         -** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
  3349         -** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
         3401  +** ^The fifth argument to the BLOB and string binding interfaces
         3402  +** is a destructor used to dispose of the BLOB or
  3350   3403   ** string after SQLite has finished with it.  ^The destructor is called
  3351         -** to dispose of the BLOB or string even if the call to sqlite3_bind_blob(),
  3352         -** sqlite3_bind_text(), or sqlite3_bind_text16() fails.  
         3404  +** to dispose of the BLOB or string even if the call to bind API fails.
  3353   3405   ** ^If the fifth argument is
  3354   3406   ** the special value [SQLITE_STATIC], then SQLite assumes that the
  3355   3407   ** information is in static, unmanaged space and does not need to be freed.
  3356   3408   ** ^If the fifth argument has the value [SQLITE_TRANSIENT], then
  3357   3409   ** SQLite makes its own private copy of the data immediately, before
  3358   3410   ** the sqlite3_bind_*() routine returns.
         3411  +**
         3412  +** ^The sixth argument to sqlite3_bind_text64() must be one of
         3413  +** [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]
         3414  +** to specify the encoding of the text in the third parameter.  If
         3415  +** the sixth argument to sqlite3_bind_text64() is not one of the
         3416  +** allowed values shown above, or if the text encoding is different
         3417  +** from the encoding specified by the sixth parameter, then the behavior
         3418  +** is undefined.
  3359   3419   **
  3360   3420   ** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
  3361   3421   ** is filled with zeroes.  ^A zeroblob uses a fixed amount of memory
  3362   3422   ** (just an integer to hold its size) while it is being processed.
  3363   3423   ** Zeroblobs are intended to serve as placeholders for BLOBs whose
  3364   3424   ** content is later written using
  3365   3425   ** [sqlite3_blob_open | incremental BLOB I/O] routines.
................................................................................
  3373   3433   ** result is undefined and probably harmful.
  3374   3434   **
  3375   3435   ** ^Bindings are not cleared by the [sqlite3_reset()] routine.
  3376   3436   ** ^Unbound parameters are interpreted as NULL.
  3377   3437   **
  3378   3438   ** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an
  3379   3439   ** [error code] if anything goes wrong.
         3440  +** ^[SQLITE_TOOBIG] might be returned if the size of a string or BLOB
         3441  +** exceeds limits imposed by [sqlite3_limit]([SQLITE_LIMIT_LENGTH]) or
         3442  +** [SQLITE_MAX_LENGTH].
  3380   3443   ** ^[SQLITE_RANGE] is returned if the parameter
  3381   3444   ** index is out of range.  ^[SQLITE_NOMEM] is returned if malloc() fails.
  3382   3445   **
  3383   3446   ** See also: [sqlite3_bind_parameter_count()],
  3384   3447   ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
  3385   3448   */
  3386   3449   SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
         3450  +SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
         3451  +                        void(*)(void*));
  3387   3452   SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
  3388   3453   SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
  3389   3454   SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
  3390   3455   SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
  3391         -SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
         3456  +SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
  3392   3457   SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
         3458  +SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
         3459  +                         void(*)(void*), unsigned char encoding);
  3393   3460   SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
  3394   3461   SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
  3395   3462   
  3396   3463   /*
  3397   3464   ** CAPI3REF: Number Of SQL Parameters
  3398   3465   **
  3399   3466   ** ^This routine can be used to find the number of [SQL parameters]
................................................................................
  4134   4201   ** extract values from the [sqlite3_value] objects.
  4135   4202   **
  4136   4203   ** These routines work only with [protected sqlite3_value] objects.
  4137   4204   ** Any attempt to use these routines on an [unprotected sqlite3_value]
  4138   4205   ** object results in undefined behavior.
  4139   4206   **
  4140   4207   ** ^These routines work just like the corresponding [column access functions]
  4141         -** except that  these routines take a single [protected sqlite3_value] object
         4208  +** except that these routines take a single [protected sqlite3_value] object
  4142   4209   ** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.
  4143   4210   **
  4144   4211   ** ^The sqlite3_value_text16() interface extracts a UTF-16 string
  4145   4212   ** in the native byte-order of the host machine.  ^The
  4146   4213   ** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
  4147   4214   ** extract UTF-16 strings as big-endian and little-endian respectively.
  4148   4215   **
................................................................................
  4381   4448   ** of the application-defined function to be NULL.
  4382   4449   **
  4383   4450   ** ^The sqlite3_result_text(), sqlite3_result_text16(),
  4384   4451   ** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
  4385   4452   ** set the return value of the application-defined function to be
  4386   4453   ** a text string which is represented as UTF-8, UTF-16 native byte order,
  4387   4454   ** UTF-16 little endian, or UTF-16 big endian, respectively.
         4455  +** ^The sqlite3_result_text64() interface sets the return value of an
         4456  +** application-defined function to be a text string in an encoding
         4457  +** specified by the fifth (and last) parameter, which must be one
         4458  +** of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE].
  4388   4459   ** ^SQLite takes the text result from the application from
  4389   4460   ** the 2nd parameter of the sqlite3_result_text* interfaces.
  4390   4461   ** ^If the 3rd parameter to the sqlite3_result_text* interfaces
  4391   4462   ** is negative, then SQLite takes result text from the 2nd parameter
  4392   4463   ** through the first zero character.
  4393   4464   ** ^If the 3rd parameter to the sqlite3_result_text* interfaces
  4394   4465   ** is non-negative, then as many bytes (not characters) of the text
................................................................................
  4424   4495   ** kind of [sqlite3_value] object can be used with this interface.
  4425   4496   **
  4426   4497   ** If these routines are called from within the different thread
  4427   4498   ** than the one containing the application-defined function that received
  4428   4499   ** the [sqlite3_context] pointer, the results are undefined.
  4429   4500   */
  4430   4501   SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
         4502  +SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,sqlite3_uint64,void(*)(void*));
  4431   4503   SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
  4432   4504   SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
  4433   4505   SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
  4434   4506   SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
  4435   4507   SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
  4436   4508   SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
  4437   4509   SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
  4438   4510   SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
  4439   4511   SQLITE_API void sqlite3_result_null(sqlite3_context*);
  4440   4512   SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
         4513  +SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
         4514  +                           void(*)(void*), unsigned char encoding);
  4441   4515   SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
  4442   4516   SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
  4443   4517   SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
  4444   4518   SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
  4445   4519   SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
  4446   4520   
  4447   4521   /*
................................................................................
  4662   4736   **
  4663   4737   ** ^(If this global variable is made to point to a string which is
  4664   4738   ** the name of a folder (a.k.a. directory), then all temporary files
  4665   4739   ** created by SQLite when using a built-in [sqlite3_vfs | VFS]
  4666   4740   ** will be placed in that directory.)^  ^If this variable
  4667   4741   ** is a NULL pointer, then SQLite performs a search for an appropriate
  4668   4742   ** temporary file directory.
         4743  +**
         4744  +** Applications are strongly discouraged from using this global variable.
         4745  +** It is required to set a temporary folder on Windows Runtime (WinRT).
         4746  +** But for all other platforms, it is highly recommended that applications
         4747  +** neither read nor write this variable.  This global variable is a relic
         4748  +** that exists for backwards compatibility of legacy applications and should
         4749  +** be avoided in new projects.
  4669   4750   **
  4670   4751   ** It is not safe to read or modify this variable in more than one
  4671   4752   ** thread at a time.  It is not safe to read or modify this variable
  4672   4753   ** if a [database connection] is being used at the same time in a separate
  4673   4754   ** thread.
  4674   4755   ** It is intended that this variable be set once
  4675   4756   ** as part of process initialization and before any SQLite interface
................................................................................
  4681   4762   ** the [temp_store_directory pragma] always assumes that any string
  4682   4763   ** that this variable points to is held in memory obtained from 
  4683   4764   ** [sqlite3_malloc] and the pragma may attempt to free that memory
  4684   4765   ** using [sqlite3_free].
  4685   4766   ** Hence, if this variable is modified directly, either it should be
  4686   4767   ** made NULL or made to point to memory obtained from [sqlite3_malloc]
  4687   4768   ** or else the use of the [temp_store_directory pragma] should be avoided.
         4769  +** Except when requested by the [temp_store_directory pragma], SQLite
         4770  +** does not free the memory that sqlite3_temp_directory points to.  If
         4771  +** the application wants that memory to be freed, it must do
         4772  +** so itself, taking care to only do so after all [database connection]
         4773  +** objects have been destroyed.
  4688   4774   **
  4689   4775   ** <b>Note to Windows Runtime users:</b>  The temporary directory must be set
  4690   4776   ** prior to calling [sqlite3_open] or [sqlite3_open_v2].  Otherwise, various
  4691   4777   ** features that require the use of temporary files may fail.  Here is an
  4692   4778   ** example of how to do this using C++ with the Windows Runtime:
  4693   4779   **
  4694   4780   ** <blockquote><pre>
................................................................................
  5815   5901   ** to sqlite3_mutex_alloc() is one of these integer constants:
  5816   5902   **
  5817   5903   ** <ul>
  5818   5904   ** <li>  SQLITE_MUTEX_FAST
  5819   5905   ** <li>  SQLITE_MUTEX_RECURSIVE
  5820   5906   ** <li>  SQLITE_MUTEX_STATIC_MASTER
  5821   5907   ** <li>  SQLITE_MUTEX_STATIC_MEM
  5822         -** <li>  SQLITE_MUTEX_STATIC_MEM2
         5908  +** <li>  SQLITE_MUTEX_STATIC_OPEN
  5823   5909   ** <li>  SQLITE_MUTEX_STATIC_PRNG
  5824   5910   ** <li>  SQLITE_MUTEX_STATIC_LRU
  5825         -** <li>  SQLITE_MUTEX_STATIC_LRU2
         5911  +** <li>  SQLITE_MUTEX_STATIC_PMEM
         5912  +** <li>  SQLITE_MUTEX_STATIC_APP1
         5913  +** <li>  SQLITE_MUTEX_STATIC_APP2
  5826   5914   ** </ul>)^
  5827   5915   **
  5828   5916   ** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
  5829   5917   ** cause sqlite3_mutex_alloc() to create
  5830   5918   ** a new mutex.  ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
  5831   5919   ** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
  5832   5920   ** The mutex implementation does not need to make a distinction
................................................................................
  6022   6110   #define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */
  6023   6111   #define SQLITE_MUTEX_STATIC_MEM2      4  /* NOT USED */
  6024   6112   #define SQLITE_MUTEX_STATIC_OPEN      4  /* sqlite3BtreeOpen() */
  6025   6113   #define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_random() */
  6026   6114   #define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */
  6027   6115   #define SQLITE_MUTEX_STATIC_LRU2      7  /* NOT USED */
  6028   6116   #define SQLITE_MUTEX_STATIC_PMEM      7  /* sqlite3PageMalloc() */
         6117  +#define SQLITE_MUTEX_STATIC_APP1      8  /* For use by application */
         6118  +#define SQLITE_MUTEX_STATIC_APP2      9  /* For use by application */
         6119  +#define SQLITE_MUTEX_STATIC_APP3     10  /* For use by application */
  6029   6120   
  6030   6121   /*
  6031   6122   ** CAPI3REF: Retrieve the mutex for a database connection
  6032   6123   **
  6033   6124   ** ^This interface returns a pointer the [sqlite3_mutex] object that 
  6034   6125   ** serializes access to the [database connection] given in the argument
  6035   6126   ** when the [threading mode] is Serialized.
................................................................................
  6113   6204   #define SQLITE_TESTCTRL_ASSERT                  12
  6114   6205   #define SQLITE_TESTCTRL_ALWAYS                  13
  6115   6206   #define SQLITE_TESTCTRL_RESERVE                 14
  6116   6207   #define SQLITE_TESTCTRL_OPTIMIZATIONS           15
  6117   6208   #define SQLITE_TESTCTRL_ISKEYWORD               16
  6118   6209   #define SQLITE_TESTCTRL_SCRATCHMALLOC           17
  6119   6210   #define SQLITE_TESTCTRL_LOCALTIME_FAULT         18
  6120         -#define SQLITE_TESTCTRL_EXPLAIN_STMT            19
         6211  +#define SQLITE_TESTCTRL_EXPLAIN_STMT            19  /* NOT USED */
  6121   6212   #define SQLITE_TESTCTRL_NEVER_CORRUPT           20
  6122         -#define SQLITE_TESTCTRL_LAST                    20
         6213  +#define SQLITE_TESTCTRL_VDBE_COVERAGE           21
         6214  +#define SQLITE_TESTCTRL_BYTEORDER               22
         6215  +#define SQLITE_TESTCTRL_ISINIT                  23
         6216  +#define SQLITE_TESTCTRL_SORTER_MMAP             24
         6217  +#define SQLITE_TESTCTRL_LAST                    24
  6123   6218   
  6124   6219   /*
  6125   6220   ** CAPI3REF: SQLite Runtime Status
  6126   6221   **
  6127   6222   ** ^This interface is used to retrieve runtime status information
  6128   6223   ** about the performance of SQLite, and optionally to reset various
  6129   6224   ** highwater marks.  ^The first argument is an integer code for
................................................................................
  6306   6401   ** <dd>This parameter returns the number malloc attempts that might have
  6307   6402   ** been satisfied using lookaside memory but failed due to all lookaside
  6308   6403   ** memory already being in use.
  6309   6404   ** Only the high-water value is meaningful;
  6310   6405   ** the current value is always zero.)^
  6311   6406   **
  6312   6407   ** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
  6313         -** <dd>This parameter returns the approximate number of of bytes of heap
         6408  +** <dd>This parameter returns the approximate number of bytes of heap
  6314   6409   ** memory used by all pager caches associated with the database connection.)^
  6315   6410   ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
  6316   6411   **
  6317   6412   ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
  6318         -** <dd>This parameter returns the approximate number of of bytes of heap
         6413  +** <dd>This parameter returns the approximate number of bytes of heap
  6319   6414   ** memory used to store the schema for all databases associated
  6320   6415   ** with the connection - main, temp, and any [ATTACH]-ed databases.)^ 
  6321   6416   ** ^The full amount of memory used by the schemas is reported, even if the
  6322   6417   ** schema memory is shared with other database connections due to
  6323   6418   ** [shared cache mode] being enabled.
  6324   6419   ** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
  6325   6420   **
  6326   6421   ** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
  6327         -** <dd>This parameter returns the approximate number of of bytes of heap
         6422  +** <dd>This parameter returns the approximate number of bytes of heap
  6328   6423   ** and lookaside memory used by all prepared statements associated with
  6329   6424   ** the database connection.)^
  6330   6425   ** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0.
  6331   6426   ** </dd>
  6332   6427   **
  6333   6428   ** [[SQLITE_DBSTATUS_CACHE_HIT]] ^(<dt>SQLITE_DBSTATUS_CACHE_HIT</dt>
  6334   6429   ** <dd>This parameter returns the number of pager cache hits that have
................................................................................
  7098   7193   ** ^The callback registered by this function replaces any existing callback
  7099   7194   ** registered using [sqlite3_wal_hook()].  ^Likewise, registering a callback
  7100   7195   ** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism
  7101   7196   ** configured by this function.
  7102   7197   **
  7103   7198   ** ^The [wal_autocheckpoint pragma] can be used to invoke this interface
  7104   7199   ** from SQL.
         7200  +**
         7201  +** ^Checkpoints initiated by this mechanism are
         7202  +** [sqlite3_wal_checkpoint_v2|PASSIVE].
  7105   7203   **
  7106   7204   ** ^Every new [database connection] defaults to having the auto-checkpoint
  7107   7205   ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
  7108   7206   ** pages.  The use of this interface
  7109   7207   ** is only necessary if the default setting is found to be suboptimal
  7110   7208   ** for a particular application.
  7111   7209   */
................................................................................
  7115   7213   ** CAPI3REF: Checkpoint a database
  7116   7214   **
  7117   7215   ** ^The [sqlite3_wal_checkpoint(D,X)] interface causes database named X
  7118   7216   ** on [database connection] D to be [checkpointed].  ^If X is NULL or an
  7119   7217   ** empty string, then a checkpoint is run on all databases of
  7120   7218   ** connection D.  ^If the database connection D is not in
  7121   7219   ** [WAL | write-ahead log mode] then this interface is a harmless no-op.
         7220  +** ^The [sqlite3_wal_checkpoint(D,X)] interface initiates a
         7221  +** [sqlite3_wal_checkpoint_v2|PASSIVE] checkpoint.
         7222  +** Use the [sqlite3_wal_checkpoint_v2()] interface to get a FULL
         7223  +** or RESET checkpoint.
  7122   7224   **
  7123   7225   ** ^The [wal_checkpoint pragma] can be used to invoke this interface
  7124   7226   ** from SQL.  ^The [sqlite3_wal_autocheckpoint()] interface and the
  7125   7227   ** [wal_autocheckpoint pragma] can be used to cause this interface to be
  7126   7228   ** run whenever the WAL reaches a certain size threshold.
  7127   7229   **
  7128   7230   ** See also: [sqlite3_wal_checkpoint_v2()]
................................................................................
  7137   7239   ** eMode parameter:
  7138   7240   **
  7139   7241   ** <dl>
  7140   7242   ** <dt>SQLITE_CHECKPOINT_PASSIVE<dd>
  7141   7243   **   Checkpoint as many frames as possible without waiting for any database 
  7142   7244   **   readers or writers to finish. Sync the db file if all frames in the log
  7143   7245   **   are checkpointed. This mode is the same as calling 
  7144         -**   sqlite3_wal_checkpoint(). The busy-handler callback is never invoked.
         7246  +**   sqlite3_wal_checkpoint(). The [sqlite3_busy_handler|busy-handler callback]
         7247  +**   is never invoked.
  7145   7248   **
  7146   7249   ** <dt>SQLITE_CHECKPOINT_FULL<dd>
  7147         -**   This mode blocks (calls the busy-handler callback) until there is no
         7250  +**   This mode blocks (it invokes the
         7251  +**   [sqlite3_busy_handler|busy-handler callback]) until there is no
  7148   7252   **   database writer and all readers are reading from the most recent database
  7149   7253   **   snapshot. It then checkpoints all frames in the log file and syncs the
  7150   7254   **   database file. This call blocks database writers while it is running,
  7151   7255   **   but not database readers.
  7152   7256   **
  7153   7257   ** <dt>SQLITE_CHECKPOINT_RESTART<dd>
  7154   7258   **   This mode works the same way as SQLITE_CHECKPOINT_FULL, except after 
  7155         -**   checkpointing the log file it blocks (calls the busy-handler callback)
         7259  +**   checkpointing the log file it blocks (calls the 
         7260  +**   [sqlite3_busy_handler|busy-handler callback])
  7156   7261   **   until all readers are reading from the database file only. This ensures 
  7157   7262   **   that the next client to write to the database file restarts the log file 
  7158   7263   **   from the beginning. This call blocks database writers while it is running,
  7159   7264   **   but not database readers.
  7160   7265   ** </dl>
  7161   7266   **
  7162   7267   ** If pnLog is not NULL, then *pnLog is set to the total number of frames in
................................................................................
  7286   7391   ** of the SQL statement that triggered the call to the [xUpdate] method of the
  7287   7392   ** [virtual table].
  7288   7393   */
  7289   7394   SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
  7290   7395   
  7291   7396   /*
  7292   7397   ** CAPI3REF: Conflict resolution modes
         7398  +** KEYWORDS: {conflict resolution mode}
  7293   7399   **
  7294   7400   ** These constants are returned by [sqlite3_vtab_on_conflict()] to
  7295   7401   ** inform a [virtual table] implementation what the [ON CONFLICT] mode
  7296   7402   ** is for the SQL statement being evaluated.
  7297   7403   **
  7298   7404   ** Note that the [SQLITE_IGNORE] constant is also used as a potential
  7299   7405   ** return value from the [sqlite3_set_authorizer()] callback and that
................................................................................
  7338   7444   
  7339   7445   
  7340   7446   #ifdef __cplusplus
  7341   7447   extern "C" {
  7342   7448   #endif
  7343   7449   
  7344   7450   typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;
         7451  +typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;
         7452  +
         7453  +/* The double-precision datatype used by RTree depends on the
         7454  +** SQLITE_RTREE_INT_ONLY compile-time option.
         7455  +*/
         7456  +#ifdef SQLITE_RTREE_INT_ONLY
         7457  +  typedef sqlite3_int64 sqlite3_rtree_dbl;
         7458  +#else
         7459  +  typedef double sqlite3_rtree_dbl;
         7460  +#endif
  7345   7461   
  7346   7462   /*
  7347   7463   ** Register a geometry callback named zGeom that can be used as part of an
  7348   7464   ** R-Tree geometry query as follows:
  7349   7465   **
  7350   7466   **   SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
  7351   7467   */
  7352   7468   SQLITE_API int sqlite3_rtree_geometry_callback(
  7353   7469     sqlite3 *db,
  7354   7470     const char *zGeom,
  7355         -#ifdef SQLITE_RTREE_INT_ONLY
  7356         -  int (*xGeom)(sqlite3_rtree_geometry*, int n, sqlite3_int64 *a, int *pRes),
  7357         -#else
  7358         -  int (*xGeom)(sqlite3_rtree_geometry*, int n, double *a, int *pRes),
  7359         -#endif
         7471  +  int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
  7360   7472     void *pContext
  7361   7473   );
  7362   7474   
  7363   7475   
  7364   7476   /*
  7365   7477   ** A pointer to a structure of the following type is passed as the first
  7366   7478   ** argument to callbacks registered using rtree_geometry_callback().
  7367   7479   */
  7368   7480   struct sqlite3_rtree_geometry {
  7369   7481     void *pContext;                 /* Copy of pContext passed to s_r_g_c() */
  7370   7482     int nParam;                     /* Size of array aParam[] */
  7371         -  double *aParam;                 /* Parameters passed to SQL geom function */
         7483  +  sqlite3_rtree_dbl *aParam;      /* Parameters passed to SQL geom function */
  7372   7484     void *pUser;                    /* Callback implementation user data */
  7373   7485     void (*xDelUser)(void *);       /* Called by SQLite to clean up pUser */
  7374   7486   };
  7375   7487   
         7488  +/*
         7489  +** Register a 2nd-generation geometry callback named zScore that can be 
         7490  +** used as part of an R-Tree geometry query as follows:
         7491  +**
         7492  +**   SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
         7493  +*/
         7494  +SQLITE_API int sqlite3_rtree_query_callback(
         7495  +  sqlite3 *db,
         7496  +  const char *zQueryFunc,
         7497  +  int (*xQueryFunc)(sqlite3_rtree_query_info*),
         7498  +  void *pContext,
         7499  +  void (*xDestructor)(void*)
         7500  +);
         7501  +
         7502  +
         7503  +/*
         7504  +** A pointer to a structure of the following type is passed as the 
         7505  +** argument to scored geometry callback registered using
         7506  +** sqlite3_rtree_query_callback().
         7507  +**
         7508  +** Note that the first 5 fields of this structure are identical to
         7509  +** sqlite3_rtree_geometry.  This structure is a subclass of
         7510  +** sqlite3_rtree_geometry.
         7511  +*/
         7512  +struct sqlite3_rtree_query_info {
         7513  +  void *pContext;                   /* pContext from when function registered */
         7514  +  int nParam;                       /* Number of function parameters */
         7515  +  sqlite3_rtree_dbl *aParam;        /* value of function parameters */
         7516  +  void *pUser;                      /* callback can use this, if desired */
         7517  +  void (*xDelUser)(void*);          /* function to free pUser */
         7518  +  sqlite3_rtree_dbl *aCoord;        /* Coordinates of node or entry to check */
         7519  +  unsigned int *anQueue;            /* Number of pending entries in the queue */
         7520  +  int nCoord;                       /* Number of coordinates */
         7521  +  int iLevel;                       /* Level of current node or entry */
         7522  +  int mxLevel;                      /* The largest iLevel value in the tree */
         7523  +  sqlite3_int64 iRowid;             /* Rowid for current entry */
         7524  +  sqlite3_rtree_dbl rParentScore;   /* Score of parent node */
         7525  +  int eParentWithin;                /* Visibility of parent node */
         7526  +  int eWithin;                      /* OUT: Visiblity */
         7527  +  sqlite3_rtree_dbl rScore;         /* OUT: Write the score here */
         7528  +};
         7529  +
         7530  +/*
         7531  +** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
         7532  +*/
         7533  +#define NOT_WITHIN       0   /* Object completely outside of query region */
         7534  +#define PARTLY_WITHIN    1   /* Object partially overlaps query region */
         7535  +#define FULLY_WITHIN     2   /* Object fully contained within query region */
         7536  +
  7376   7537   
  7377   7538   #ifdef __cplusplus
  7378   7539   }  /* end of the 'extern "C"' block */
  7379   7540   #endif
  7380   7541   
  7381   7542   #endif  /* ifndef _SQLITE3RTREE_H_ */
  7382   7543