/ Check-in [77d5a7aa]
Login

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

Overview
Comment:Fixed various typos, spelling, grammar, and formatting mistakes. Ticket #3124. (CVS 5157)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 77d5a7aa1c7ea715298228ed2dbd0497cacbd0e4
User & Date: shane 2008-05-23 17:21:09
Context
2008-05-26
18:33
Fix the LIKE query optimizer so that it works with LIKE patterns ending in '@%' on NOCASE columns. Ticket #3139. (CVS 5158) check-in: 33548744 user: drh tags: trunk
2008-05-23
17:21
Fixed various typos, spelling, grammar, and formatting mistakes. Ticket #3124. (CVS 5157) check-in: 77d5a7aa user: shane tags: trunk
14:49
Add a test case of preparing a statement with an nBytes parameter of 0 and where the previous byte of the string is zero. Ticket #3134. (CVS 5156) check-in: 846a69ac user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

    26     26   ** on how SQLite interfaces are suppose to operate.
    27     27   **
    28     28   ** The name of this file under configuration management is "sqlite.h.in".
    29     29   ** The makefile makes some minor changes to this file (such as inserting
    30     30   ** the version number) and changes its name to "sqlite3.h" as
    31     31   ** part of the build process.
    32     32   **
    33         -** @(#) $Id: sqlite.h.in,v 1.317 2008/05/21 15:01:21 shane Exp $
           33  +** @(#) $Id: sqlite.h.in,v 1.318 2008/05/23 17:21:09 shane Exp $
    34     34   */
    35     35   #ifndef _SQLITE3_H_
    36     36   #define _SQLITE3_H_
    37     37   #include <stdarg.h>     /* Needed for the definition of va_list */
    38     38   
    39     39   /*
    40     40   ** Make sure we can call this stuff from C++.
................................................................................
   292    292   **          SQL statements in the zero-terminated string S within the
   293    293   **          context of the D [database connection].
   294    294   **
   295    295   ** {F12102} If the S parameter to [sqlite3_exec(D,S,C,A,E)] is NULL then
   296    296   **          the actions of the interface shall be the same as if the
   297    297   **          S parameter where an empty string.
   298    298   **
   299         -** {F12104} The return value of [sqlite3_exec()] shall be SQLITE_OK if all
          299  +** {F12104} The return value of [sqlite3_exec()] shall be [SQLITE_OK] if all
   300    300   **          SQL statements run successfully and to completion.
   301    301   **
   302    302   ** {F12105} The return value of [sqlite3_exec()] shall be an appropriate 
   303    303   **          non-zero [error code] if any SQL statement fails.
   304    304   **
   305    305   ** {F12107} If one or more of the SQL statements handed to [sqlite3_exec()]
   306    306   **          return results and the 3rd parameter is not NULL, then
................................................................................
   768    768   ** 
   769    769   ** {F11148} At least szOsFile bytes of memory are allocated by SQLite 
   770    770   ** to hold the  [sqlite3_file] structure passed as the third 
   771    771   ** argument to xOpen.  {END}  The xOpen method does not have to
   772    772   ** allocate the structure; it should just fill it in.
   773    773   ** 
   774    774   ** {F11149} The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] 
   775         -** to test for the existance of a file,
          775  +** to test for the existence of a file,
   776    776   ** or [SQLITE_ACCESS_READWRITE] to test to see
   777    777   ** if a file is readable and writable, or [SQLITE_ACCESS_READ]
   778    778   ** to test to see if a file is at least readable.  {END} The file can be a 
   779    779   ** directory.
   780    780   ** 
   781    781   ** {F11150} SQLite will always allocate at least mxPathname+1 bytes for
   782    782   ** the output buffers for xGetTempname and xFullPathname. {F11151} The exact
   783    783   ** size of the output buffer is also passed as a parameter to both 
   784         -** methods. {END} If the output buffer is not large enough, SQLITE_CANTOPEN
          784  +** methods. {END} If the output buffer is not large enough, [SQLITE_CANTOPEN]
   785    785   ** should be returned. As this is handled as a fatal error by SQLite,
   786    786   ** vfs implementations should endeavor to prevent this by setting 
   787    787   ** mxPathname to a sufficiently large value.
   788    788   ** 
   789    789   ** The xRandomness(), xSleep(), and xCurrentTime() interfaces
   790    790   ** are not strictly a part of the filesystem, but they are
   791    791   ** included in the VFS structure for completeness.
................................................................................
   824    824   
   825    825   /*
   826    826   ** CAPI3REF: Flags for the xAccess VFS method {F11190}
   827    827   **
   828    828   ** {F11191} These integer constants can be used as the third parameter to
   829    829   ** the xAccess method of an [sqlite3_vfs] object. {END}  They determine
   830    830   ** what kind of permissions the xAccess method is
   831         -** looking for.  {F11192} With SQLITE_ACCESS_EXISTS, the xAccess method
          831  +** looking for.  {F11192} With [SQLITE_ACCESS_EXISTS], the xAccess method
   832    832   ** simply checks to see if the file exists. {F11193} With
   833    833   ** SQLITE_ACCESS_READWRITE, the xAccess method checks to see
   834    834   ** if the file is both readable and writable.  {F11194} With
   835    835   ** SQLITE_ACCESS_READ the xAccess method
   836    836   ** checks to see if the file is readable.
   837    837   */
   838    838   #define SQLITE_ACCESS_EXISTS    0
................................................................................
   980    980   **          [sqlite3_changes()] to return zero, regardless of the
   981    981   **          number of rows originally in the table.
   982    982   **
   983    983   ** LIMITATIONS:
   984    984   **
   985    985   ** {U12252} If a separate thread makes changes on the same database connection
   986    986   **          while [sqlite3_changes()] is running then the value returned
   987         -**          is unpredictable and unmeaningful.
          987  +**          is unpredictable and not meaningful.
   988    988   */
   989    989   int sqlite3_changes(sqlite3*);
   990    990   
   991    991   /*
   992    992   ** CAPI3REF: Total Number Of Rows Modified {F12260}
   993    993   ***
   994    994   ** This function returns the number of row changes caused
................................................................................
  1025   1025   **          WHERE clause shall not change the value returned
  1026   1026   **          by [sqlite3_total_changes()]
  1027   1027   **
  1028   1028   ** LIMITATIONS:
  1029   1029   **
  1030   1030   ** {U12264} If a separate thread makes changes on the same database connection
  1031   1031   **          while [sqlite3_total_changes()] is running then the value 
  1032         -**          returned is unpredictable and unmeaningful.
         1032  +**          returned is unpredictable and not meaningful.
  1033   1033   */
  1034   1034   int sqlite3_total_changes(sqlite3*);
  1035   1035   
  1036   1036   /*
  1037   1037   ** CAPI3REF: Interrupt A Long-Running Query {F12270}
  1038   1038   **
  1039   1039   ** This function causes any pending database operation to abort and
................................................................................
  1174   1174   ** {F12311} The [sqlite3_busy_handler()] function replaces the busy handler
  1175   1175   **          callback in the database connection identified by the 1st
  1176   1176   **          parameter with a new busy handler identified by the 2nd and 3rd
  1177   1177   **          parameters.
  1178   1178   **
  1179   1179   ** {F12312} The default busy handler for new database connections is NULL.
  1180   1180   **
  1181         -** {F12314} When two or more database connection share a common cache,
         1181  +** {F12314} When two or more database connection share a [sqlite3_enable_shared_cache | common cache],
  1182   1182   **          the busy handler for the database connection currently using
  1183   1183   **          the cache is invoked when the cache encounters a lock.
  1184   1184   **
  1185   1185   ** {F12316} If a busy handler callback returns zero, then the SQLite
  1186   1186   **          interface that provoked the locking event will return
  1187   1187   **          [SQLITE_BUSY].
  1188   1188   **
  1189         -** {F12318} SQLite will invokes the busy handler with two argument which
         1189  +** {F12318} SQLite will invokes the busy handler with two arguments which
  1190   1190   **          are a copy of the pointer supplied by the 3rd parameter to
  1191   1191   **          [sqlite3_busy_handler()] and a count of the number of prior
  1192   1192   **          invocations of the busy handler for the same locking event.
  1193   1193   **
  1194   1194   ** LIMITATIONS:
  1195   1195   **
  1196   1196   ** {U12319} A busy handler should not call close the database connection
................................................................................
  1288   1288   ** The sqlite3_get_table() function evaluates one or more
  1289   1289   ** semicolon-separated SQL statements in the zero-terminated UTF-8
  1290   1290   ** string of its 2nd parameter.  It returns a result table to the
  1291   1291   ** pointer given in its 3rd parameter.
  1292   1292   **
  1293   1293   ** After the calling function has finished using the result, it should 
  1294   1294   ** pass the pointer to the result table to sqlite3_free_table() in order to 
  1295         -** release the memory that was malloc-ed.  Because of the way the 
         1295  +** release the memory that was malloced.  Because of the way the 
  1296   1296   ** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling
  1297   1297   ** function must not try to call [sqlite3_free()] directly.  Only 
  1298   1298   ** [sqlite3_free_table()] is able to release the memory properly and safely.
  1299   1299   **
  1300   1300   ** The sqlite3_get_table() interface is implemented as a wrapper around
  1301   1301   ** [sqlite3_exec()].  The sqlite3_get_table() routine does not have access
  1302   1302   ** to any internal data structures of SQLite.  It uses only the public
................................................................................
  1367   1367   ** guarantees that the buffer is always zero-terminated.  The first
  1368   1368   ** parameter "n" is the total size of the buffer, including space for
  1369   1369   ** the zero terminator.  So the longest string that can be completely
  1370   1370   ** written will be n-1 characters.
  1371   1371   **
  1372   1372   ** These routines all implement some additional formatting
  1373   1373   ** options that are useful for constructing SQL statements.
  1374         -** All of the usual printf formatting options apply.  In addition, there
         1374  +** All of the usual printf() formatting options apply.  In addition, there
  1375   1375   ** is are "%q", "%Q", and "%z" options.
  1376   1376   **
  1377   1377   ** The %q option works like %s in that it substitutes a null-terminated
  1378   1378   ** string from the argument list.  But %q also doubles every '\'' character.
  1379   1379   ** %q is designed for use inside a string literal.  By doubling each '\''
  1380   1380   ** character it escapes that character and allows it to be inserted into
  1381   1381   ** the string.
................................................................................
  1454   1454   
  1455   1455   /*
  1456   1456   ** CAPI3REF: Memory Allocation Subsystem {F17300}
  1457   1457   **
  1458   1458   ** The SQLite core  uses these three routines for all of its own
  1459   1459   ** internal memory allocation needs. "Core" in the previous sentence
  1460   1460   ** does not include operating-system specific VFS implementation.  The
  1461         -** windows VFS uses native malloc and free for some operations.
         1461  +** Windows VFS uses native malloc() and free() for some operations.
  1462   1462   **
  1463   1463   ** The sqlite3_malloc() routine returns a pointer to a block
  1464   1464   ** of memory at least N bytes in length, where N is the parameter.
  1465   1465   ** If sqlite3_malloc() is unable to obtain sufficient free
  1466   1466   ** memory, it returns a NULL pointer.  If the parameter N to
  1467   1467   ** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
  1468   1468   ** a NULL pointer.
................................................................................
  1512   1512   **
  1513   1513   ** In SQLite version 3.5.0 and 3.5.1, it was possible to define
  1514   1514   ** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
  1515   1515   ** implementation of these routines to be omitted.  That capability
  1516   1516   ** is no longer provided.  Only built-in memory allocators can be
  1517   1517   ** used.
  1518   1518   **
  1519         -** The windows OS interface layer calls
         1519  +** The Windows OS interface layer calls
  1520   1520   ** the system malloc() and free() directly when converting
  1521   1521   ** filenames between the UTF-8 encoding used by SQLite
  1522         -** and whatever filename encoding is used by the particular windows
         1522  +** and whatever filename encoding is used by the particular Windows
  1523   1523   ** installation.  Memory allocation errors are detected, but
  1524   1524   ** they are reported back as [SQLITE_CANTOPEN] or
  1525   1525   ** [SQLITE_IOERR] rather than [SQLITE_NOMEM].
  1526   1526   **
  1527   1527   ** INVARIANTS:
  1528   1528   **
  1529   1529   ** {F17303}  The [sqlite3_malloc(N)] interface returns either a pointer to 
................................................................................
  1552   1552   **
  1553   1553   ** {F17318}  The [sqlite3_realloc(P,N)] interface returns either a pointer
  1554   1554   **           to a block of checked-out memory of at least N bytes in size
  1555   1555   **           that is 8-byte aligned, or a NULL pointer.
  1556   1556   **
  1557   1557   ** {F17321}  When [sqlite3_realloc(P,N)] returns a non-NULL pointer, it first
  1558   1558   **           copies the first K bytes of content from P into the newly allocated
  1559         -**           where K is the lessor of N and the size of the buffer P.
         1559  +**           where K is the lesser of N and the size of the buffer P.
  1560   1560   **
  1561   1561   ** {F17322}  When [sqlite3_realloc(P,N)] returns a non-NULL pointer, it first
  1562   1562   **           releases the buffer P.
  1563   1563   **
  1564   1564   ** {F17323}  When [sqlite3_realloc(P,N)] returns NULL, the buffer P is
  1565   1565   **           not modified or released.
  1566   1566   **
................................................................................
  1591   1591   **
  1592   1592   ** {F17371} The [sqlite3_memory_used()] routine returns the
  1593   1593   **          number of bytes of memory currently outstanding 
  1594   1594   **          (malloced but not freed).
  1595   1595   **
  1596   1596   ** {F17373} The [sqlite3_memory_highwater()] routine returns the maximum
  1597   1597   **          value of [sqlite3_memory_used()] 
  1598         -**          since the highwater mark was last reset.
         1598  +**          since the high-water mark was last reset.
  1599   1599   **
  1600   1600   ** {F17374} The values returned by [sqlite3_memory_used()] and
  1601   1601   **          [sqlite3_memory_highwater()] include any overhead
  1602   1602   **          added by SQLite in its implementation of [sqlite3_malloc()],
  1603   1603   **          but not overhead added by the any underlying system library
  1604   1604   **          routines that [sqlite3_malloc()] may call.
  1605   1605   ** 
  1606         -** {F17375} The memory highwater mark is reset to the current value of
         1606  +** {F17375} The memory high-water mark is reset to the current value of
  1607   1607   **          [sqlite3_memory_used()] if and only if the parameter to
  1608   1608   **          [sqlite3_memory_highwater()] is true.  The value returned
  1609         -**          by [sqlite3_memory_highwater(1)] is the highwater mark
         1609  +**          by [sqlite3_memory_highwater(1)] is the high-water mark
  1610   1610   **          prior to the reset.
  1611   1611   */
  1612   1612   sqlite3_int64 sqlite3_memory_used(void);
  1613   1613   sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
  1614   1614   
  1615   1615   /*
  1616   1616   ** CAPI3REF: Pseudo-Random Number Generator {F17390}
  1617   1617   **
  1618   1618   ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
  1619   1619   ** select random ROWIDs when inserting new records into a table that
  1620   1620   ** already uses the largest possible ROWID.  The PRNG is also used for
  1621   1621   ** the build-in random() and randomblob() SQL functions.  This interface allows
  1622         -** appliations to access the same PRNG for other purposes.
         1622  +** applications to access the same PRNG for other purposes.
  1623   1623   **
  1624   1624   ** A call to this routine stores N bytes of randomness into buffer P.
  1625   1625   **
  1626   1626   ** The first time this routine is invoked (either internally or by
  1627   1627   ** the application) the PRNG is seeded using randomness obtained
  1628   1628   ** from the xRandomness method of the default [sqlite3_vfs] object.
  1629   1629   ** On all subsequent invocations, the pseudo-randomness is generated
................................................................................
  1790   1790   ** is the name of the inner-most trigger or view that is responsible for
  1791   1791   ** the access attempt or NULL if this access attempt is directly from 
  1792   1792   ** top-level SQL code.
  1793   1793   **
  1794   1794   ** INVARIANTS:
  1795   1795   **
  1796   1796   ** {F12551} The second parameter to an 
  1797         -**          [sqlite3_set_authorizer | authorizer callback is always an integer
         1797  +**          [sqlite3_set_authorizer | authorizer callback] is always an integer
  1798   1798   **          [SQLITE_COPY | authorizer code] that specifies what action
  1799   1799   **          is being authorized.
  1800   1800   **
  1801   1801   ** {F12552} The 3rd and 4th parameters to the 
  1802   1802   **          [sqlite3_set_authorizer | authorization callback function]
  1803   1803   **          will be parameters or NULL depending on which 
  1804   1804   **          [SQLITE_COPY | authorizer code] is used as the second parameter.
................................................................................
  1853   1853   ** These routines register callback functions that can be used for
  1854   1854   ** tracing and profiling the execution of SQL statements.
  1855   1855   **
  1856   1856   ** The callback function registered by sqlite3_trace() is invoked at
  1857   1857   ** various times when an SQL statement is being run by [sqlite3_step()].
  1858   1858   ** The callback returns a UTF-8 rendering of the SQL statement text
  1859   1859   ** as the statement first begins executing.  Additional callbacks occur
  1860         -** as each triggersubprogram is entered.  The callbacks for triggers
         1860  +** as each triggered subprogram is entered.  The callbacks for triggers
  1861   1861   ** contain a UTF-8 SQL comment that identifies the trigger.
  1862   1862   ** 
  1863   1863   ** The callback function registered by sqlite3_profile() is invoked
  1864   1864   ** as each SQL statement finishes.  The profile callback contains
  1865   1865   ** the original statement text and an estimate of wall-clock time
  1866   1866   ** of how long that statement took to run.
  1867   1867   **
................................................................................
  1944   1944   **          function each time it is invoked.
  1945   1945   **
  1946   1946   ** {F12915} If a call to [sqlite3_step()] results in fewer than
  1947   1947   **          N opcodes being executed,
  1948   1948   **          then the progress callback is never invoked. {END}
  1949   1949   ** 
  1950   1950   ** {F12916} Every call to [sqlite3_progress_handler()]
  1951         -**          overwrites any previously registere progress handler.
         1951  +**          overwrites any previously registered progress handler.
  1952   1952   **
  1953   1953   ** {F12917} If the progress handler callback is NULL then no progress
  1954   1954   **          handler is invoked.
  1955   1955   **
  1956   1956   ** {F12918} If the progress callback returns a result other than 0, then
  1957   1957   **          the behavior is a if [sqlite3_interrupt()] had been called.
  1958   1958   */
................................................................................
  1981   1981   ** UTF-16 in the native byte order if [sqlite3_open16()] is used.
  1982   1982   **
  1983   1983   ** Whether or not an error occurs when it is opened, resources
  1984   1984   ** associated with the [sqlite3*] handle should be released by passing it
  1985   1985   ** to [sqlite3_close()] when it is no longer required.
  1986   1986   **
  1987   1987   ** The [sqlite3_open_v2()] interface works like [sqlite3_open()] 
  1988         -** except that it acccepts two additional parameters for additional control
         1988  +** except that it accepts two additional parameters for additional control
  1989   1989   ** over the new database connection.  The flags parameter can be
  1990   1990   ** one of:
  1991   1991   **
  1992   1992   ** <ol>
  1993   1993   ** <li>  [SQLITE_OPEN_READONLY]
  1994   1994   ** <li>  [SQLITE_OPEN_READWRITE]
  1995   1995   ** <li>  [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
................................................................................
  2024   2024   **
  2025   2025   ** The fourth parameter to sqlite3_open_v2() is the name of the
  2026   2026   ** [sqlite3_vfs] object that defines the operating system 
  2027   2027   ** interface that the new database connection should use.  If the
  2028   2028   ** fourth parameter is a NULL pointer then the default [sqlite3_vfs]
  2029   2029   ** object is used.
  2030   2030   **
  2031         -** <b>Note to windows users:</b>  The encoding used for the filename argument
         2031  +** <b>Note to Windows users:</b>  The encoding used for the filename argument
  2032   2032   ** of [sqlite3_open()] and [sqlite3_open_v2()] must be UTF-8, not whatever
  2033   2033   ** codepage is currently defined.  Filenames containing international
  2034   2034   ** characters must be converted to UTF-8 prior to passing them into
  2035   2035   ** [sqlite3_open()] or [sqlite3_open_v2()].
  2036   2036   **
  2037   2037   ** INVARIANTS:
  2038   2038   **
................................................................................
  2084   2084   ** {F12717} If the filename argument to [sqlite3_open()], [sqlite3_open16()],
  2085   2085   **          or [sqlite3_open_v2()] is ":memory:", then an private,
  2086   2086   **          ephemeral, in-memory database is created for the connection.
  2087   2087   **          <todo>Is SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE required
  2088   2088   **          in sqlite3_open_v2()?</todo>
  2089   2089   **
  2090   2090   ** {F12719} If the filename is NULL or an empty string, then a private,
  2091         -**          ephermeral on-disk database will be created.
         2091  +**          ephemeral on-disk database will be created.
  2092   2092   **          <todo>Is SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE required
  2093   2093   **          in sqlite3_open_v2()?</todo>
  2094   2094   **
  2095   2095   ** {F12721} The [database connection] created by 
  2096   2096   **          [sqlite3_open_v2(F,D,G,V)] will use the
  2097   2097   **          [sqlite3_vfs] object identified by the V parameter, or
  2098   2098   **          the default [sqlite3_vfs] object is V is a NULL pointer.
................................................................................
  2168   2168   const char *sqlite3_errmsg(sqlite3*);
  2169   2169   const void *sqlite3_errmsg16(sqlite3*);
  2170   2170   
  2171   2171   /*
  2172   2172   ** CAPI3REF: SQL Statement Object {F13000}
  2173   2173   ** KEYWORDS: {prepared statement} {prepared statements}
  2174   2174   **
  2175         -** An instance of this object represent single SQL statements.  This
         2175  +** An instance of this object represents a single SQL statement.  This
  2176   2176   ** object is variously known as a "prepared statement" or a 
  2177   2177   ** "compiled SQL statement" or simply as a "statement".
  2178   2178   ** 
  2179   2179   ** The life of a statement object goes something like this:
  2180   2180   **
  2181   2181   ** <ol>
  2182   2182   ** <li> Create the object using [sqlite3_prepare_v2()] or a related
................................................................................
  2211   2211   ** Attempts to increase a limit above its hard upper bound are
  2212   2212   ** silently truncated to the hard upper limit.
  2213   2213   **
  2214   2214   ** Run time limits are intended for use in applications that manage
  2215   2215   ** both their own internal database and also databases that are controlled
  2216   2216   ** by untrusted external sources.  An example application might be a
  2217   2217   ** webbrowser that has its own databases for storing history and
  2218         -** separate databases controlled by javascript applications downloaded
         2218  +** separate databases controlled by JavaScript applications downloaded
  2219   2219   ** off the internet.  The internal databases can be given the
  2220   2220   ** large, default limits.  Databases managed by external sources can
  2221   2221   ** be given much smaller limits designed to prevent a denial of service
  2222   2222   ** attach.  Developers might also want to use the [sqlite3_set_authorizer()]
  2223   2223   ** interface to further control untrusted SQL.  The size of the database
  2224   2224   ** created by an untrusted script can be contained using the
  2225   2225   ** [max_page_count] [PRAGMA].
................................................................................
  2228   2228   ** to change or removal without prior notice.
  2229   2229   **
  2230   2230   ** INVARIANTS:
  2231   2231   **
  2232   2232   ** {F12762} A successful call to [sqlite3_limit(D,C,V)] where V is
  2233   2233   **          positive changes the
  2234   2234   **          limit on the size of construct C in [database connection] D
  2235         -**          to the lessor of V and the hard upper bound on the size
         2235  +**          to the lesser of V and the hard upper bound on the size
  2236   2236   **          of C that is set at compile-time.
  2237   2237   **
  2238   2238   ** {F12766} A successful call to [sqlite3_limit(D,C,V)] where V is negative
  2239   2239   **          leaves the state of [database connection] D unchanged.
  2240   2240   **
  2241   2241   ** {F12769} A successful call to [sqlite3_limit(D,C,V)] returns the
  2242   2242   **          value of the limit on the size of construct C in
................................................................................
  2323   2323   ** the nByte-th byte, whichever comes first. If the caller knows
  2324   2324   ** that the supplied string is nul-terminated, then there is a small
  2325   2325   ** performance advantage to be had by passing an nByte parameter that 
  2326   2326   ** is equal to the number of bytes in the input string <i>including</i> 
  2327   2327   ** the nul-terminator bytes.{END}
  2328   2328   **
  2329   2329   ** *pzTail is made to point to the first byte past the end of the
  2330         -** first SQL statement in zSql.  These routines only compiles the first
         2330  +** first SQL statement in zSql.  These routines only compile the first
  2331   2331   ** statement in zSql, so *pzTail is left pointing to what remains
  2332   2332   ** uncompiled.
  2333   2333   **
  2334   2334   ** *ppStmt is left pointing to a compiled [prepared statement] that can be
  2335   2335   ** executed using [sqlite3_step()].  Or if there is an error, *ppStmt is
  2336   2336   ** set to NULL.  If the input text contains no SQL (if the input
  2337   2337   ** is and empty string or a comment) then *ppStmt is set to NULL.
................................................................................
  2439   2439     sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
  2440   2440     const void **pzTail     /* OUT: Pointer to unused portion of zSql */
  2441   2441   );
  2442   2442   
  2443   2443   /*
  2444   2444   ** CAPIREF: Retrieving Statement SQL {F13100}
  2445   2445   **
  2446         -** This intereface can be used to retrieve a saved copy of the original
         2446  +** This interface  can be used to retrieve a saved copy of the original
  2447   2447   ** SQL text used to create a [prepared statement].
  2448   2448   **
  2449   2449   ** INVARIANTS:
  2450   2450   **
  2451   2451   ** {F13101} If the [prepared statement] passed as 
  2452   2452   **          the an argument to [sqlite3_sql()] was compiled
  2453   2453   **          compiled using either [sqlite3_prepare_v2()] or
................................................................................
  2486   2486   ** The terms "protected" and "unprotected" refer to whether or not
  2487   2487   ** a mutex is held.  A internal mutex is held for a protected
  2488   2488   ** sqlite3_value object but no mutex is held for an unprotected
  2489   2489   ** sqlite3_value object.  If SQLite is compiled to be single-threaded
  2490   2490   ** (with SQLITE_THREADSAFE=0 and with [sqlite3_threadsafe()] returning 0)
  2491   2491   ** then there is no distinction between
  2492   2492   ** protected and unprotected sqlite3_value objects and they can be
  2493         -** used interchangable.  However, for maximum code portability it
         2493  +** used interchangeable.  However, for maximum code portability it
  2494   2494   ** is recommended that applications make the distinction between
  2495   2495   ** between protected and unprotected sqlite3_value objects even if
  2496   2496   ** they are single threaded.
  2497   2497   **
  2498   2498   ** The sqlite3_value objects that are passed as parameters into the
  2499   2499   ** implementation of application-defined SQL functions are protected.
  2500   2500   ** The sqlite3_value object returned by
................................................................................
  2551   2551   ** The third argument is the value to bind to the parameter.
  2552   2552   **
  2553   2553   ** In those
  2554   2554   ** routines that have a fourth argument, its value is the number of bytes
  2555   2555   ** in the parameter.  To be clear: the value is the number of <u>bytes</u>
  2556   2556   ** in the value, not the number of characters. 
  2557   2557   ** If the fourth parameter is negative, the length of the string is
  2558         -** number of bytes up to the first zero terminator.
         2558  +** the number of bytes up to the first zero terminator.
  2559   2559   **
  2560   2560   ** The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
  2561   2561   ** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
  2562   2562   ** string after SQLite has finished with it. If the fifth argument is
  2563   2563   ** the special value [SQLITE_STATIC], then SQLite assumes that the
  2564   2564   ** information is in static, unmanaged space and does not need to be freed.
  2565   2565   ** If the fifth argument has the value [SQLITE_TRANSIENT], then
  2566   2566   ** SQLite makes its own private copy of the data immediately, before
  2567   2567   ** the sqlite3_bind_*() routine returns.
  2568   2568   **
  2569   2569   ** The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
  2570   2570   ** is filled with zeros.  A zeroblob uses a fixed amount of memory
  2571   2571   ** (just an integer to hold it size) while it is being processed.
  2572         -** Zeroblobs are intended to serve as place-holders for BLOBs whose
         2572  +** Zeroblobs are intended to serve as placeholders for BLOBs whose
  2573   2573   ** content is later written using 
  2574   2574   ** [sqlite3_blob_open | increment BLOB I/O] routines. A negative
  2575   2575   ** value for the zeroblob results in a zero-length BLOB.
  2576   2576   **
  2577   2577   ** The sqlite3_bind_*() routines must be called after
  2578   2578   ** [sqlite3_prepare_v2()] (and its variants) or [sqlite3_reset()] and
  2579   2579   ** before [sqlite3_step()].
  2580   2580   ** Bindings are not cleared by the [sqlite3_reset()] routine.
  2581   2581   ** Unbound parameters are interpreted as NULL.
  2582   2582   **
  2583   2583   ** These routines return [SQLITE_OK] on success or an error code if
  2584   2584   ** anything goes wrong.  [SQLITE_RANGE] is returned if the parameter
  2585         -** index is out of range.  [SQLITE_NOMEM] is returned if malloc fails.
         2585  +** index is out of range.  [SQLITE_NOMEM] is returned if malloc() fails.
  2586   2586   ** [SQLITE_MISUSE] might be returned if these routines are called on a
  2587   2587   ** virtual machine that is the wrong state or which has already been finalized.
  2588   2588   ** Detection of misuse is unreliable.  Applications should not depend
  2589   2589   ** on SQLITE_MISUSE returns.  SQLITE_MISUSE is intended to indicate a
  2590   2590   ** a logic error in the application.  Future versions of SQLite might
  2591   2591   ** panic rather than return SQLITE_MISUSE.
  2592   2592   **
................................................................................
  2608   2608   ** {F13512} The index of an "?" SQL parameter is one larger than the
  2609   2609   **          largest index of SQL parameter to the left, or 1 if
  2610   2610   **          the "?" is the leftmost SQL parameter.
  2611   2611   **
  2612   2612   ** {F13515} The index of an "?NNN" SQL parameter is the integer NNN.
  2613   2613   **
  2614   2614   ** {F13518} The index of an ":VVV", "$VVV", or "@VVV" SQL parameter is
  2615         -**          the same as the index of leftmost occurances of the same
         2615  +**          the same as the index of leftmost occurrences of the same
  2616   2616   **          parameter, or one more than the largest index over all
  2617         -**          parameters to the left if this is the first occurrance
         2617  +**          parameters to the left if this is the first occurrence
  2618   2618   **          of this parameter, or 1 if this is the leftmost parameter.
  2619   2619   **
  2620   2620   ** {F13521} The [sqlite3_prepare | SQL statement compiler] fail with
  2621   2621   **          an [SQLITE_RANGE] error if the index of an SQL parameter
  2622   2622   **          is less than 1 or greater than SQLITE_MAX_VARIABLE_NUMBER.
  2623   2623   **
  2624   2624   ** {F13524} Calls to [sqlite3_bind_text | sqlite3_bind(S,N,V,...)]
................................................................................
  2679   2679   
  2680   2680   /*
  2681   2681   ** CAPI3REF: Number Of SQL Parameters {F13600}
  2682   2682   **
  2683   2683   ** This routine can be used to find the number of SQL parameters
  2684   2684   ** in a prepared statement.  SQL parameters are tokens of the
  2685   2685   ** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as
  2686         -** place-holders for values that are [sqlite3_bind_blob | bound]
         2686  +** placeholders for values that are [sqlite3_bind_blob | bound]
  2687   2687   ** to the parameters at a later time.
  2688   2688   **
  2689   2689   ** This routine actually returns the index of the largest parameter.
  2690   2690   ** For all forms except ?NNN, this will correspond to the number of
  2691   2691   ** unique parameters.  If parameters of the ?NNN are used, there may
  2692   2692   ** be gaps in the list.
  2693   2693   **
................................................................................
  2832   2832   **          interface returns the name
  2833   2833   **          of the Nth column (where 0 is the left-most column) for the
  2834   2834   **          result set of [prepared statement] S as a
  2835   2835   **          zero-terminated UTF-16 string in the native byte order.
  2836   2836   **
  2837   2837   ** {F13724} The [sqlite3_column_name()] and [sqlite3_column_name16()]
  2838   2838   **          interfaces return a NULL pointer if they are unable to
  2839         -**          allocate memory memory to hold there normal return strings.
         2839  +**          allocate memory to hold their normal return strings.
  2840   2840   **
  2841   2841   ** {F13725} If the N parameter to [sqlite3_column_name(S,N)] or
  2842   2842   **          [sqlite3_column_name16(S,N)] is out of range, then the
  2843         -**          interfaces returns a NULL pointer.
         2843  +**          interfaces return a NULL pointer.
  2844   2844   ** 
  2845   2845   ** {F13726} The strings returned by [sqlite3_column_name(S,N)] and
  2846   2846   **          [sqlite3_column_name16(S,N)] are valid until the next
  2847   2847   **          call to either routine with the same S and N parameters
  2848   2848   **          or until [sqlite3_finalize(S)] is called.
  2849   2849   **
  2850   2850   ** {F13727} When a result column of a [SELECT] statement contains
  2851         -**          an AS clause, the name of that column is the indentifier
         2851  +**          an AS clause, the name of that column is the identifier
  2852   2852   **          to the right of the AS keyword.
  2853   2853   */
  2854   2854   const char *sqlite3_column_name(sqlite3_stmt*, int N);
  2855   2855   const void *sqlite3_column_name16(sqlite3_stmt*, int N);
  2856   2856   
  2857   2857   /*
  2858   2858   ** CAPI3REF: Source Of Data In A Query Result {F13740}
................................................................................
  2894   2894   ** undefined.
  2895   2895   **
  2896   2896   ** INVARIANTS:
  2897   2897   **
  2898   2898   ** {F13741} The [sqlite3_column_database_name(S,N)] interface returns either
  2899   2899   **          the UTF-8 zero-terminated name of the database from which the 
  2900   2900   **          Nth result column of [prepared statement] S 
  2901         -**          is extracted, or NULL if the the Nth column of S is a
         2901  +**          is extracted, or NULL if the Nth column of S is a
  2902   2902   **          general expression or if unable to allocate memory
  2903   2903   **          to store the name.
  2904   2904   **          
  2905   2905   ** {F13742} The [sqlite3_column_database_name16(S,N)] interface returns either
  2906   2906   **          the UTF-16 native byte order
  2907   2907   **          zero-terminated name of the database from which the 
  2908   2908   **          Nth result column of [prepared statement] S 
  2909         -**          is extracted, or NULL if the the Nth column of S is a
         2909  +**          is extracted, or NULL if the Nth column of S is a
  2910   2910   **          general expression or if unable to allocate memory
  2911   2911   **          to store the name.
  2912   2912   **          
  2913   2913   ** {F13743} The [sqlite3_column_table_name(S,N)] interface returns either
  2914   2914   **          the UTF-8 zero-terminated name of the table from which the 
  2915   2915   **          Nth result column of [prepared statement] S 
  2916         -**          is extracted, or NULL if the the Nth column of S is a
         2916  +**          is extracted, or NULL if the Nth column of S is a
  2917   2917   **          general expression or if unable to allocate memory
  2918   2918   **          to store the name.
  2919   2919   **          
  2920   2920   ** {F13744} The [sqlite3_column_table_name16(S,N)] interface returns either
  2921   2921   **          the UTF-16 native byte order
  2922   2922   **          zero-terminated name of the table from which the 
  2923   2923   **          Nth result column of [prepared statement] S 
  2924         -**          is extracted, or NULL if the the Nth column of S is a
         2924  +**          is extracted, or NULL if the Nth column of S is a
  2925   2925   **          general expression or if unable to allocate memory
  2926   2926   **          to store the name.
  2927   2927   **          
  2928   2928   ** {F13745} The [sqlite3_column_origin_name(S,N)] interface returns either
  2929   2929   **          the UTF-8 zero-terminated name of the table column from which the 
  2930   2930   **          Nth result column of [prepared statement] S 
  2931         -**          is extracted, or NULL if the the Nth column of S is a
         2931  +**          is extracted, or NULL if the Nth column of S is a
  2932   2932   **          general expression or if unable to allocate memory
  2933   2933   **          to store the name.
  2934   2934   **          
  2935   2935   ** {F13746} The [sqlite3_column_origin_name16(S,N)] interface returns either
  2936   2936   **          the UTF-16 native byte order
  2937   2937   **          zero-terminated name of the table column from which the 
  2938   2938   **          Nth result column of [prepared statement] S 
  2939         -**          is extracted, or NULL if the the Nth column of S is a
         2939  +**          is extracted, or NULL if the Nth column of S is a
  2940   2940   **          general expression or if unable to allocate memory
  2941   2941   **          to store the name.
  2942   2942   **          
  2943   2943   ** {F13748} The return values from
  2944   2944   **          [sqlite3_column_database_name|column metadata interfaces]
  2945   2945   **          are valid
  2946   2946   **          for the lifetime of the [prepared statement]
................................................................................
  3098   3098   **
  3099   3099   ** {F15306}  When a call to [sqlite3_step(S)] stops because it is ready
  3100   3100   **           to return another row of the result set, it returns
  3101   3101   **           [SQLITE_ROW].
  3102   3102   **
  3103   3103   ** {F15308}  If a call to [sqlite3_step(S)] encounters an
  3104   3104   **           [sqlite3_interrupt|interrupt] or a run-time error,
  3105         -**           it returns an appropraite error code that is not one of
         3105  +**           it returns an appropriate error code that is not one of
  3106   3106   **           [SQLITE_OK], [SQLITE_ROW], or [SQLITE_DONE].
  3107   3107   **
  3108   3108   ** {F15310}  If an [sqlite3_interrupt|interrupt] or run-time error
  3109   3109   **           occurs during a call to [sqlite3_step(S)]
  3110   3110   **           for a [prepared statement] S created using
  3111   3111   **           legacy interfaces [sqlite3_prepare()] or
  3112   3112   **           [sqlite3_prepare16()] then the function returns either
................................................................................
  3260   3260   ** <tr><td>  BLOB    <td>  FLOAT    <td> Convert to TEXT then use atof()
  3261   3261   ** <tr><td>  BLOB    <td>   TEXT    <td> Add a zero terminator if needed
  3262   3262   ** </table>
  3263   3263   ** </blockquote>
  3264   3264   **
  3265   3265   ** The table above makes reference to standard C library functions atoi()
  3266   3266   ** and atof().  SQLite does not really use these functions.  It has its
  3267         -** on equavalent internal routines.  The atoi() and atof() names are
         3267  +** own equivalent internal routines.  The atoi() and atof() names are
  3268   3268   ** used in the table for brevity and because they are familiar to most
  3269   3269   ** C programmers.
  3270   3270   **
  3271   3271   ** Note that when type conversions occur, pointers returned by prior
  3272   3272   ** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
  3273   3273   ** sqlite3_column_text16() may be invalidated. 
  3274   3274   ** Type conversions and pointer invalidations might occur
................................................................................
  3493   3493   ** The seventh, eighth and ninth parameters, xFunc, xStep and xFinal, are
  3494   3494   ** pointers to C-language functions that implement the SQL
  3495   3495   ** function or aggregate. A scalar SQL function requires an implementation of
  3496   3496   ** the xFunc callback only, NULL pointers should be passed as the xStep
  3497   3497   ** and xFinal parameters. An aggregate SQL function requires an implementation
  3498   3498   ** of xStep and xFinal and NULL should be passed for xFunc. To delete an
  3499   3499   ** existing SQL function or aggregate, pass NULL for all three function
  3500         -** callback.
         3500  +** callbacks.
  3501   3501   **
  3502   3502   ** It is permitted to register multiple implementations of the same
  3503   3503   ** functions with the same name but with either differing numbers of
  3504         -** arguments or differing perferred text encodings.  SQLite will use
         3504  +** arguments or differing preferred text encodings.  SQLite will use
  3505   3505   ** the implementation most closely matches the way in which the
  3506   3506   ** SQL function is used.
  3507   3507   **
  3508   3508   ** INVARIANTS:
  3509   3509   **
  3510   3510   ** {F16103} The [sqlite3_create_function16()] interface behaves exactly
  3511   3511   **          like [sqlite3_create_function()] in every way except that it
................................................................................
  3513   3513   **          zero-terminated UTF-16 native byte order instead of as a
  3514   3514   **          zero-terminated UTF-8.
  3515   3515   **
  3516   3516   ** {F16106} A successful invocation of
  3517   3517   **          the [sqlite3_create_function(D,X,N,E,...)] interface registers
  3518   3518   **          or replaces callback functions in [database connection] D
  3519   3519   **          used to implement the SQL function named X with N parameters
  3520         -**          and having a perferred text encoding of E.
         3520  +**          and having a preferred text encoding of E.
  3521   3521   **
  3522   3522   ** {F16109} A successful call to [sqlite3_create_function(D,X,N,E,P,F,S,L)]
  3523   3523   **          replaces the P, F, S, and L values from any prior calls with
  3524   3524   **          the same D, X, N, and E values.
  3525   3525   **
  3526   3526   ** {F16112} The [sqlite3_create_function(D,X,...)] interface fails with
  3527   3527   **          a return code of [SQLITE_ERROR] if the SQL function name X is
................................................................................
  3639   3639   ** These routines work only with [protected sqlite3_value] objects.
  3640   3640   ** Any attempt to use these routines on an [unprotected sqlite3_value]
  3641   3641   ** object results in undefined behavior.
  3642   3642   **
  3643   3643   ** These routines work just like the corresponding 
  3644   3644   ** [sqlite3_column_blob | sqlite3_column_* routines] except that 
  3645   3645   ** these routines take a single [protected sqlite3_value] object pointer
  3646         -** instead of an [sqlite3_stmt*] pointer and an integer column number.
         3646  +** instead of a [sqlite3_stmt*] pointer and an integer column number.
  3647   3647   **
  3648   3648   ** The sqlite3_value_text16() interface extracts a UTF16 string
  3649   3649   ** in the native byte-order of the host machine.  The
  3650   3650   ** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
  3651   3651   ** extract UTF16 strings as big-endian and little-endian respectively.
  3652   3652   **
  3653   3653   ** The sqlite3_value_numeric_type() interface attempts to apply
................................................................................
  3768   3768   ** the aggregate SQL function is running.
  3769   3769   **
  3770   3770   ** INVARIANTS:
  3771   3771   **
  3772   3772   ** {F16211} The first invocation of [sqlite3_aggregate_context(C,N)] for
  3773   3773   **          a particular instance of an aggregate function (for a particular
  3774   3774   **          context C) causes SQLite to allocation N bytes of memory,
  3775         -**          zero that memory, and return a pointer to the allocationed
         3775  +**          zero that memory, and return a pointer to the allocated
  3776   3776   **          memory.
  3777   3777   **
  3778   3778   ** {F16213} If a memory allocation error occurs during
  3779   3779   **          [sqlite3_aggregate_context(C,N)] then the function returns 0.
  3780   3780   **
  3781   3781   ** {F16215} Second and subsequent invocations of
  3782   3782   **          [sqlite3_aggregate_context(C,N)] for the same context pointer C
................................................................................
  3791   3791   void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
  3792   3792   
  3793   3793   /*
  3794   3794   ** CAPI3REF: User Data For Functions {F16240}
  3795   3795   **
  3796   3796   ** The sqlite3_user_data() interface returns a copy of
  3797   3797   ** the pointer that was the pUserData parameter (the 5th parameter)
  3798         -** of the the [sqlite3_create_function()]
         3798  +** of the [sqlite3_create_function()]
  3799   3799   ** and [sqlite3_create_function16()] routines that originally
  3800   3800   ** registered the application defined function. {END}
  3801   3801   **
  3802   3802   ** This routine must be called from the same thread in which
  3803   3803   ** the application-defined function is running.
  3804   3804   **
  3805   3805   ** INVARIANTS:
................................................................................
  3813   3813   void *sqlite3_user_data(sqlite3_context*);
  3814   3814   
  3815   3815   /*
  3816   3816   ** CAPI3REF: Database Connection For Functions {F16250}
  3817   3817   **
  3818   3818   ** The sqlite3_context_db_handle() interface returns a copy of
  3819   3819   ** the pointer to the [database connection] (the 1st parameter)
  3820         -** of the the [sqlite3_create_function()]
         3820  +** of the [sqlite3_create_function()]
  3821   3821   ** and [sqlite3_create_function16()] routines that originally
  3822   3822   ** registered the application defined function.
  3823   3823   **
  3824   3824   ** INVARIANTS:
  3825   3825   **
  3826   3826   ** {F16253} The [sqlite3_context_db_handle(C)] interface returns a copy of the
  3827   3827   **          D pointer from the [sqlite3_create_function(D,X,N,E,P,F,S,L)]
................................................................................
  3845   3845   ** invocations of the same function so that the original pattern string
  3846   3846   ** does not need to be recompiled on each invocation.
  3847   3847   **
  3848   3848   ** The sqlite3_get_auxdata() interface returns a pointer to the meta-data
  3849   3849   ** associated by the sqlite3_set_auxdata() function with the Nth argument
  3850   3850   ** value to the application-defined function.
  3851   3851   ** If no meta-data has been ever been set for the Nth
  3852         -** argument of the function, or if the cooresponding function parameter
         3852  +** argument of the function, or if the corresponding function parameter
  3853   3853   ** has changed since the meta-data was set, then sqlite3_get_auxdata()
  3854   3854   ** returns a NULL pointer.
  3855   3855   **
  3856   3856   ** The sqlite3_set_auxdata() interface saves the meta-data
  3857   3857   ** pointed to by its 3rd parameter as the meta-data for the N-th
  3858   3858   ** argument of the application-defined function.  Subsequent
  3859   3859   ** calls to sqlite3_get_auxdata() might return this data, if it has
................................................................................
  3939   3939   ** [sqlite3_bind_blob | sqlite3_bind_* documentation] for
  3940   3940   ** additional information.
  3941   3941   **
  3942   3942   ** The sqlite3_result_blob() interface sets the result from
  3943   3943   ** an application defined function to be the BLOB whose content is pointed
  3944   3944   ** to by the second parameter and which is N bytes long where N is the
  3945   3945   ** third parameter. 
  3946         -** The sqlite3_result_zeroblob() inerfaces set the result of
         3946  +** The sqlite3_result_zeroblob() interfaces set the result of
  3947   3947   ** the application defined function to be a BLOB containing all zero
  3948   3948   ** bytes and N bytes in size, where N is the value of the 2nd parameter.
  3949   3949   **
  3950   3950   ** The sqlite3_result_double() interface sets the result from
  3951   3951   ** an application defined function to be a floating point value specified
  3952   3952   ** by its 2nd argument.
  3953   3953   **
................................................................................
  4024   4024   ** so that [sqlite3_value] specified in the parameter may change or
  4025   4025   ** be deallocated after sqlite3_result_value() returns without harm.
  4026   4026   ** A [protected sqlite3_value] object may always be used where an
  4027   4027   ** [unprotected sqlite3_value] object is required, so either
  4028   4028   ** kind of [sqlite3_value] object can be used with this interface.
  4029   4029   **
  4030   4030   ** If these routines are called from within the different thread 
  4031         -** than the one containing the application-defined function that recieved
         4031  +** than the one containing the application-defined function that received
  4032   4032   ** the [sqlite3_context] pointer, the results are undefined.
  4033   4033   **
  4034   4034   ** INVARIANTS:
  4035   4035   **
  4036   4036   ** {F16403} The default return value from any SQL function is NULL.
  4037   4037   **
  4038   4038   ** {F16406} The [sqlite3_result_blob(C,V,N,D)] interface changes the
................................................................................
  4176   4176   ** that was passed as the third argument when the collation sequence was
  4177   4177   ** registered. {END} The application defined collation routine should
  4178   4178   ** return negative, zero or positive if
  4179   4179   ** the first string is less than, equal to, or greater than the second
  4180   4180   ** string. i.e. (STRING1 - STRING2).
  4181   4181   **
  4182   4182   ** The sqlite3_create_collation_v2() works like sqlite3_create_collation()
  4183         -** excapt that it takes an extra argument which is a destructor for
         4183  +** except that it takes an extra argument which is a destructor for
  4184   4184   ** the collation.  The destructor is called when the collation is
  4185   4185   ** destroyed and is passed a copy of the fourth parameter void* pointer
  4186   4186   ** of the sqlite3_create_collation_v2().
  4187   4187   ** Collations are destroyed when
  4188   4188   ** they are overridden by later calls to the collation creation functions
  4189   4189   ** or when the [sqlite3*] database handle is closed using [sqlite3_close()].
  4190   4190   **
................................................................................
  4372   4372   */
  4373   4373   int sqlite3_sleep(int);
  4374   4374   
  4375   4375   /*
  4376   4376   ** CAPI3REF:  Name Of The Folder Holding Temporary Files {F10310}
  4377   4377   **
  4378   4378   ** If this global variable is made to point to a string which is
  4379         -** the name of a folder (a.ka. directory), then all temporary files
         4379  +** the name of a folder (a.k.a. directory), then all temporary files
  4380   4380   ** created by SQLite will be placed in that directory.  If this variable
  4381   4381   ** is NULL pointer, then SQLite does a search for an appropriate temporary
  4382   4382   ** file directory.
  4383   4383   **
  4384   4384   ** It is not safe to modify this variable once a database connection
  4385   4385   ** has been opened.  It is intended that this variable be set once
  4386   4386   ** as part of process initialization and before any SQLite interface
................................................................................
  4387   4387   ** routines have been call and remain unchanged thereafter.
  4388   4388   */
  4389   4389   SQLITE_EXTERN char *sqlite3_temp_directory;
  4390   4390   
  4391   4391   /*
  4392   4392   ** CAPI3REF:  Test To See If The Database Is In Auto-Commit Mode {F12930}
  4393   4393   **
  4394         -** The sqlite3_get_autocommit() interfaces returns non-zero or
         4394  +** The sqlite3_get_autocommit() interface returns non-zero or
  4395   4395   ** zero if the given database connection is or is not in autocommit mode,
  4396   4396   ** respectively.   Autocommit mode is on
  4397   4397   ** by default.  Autocommit mode is disabled by a [BEGIN] statement.
  4398         -** Autocommit mode is reenabled by a [COMMIT] or [ROLLBACK].
         4398  +** Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].
  4399   4399   **
  4400   4400   ** If certain kinds of errors occur on a statement within a multi-statement
  4401   4401   ** transactions (errors including [SQLITE_FULL], [SQLITE_IOERR], 
  4402   4402   ** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the
  4403   4403   ** transaction might be rolled back automatically.  The only way to
  4404   4404   ** find out if SQLite automatically rolled back the transaction after
  4405   4405   ** an error is to use this function.
................................................................................
  4631   4631   int sqlite3_enable_shared_cache(int);
  4632   4632   
  4633   4633   /*
  4634   4634   ** CAPI3REF:  Attempt To Free Heap Memory {F17340}
  4635   4635   **
  4636   4636   ** The sqlite3_release_memory() interface attempts to
  4637   4637   ** free N bytes of heap memory by deallocating non-essential memory
  4638         -** allocations held by the database labrary. {END}  Memory used
         4638  +** allocations held by the database library. {END}  Memory used
  4639   4639   ** to cache database pages to improve performance is an example of
  4640   4640   ** non-essential memory.  Sqlite3_release_memory() returns
  4641   4641   ** the number of bytes actually freed, which might be more or less
  4642   4642   ** than the amount requested.
  4643   4643   **
  4644   4644   ** INVARIANTS:
  4645   4645   **
  4646   4646   ** {F17341} The [sqlite3_release_memory(N)] interface attempts to
  4647   4647   **          free N bytes of heap memory by deallocating non-essential
  4648         -**          memory allocations held by the database labrary.
         4648  +**          memory allocations held by the database library.
  4649   4649   **
  4650   4650   ** {F16342} The [sqlite3_release_memory(N)] returns the number
  4651   4651   **          of bytes actually freed, which might be more or less
  4652   4652   **          than the amount requested.
  4653   4653   */
  4654   4654   int sqlite3_release_memory(int);
  4655   4655   
................................................................................
  4669   4669   ** the memory is allocated anyway and the current operation proceeds.
  4670   4670   **
  4671   4671   ** A negative or zero value for N means that there is no soft heap limit and
  4672   4672   ** [sqlite3_release_memory()] will only be called when memory is exhausted.
  4673   4673   ** The default value for the soft heap limit is zero.
  4674   4674   **
  4675   4675   ** SQLite makes a best effort to honor the soft heap limit.  
  4676         -** But if the soft heap limit cannot honored, execution will
         4676  +** But if the soft heap limit cannot be honored, execution will
  4677   4677   ** continue without error or notification.  This is why the limit is 
  4678   4678   ** called a "soft" limit.  It is advisory only.
  4679   4679   **
  4680   4680   ** Prior to SQLite version 3.5.0, this routine only constrained the memory
  4681   4681   ** allocated by a single thread - the same thread in which this routine
  4682   4682   ** runs.  Beginning with SQLite version 3.5.0, the soft heap limit is
  4683   4683   ** applied to all threads. The value specified for the soft heap limit
................................................................................
  4733   4733   ** The third and fourth parameters to this function are the table and column 
  4734   4734   ** name of the desired column, respectively. Neither of these parameters 
  4735   4735   ** may be NULL.
  4736   4736   **
  4737   4737   ** Meta information is returned by writing to the memory locations passed as
  4738   4738   ** the 5th and subsequent parameters to this function. Any of these 
  4739   4739   ** arguments may be NULL, in which case the corresponding element of meta 
  4740         -** information is ommitted.
         4740  +** information is omitted.
  4741   4741   **
  4742   4742   ** <pre>
  4743   4743   ** Parameter     Output Type      Description
  4744   4744   ** -----------------------------------
  4745   4745   **
  4746   4746   **   5th         const char*      Data type
  4747   4747   **   6th         const char*      Name of the default collation sequence 
................................................................................
  4884   4884   /*
  4885   4885   ****** EXPERIMENTAL - subject to change without notice **************
  4886   4886   **
  4887   4887   ** The interface to the virtual-table mechanism is currently considered
  4888   4888   ** to be experimental.  The interface might change in incompatible ways.
  4889   4889   ** If this is a problem for you, do not use the interface at this time.
  4890   4890   **
  4891         -** When the virtual-table mechanism stablizes, we will declare the
         4891  +** When the virtual-table mechanism stabilizes, we will declare the
  4892   4892   ** interface fixed, support it indefinitely, and remove this comment.
  4893   4893   */
  4894   4894   
  4895   4895   /*
  4896   4896   ** Structures used by the virtual table interface
  4897   4897   */
  4898   4898   typedef struct sqlite3_vtab sqlite3_vtab;
................................................................................
  5114   5114   ** must exist in order to be overloaded.
  5115   5115   **
  5116   5116   ** This API makes sure a global version of a function with a particular
  5117   5117   ** name and number of parameters exists.  If no such function exists
  5118   5118   ** before this API is called, a new function is created.  The implementation
  5119   5119   ** of the new function always causes an exception to be thrown.  So
  5120   5120   ** the new function is not good for anything by itself.  Its only
  5121         -** purpose is to be a place-holder function that can be overloaded
         5121  +** purpose is to be a placeholder function that can be overloaded
  5122   5122   ** by virtual tables.
  5123   5123   **
  5124   5124   ** This API should be considered part of the virtual table interface,
  5125   5125   ** which is experimental and subject to change.
  5126   5126   */
  5127   5127   int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
  5128   5128   
................................................................................
  5196   5196   **
  5197   5197   ** {F17819} The [sqlite3_blob_open()] interface returns [SQLITE_OK] on 
  5198   5198   **          success and an appropriate [error code] on failure.
  5199   5199   **
  5200   5200   ** {F17821} If an error occurs during evaluation of [sqlite3_blob_open(D,...)]
  5201   5201   **          then subsequent calls to [sqlite3_errcode(D)],
  5202   5202   **          [sqlite3_errmsg(D)], and [sqlite3_errmsg16(D)] will return
  5203         -**          information approprate for that error.
         5203  +**          information appropriate for that error.
  5204   5204   */
  5205   5205   int sqlite3_blob_open(
  5206   5206     sqlite3*,
  5207   5207     const char *zDb,
  5208   5208     const char *zTable,
  5209   5209     const char *zColumn,
  5210   5210     sqlite3_int64 iRow,
................................................................................
  5300   5300   ** {F17865} If the requested read could not be completed,
  5301   5301   **          the [sqlite3_blob_read(P,Z,N,X)] interface returns an
  5302   5302   **          appropriate [error code] or [extended error code].
  5303   5303   **
  5304   5304   ** {F17868} If an error occurs during evaluation of [sqlite3_blob_read(P,...)]
  5305   5305   **          then subsequent calls to [sqlite3_errcode(D)],
  5306   5306   **          [sqlite3_errmsg(D)], and [sqlite3_errmsg16(D)] will return
  5307         -**          information approprate for that error, where D is the
         5307  +**          information appropriate for that error, where D is the
  5308   5308   **          database handle that was used to open blob handle P.
  5309   5309   */
  5310   5310   int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
  5311   5311   
  5312   5312   /*
  5313   5313   ** CAPI3REF:  Write Data Into A BLOB Incrementally {F17870}
  5314   5314   **
................................................................................
  5355   5355   ** {F17885} If the requested write could not be completed,
  5356   5356   **          the [sqlite3_blob_write(P,Z,N,X)] interface returns an
  5357   5357   **          appropriate [error code] or [extended error code].
  5358   5358   **
  5359   5359   ** {F17888} If an error occurs during evaluation of [sqlite3_blob_write(D,...)]
  5360   5360   **          then subsequent calls to [sqlite3_errcode(D)],
  5361   5361   **          [sqlite3_errmsg(D)], and [sqlite3_errmsg16(D)] will return
  5362         -**          information approprate for that error.
         5362  +**          information appropriate for that error.
  5363   5363   */
  5364   5364   int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
  5365   5365   
  5366   5366   /*
  5367   5367   ** CAPI3REF:  Virtual File System Objects {F11200}
  5368   5368   **
  5369   5369   ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
................................................................................
  5444   5444   ** <li>   SQLITE_MUTEX_NOOP
  5445   5445   ** </ul>
  5446   5446   **
  5447   5447   ** The SQLITE_MUTEX_NOOP implementation is a set of routines 
  5448   5448   ** that does no real locking and is appropriate for use in 
  5449   5449   ** a single-threaded application.  The SQLITE_MUTEX_OS2,
  5450   5450   ** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations
  5451         -** are appropriate for use on os/2, unix, and windows.
         5451  +** are appropriate for use on OS/2, Unix, and Windows.
  5452   5452   ** 
  5453   5453   ** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
  5454   5454   ** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
  5455   5455   ** implementation is included with the library.  The
  5456   5456   ** mutex interface routines defined here become external
  5457   5457   ** references in the SQLite library for which implementations
  5458   5458   ** must be provided by the application.  This facility allows an
................................................................................
  5506   5506   ** use when they are deallocated. {U17022} Attempting to deallocate a static
  5507   5507   ** mutex results in undefined behavior. {F17023} SQLite never deallocates
  5508   5508   ** a static mutex. {END}
  5509   5509   **
  5510   5510   ** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
  5511   5511   ** to enter a mutex. {F17024} If another thread is already within the mutex,
  5512   5512   ** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
  5513         -** SQLITE_BUSY. {F17025}  The sqlite3_mutex_try() interface returns SQLITE_OK
         5513  +** SQLITE_BUSY. {F17025}  The sqlite3_mutex_try() interface returns [SQLITE_OK]
  5514   5514   ** upon successful entry.  {F17026} Mutexes created using
  5515   5515   ** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.
  5516   5516   ** {F17027} In such cases the,
  5517   5517   ** mutex must be exited an equal number of times before another thread
  5518   5518   ** can enter.  {U17028} If the same thread tries to enter any other
  5519   5519   ** kind of mutex more than once, the behavior is undefined.
  5520   5520   ** {F17029} SQLite will never exhibit
................................................................................
  5615   5615   int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
  5616   5616   
  5617   5617   /*
  5618   5618   ** CAPI3REF: Testing Interface {F11400}
  5619   5619   **
  5620   5620   ** The sqlite3_test_control() interface is used to read out internal
  5621   5621   ** state of SQLite and to inject faults into SQLite for testing
  5622         -** purposes.  The first parameter a operation code that determines
         5622  +** purposes.  The first parameter is an operation code that determines
  5623   5623   ** the number, meaning, and operation of all subsequent parameters.
  5624   5624   **
  5625   5625   ** This interface is not for use by applications.  It exists solely
  5626   5626   ** for verifying the correct operation of the SQLite library.  Depending
  5627   5627   ** on how the SQLite library is compiled, this interface might not exist.
  5628   5628   **
  5629   5629   ** The details of the operation codes, their meanings, the parameters
................................................................................
  5635   5635   
  5636   5636   /*
  5637   5637   ** CAPI3REF: Testing Interface Operation Codes {F11410}
  5638   5638   **
  5639   5639   ** These constants are the valid operation code parameters used
  5640   5640   ** as the first argument to [sqlite3_test_control()].
  5641   5641   **
  5642         -** These parameters and their meansing are subject to change
         5642  +** These parameters and their meanings are subject to change
  5643   5643   ** without notice.  These values are for testing purposes only.
  5644   5644   ** Applications should not use any of these parameters or the
  5645   5645   ** [sqlite3_test_control()] interface.
  5646   5646   */
  5647   5647   #define SQLITE_TESTCTRL_FAULT_CONFIG             1
  5648   5648   #define SQLITE_TESTCTRL_FAULT_FAILURES           2
  5649   5649   #define SQLITE_TESTCTRL_FAULT_BENIGN_FAILURES    3