persistent-sqlite 2.10.5.2 → 2.10.6
raw patch · 5 files changed
+287/−47 lines, 5 files
Files
- ChangeLog.md +7/−0
- Database/Persist/Sqlite.hs +70/−1
- cbits/sqlite3.c too large to diff
- cbits/sqlite3.h +208/−42
- persistent-sqlite.cabal +2/−4
ChangeLog.md view
@@ -1,5 +1,12 @@ # Changelog for persistent-sqlite +## 2.10.6++* Bump SQLite amalgamation to version 3.30.1 [#991](https://github.com/yesodweb/persistent/pull/991)+* Add `createRawSqlitePoolFromInfo`, `createRawSqlitePoolFromInfo_`,+ `withRawSqlitePoolInfo`, and `withRawSqlitePoolInfo_` to match the existing+ pool functions for regular `SqlBackend`. [#983](https://github.com/yesodweb/persistent/pull/983)+ ## 2.10.5.2 * Compatibility with latest persistent-template for test suite [#1002](https://github.com/yesodweb/persistent/pull/1002/files)
Database/Persist/Sqlite.hs view
@@ -39,12 +39,16 @@ , persistentBackend , rawSqliteConnection , withRawSqliteConnInfo+ , createRawSqlitePoolFromInfo+ , createRawSqlitePoolFromInfo_+ , withRawSqlitePoolInfo+ , withRawSqlitePoolInfo_ ) where import Control.Concurrent (threadDelay) import qualified Control.Exception as E import Control.Monad (forM_)-import Control.Monad.IO.Unlift (MonadIO (..), MonadUnliftIO, withRunInIO, withUnliftIO, unliftIO, withRunInIO)+import Control.Monad.IO.Unlift (MonadIO (..), MonadUnliftIO, askRunInIO, withRunInIO, withUnliftIO, unliftIO, withRunInIO) import Control.Monad.Logger (NoLoggingT, runNoLoggingT, MonadLogger, logWarn, runLoggingT) import Control.Monad.Trans.Reader (ReaderT, runReaderT, withReaderT) import Control.Monad.Trans.Writer (runWriterT)@@ -731,6 +735,71 @@ where openBackend = openWith RawSqlite connInfo closeBackend = close' . _persistentBackend++-- | Like `createSqlitePoolFromInfo`, but like `withRawSqliteConnInfo` it+-- exposes the internal `Sqlite.Connection`.+--+-- For power users who want to manually interact with SQLite's C API via+-- internals exposed by "Database.Sqlite.Internal". The callback can be used to+-- run arbitrary actions on the connection upon allocation from the pool.+--+-- @since 2.10.6+createRawSqlitePoolFromInfo+ :: (MonadLogger m, MonadUnliftIO m)+ => SqliteConnectionInfo+ -> (RawSqlite SqlBackend -> m ())+ -- ^ An action that is run whenever a new `RawSqlite` connection is+ -- allocated in the pool. The main use of this function is to register+ -- custom functions with the SQLite connection upon creation.+ -> Int+ -> m (Pool (RawSqlite SqlBackend))+createRawSqlitePoolFromInfo connInfo f n = do+ runIO <- askRunInIO+ let createRawSqlite logFun = do+ result <- openWith RawSqlite connInfo logFun+ result <$ runIO (f result)++ createSqlPool createRawSqlite n++-- | Like `createRawSqlitePoolFromInfo`, but doesn't require a callback+-- operating on the connection.+--+-- @since 2.10.6+createRawSqlitePoolFromInfo_+ :: (MonadLogger m, MonadUnliftIO m)+ => SqliteConnectionInfo -> Int -> m (Pool (RawSqlite SqlBackend))+createRawSqlitePoolFromInfo_ connInfo =+ createRawSqlitePoolFromInfo connInfo (const (return ()))++-- | Like `createSqlitePoolInfo`, but based on `createRawSqlitePoolFromInfo`.+--+-- @since 2.10.6+withRawSqlitePoolInfo+ :: (MonadUnliftIO m, MonadLogger m)+ => SqliteConnectionInfo+ -> (RawSqlite SqlBackend -> m ())+ -> Int -- ^ number of connections to open+ -> (Pool (RawSqlite SqlBackend) -> m a)+ -> m a+withRawSqlitePoolInfo connInfo f n work = do+ runIO <- askRunInIO+ let createRawSqlite logFun = do+ result <- openWith RawSqlite connInfo logFun+ result <$ runIO (f result)++ withSqlPool createRawSqlite n work++-- | Like `createSqlitePoolInfo`, but based on `createRawSqlitePoolFromInfo_`.+--+-- @since 2.10.6+withRawSqlitePoolInfo_+ :: (MonadUnliftIO m, MonadLogger m)+ => SqliteConnectionInfo+ -> Int -- ^ number of connections to open+ -> (Pool (RawSqlite SqlBackend) -> m a)+ -> m a+withRawSqlitePoolInfo_ connInfo =+ withRawSqlitePoolInfo connInfo (const (return ())) -- | Wrapper for persistent SqlBackends that carry the corresponding -- `Sqlite.Connection`.
cbits/sqlite3.c view
file too large to diff
cbits/sqlite3.h view
@@ -123,9 +123,9 @@ ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */-#define SQLITE_VERSION "3.26.0"-#define SQLITE_VERSION_NUMBER 3026000-#define SQLITE_SOURCE_ID "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9"+#define SQLITE_VERSION "3.30.1"+#define SQLITE_VERSION_NUMBER 3030001+#define SQLITE_SOURCE_ID "2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3df1b0b" /* ** CAPI3REF: Run-Time Library Version Numbers@@ -189,6 +189,9 @@ #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS SQLITE_API int sqlite3_compileoption_used(const char *zOptName); SQLITE_API const char *sqlite3_compileoption_get(int N);+#else+# define sqlite3_compileoption_used(X) 0+# define sqlite3_compileoption_get(X) ((void*)0) #endif /*@@ -823,6 +826,15 @@ ** file space based on this hint in order to help writes to the database ** file run faster. **+** <li>[[SQLITE_FCNTL_SIZE_LIMIT]]+** The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that+** implements [sqlite3_deserialize()] to set an upper bound on the size+** of the in-memory database. The argument is a pointer to a [sqlite3_int64].+** If the integer pointed to is negative, then it is filled in with the+** current limit. Otherwise the limit is set to the larger of the value+** of the integer pointed to and the current database size. The integer+** pointed to is set to the new limit.+** ** <li>[[SQLITE_FCNTL_CHUNK_SIZE]] ** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS ** extends and truncates the database file in chunks of a size specified@@ -1131,6 +1143,7 @@ #define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33 #define SQLITE_FCNTL_LOCK_TIMEOUT 34 #define SQLITE_FCNTL_DATA_VERSION 35+#define SQLITE_FCNTL_SIZE_LIMIT 36 /* deprecated names */ #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE@@ -1283,8 +1296,14 @@ ** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] ** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to ** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]-** to test whether a file is at least readable. The file can be a-** directory.+** to test whether a file is at least readable. The SQLITE_ACCESS_READ+** flag is never actually used and is not implemented in the built-in+** VFSes of SQLite. The file is named by the second argument and can be a+** directory. The xAccess method returns [SQLITE_OK] on success or some+** non-zero error code if there is an I/O error or if the name of+** the file given in the second argument is illegal. If SQLITE_OK+** is returned, then non-zero or zero is written into *pResOut to indicate+** whether or not the file is accessible. ** ** ^SQLite will always allocate at least mxPathname+1 bytes for the ** output buffer xFullPathname. The exact size of the output buffer@@ -1972,6 +1991,17 @@ ** negative value for this option restores the default behaviour. ** This option is only available if SQLite is compiled with the ** [SQLITE_ENABLE_SORTER_REFERENCES] compile-time option.+**+** [[SQLITE_CONFIG_MEMDB_MAXSIZE]]+** <dt>SQLITE_CONFIG_MEMDB_MAXSIZE+** <dd>The SQLITE_CONFIG_MEMDB_MAXSIZE option accepts a single parameter+** [sqlite3_int64] parameter which is the default maximum size for an in-memory+** database created using [sqlite3_deserialize()]. This default maximum+** size can be adjusted up or down for individual databases using the+** [SQLITE_FCNTL_SIZE_LIMIT] [sqlite3_file_control|file-control]. If this+** configuration setting is never used, then the default maximum is determined+** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that+** compile-time option is not set, then the default maximum is 1073741824. ** </dl> */ #define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */@@ -2002,6 +2032,7 @@ #define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */ #define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */ #define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */+#define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */ /* ** CAPI3REF: Database Connection Configuration Options@@ -2062,10 +2093,21 @@ ** following this call. The second parameter may be a NULL pointer, in ** which case the trigger setting is not reported back. </dd> **+** [[SQLITE_DBCONFIG_ENABLE_VIEW]]+** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt>+** <dd> ^This option is used to enable or disable [CREATE VIEW | views].+** There should be two additional arguments.+** The first argument is an integer which is 0 to disable views,+** positive to enable views or negative to leave the setting unchanged.+** The second parameter is a pointer to an integer into which+** is written 0 or 1 to indicate whether views are disabled or enabled+** following this call. The second parameter may be a NULL pointer, in+** which case the view setting is not reported back. </dd>+** ** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]] ** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>-** <dd> ^This option is used to enable or disable the two-argument-** version of the [fts3_tokenizer()] function which is part of the+** <dd> ^This option is used to enable or disable the+** [fts3_tokenizer()] function which is part of the ** [FTS3] full-text search engine extension. ** There should be two additional arguments. ** The first argument is an integer which is 0 to disable fts3_tokenizer() or@@ -2173,10 +2215,50 @@ ** features include but are not limited to the following: ** <ul> ** <li> The [PRAGMA writable_schema=ON] statement.+** <li> The [PRAGMA journal_mode=OFF] statement. ** <li> Writes to the [sqlite_dbpage] virtual table. ** <li> Direct writes to [shadow tables]. ** </ul> ** </dd>+**+** [[SQLITE_DBCONFIG_WRITABLE_SCHEMA]] <dt>SQLITE_DBCONFIG_WRITABLE_SCHEMA</dt>+** <dd>The SQLITE_DBCONFIG_WRITABLE_SCHEMA option activates or deactivates the+** "writable_schema" flag. This has the same effect and is logically equivalent+** to setting [PRAGMA writable_schema=ON] or [PRAGMA writable_schema=OFF].+** The first argument to this setting is an integer which is 0 to disable +** the writable_schema, positive to enable writable_schema, or negative to+** leave the setting unchanged. The second parameter is a pointer to an+** integer into which is written 0 or 1 to indicate whether the writable_schema+** is enabled or disabled following this call.+** </dd>+**+** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]]+** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt>+** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates+** the legacy behavior of the [ALTER TABLE RENAME] command such it+** behaves as it did prior to [version 3.24.0] (2018-06-04). See the+** "Compatibility Notice" on the [ALTER TABLE RENAME documentation] for+** additional information. This feature can also be turned on and off+** using the [PRAGMA legacy_alter_table] statement.+** </dd>+**+** [[SQLITE_DBCONFIG_DQS_DML]]+** <dt>SQLITE_DBCONFIG_DQS_DML</td>+** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates+** the legacy [double-quoted string literal] misfeature for DML statement+** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The+** default value of this setting is determined by the [-DSQLITE_DQS]+** compile-time option.+** </dd>+**+** [[SQLITE_DBCONFIG_DQS_DDL]]+** <dt>SQLITE_DBCONFIG_DQS_DDL</td>+** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates+** the legacy [double-quoted string literal] misfeature for DDL statements,+** such as CREATE TABLE and CREATE INDEX. The+** default value of this setting is determined by the [-DSQLITE_DQS]+** compile-time option.+** </dd> ** </dl> */ #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */@@ -2190,7 +2272,12 @@ #define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */ #define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */ #define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */-#define SQLITE_DBCONFIG_MAX 1010 /* Largest DBCONFIG */+#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */+#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE 1012 /* int int* */+#define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */+#define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */+#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */+#define SQLITE_DBCONFIG_MAX 1015 /* Largest DBCONFIG */ /* ** CAPI3REF: Enable Or Disable Extended Result Codes@@ -2347,7 +2434,7 @@ ** not. ^Changes to a view that are intercepted by INSTEAD OF triggers ** are not counted. **-** This the [sqlite3_total_changes(D)] interface only reports the number+** The [sqlite3_total_changes(D)] interface only reports the number ** of rows that changed due to SQL statement run against database ** connection D. Any changes by other database connections are ignored. ** To detect changes against a database file from other database@@ -2991,9 +3078,9 @@ ** time is in units of nanoseconds, however the current implementation ** is only capable of millisecond resolution so the six least significant ** digits in the time are meaningless. Future versions of SQLite-** might provide greater resolution on the profiler callback. The-** sqlite3_profile() function is considered experimental and is-** subject to change in future versions of SQLite.+** might provide greater resolution on the profiler callback. Invoking+** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the+** profile callback. */ SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);@@ -3407,6 +3494,8 @@ ** is not a database file pathname pointer that SQLite passed into the xOpen ** VFS method, then the behavior of this routine is undefined and probably ** undesirable.+**+** See the [URI filename] documentation for additional information. */ SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);@@ -3629,18 +3718,23 @@ ** deplete the limited store of lookaside memory. Future versions of ** SQLite may act on this hint differently. **-** [[SQLITE_PREPARE_NORMALIZE]] ^(<dt>SQLITE_PREPARE_NORMALIZE</dt>-** <dd>The SQLITE_PREPARE_NORMALIZE flag indicates that a normalized-** representation of the SQL statement should be calculated and then-** associated with the prepared statement, which can be obtained via-** the [sqlite3_normalized_sql()] interface.)^ The semantics used to-** normalize a SQL statement are unspecified and subject to change.-** At a minimum, literal values will be replaced with suitable-** placeholders.+** [[SQLITE_PREPARE_NORMALIZE]] <dt>SQLITE_PREPARE_NORMALIZE</dt>+** <dd>The SQLITE_PREPARE_NORMALIZE flag is a no-op. This flag used+** to be required for any prepared statement that wanted to use the+** [sqlite3_normalized_sql()] interface. However, the+** [sqlite3_normalized_sql()] interface is now available to all+** prepared statements, regardless of whether or not they use this+** flag.+**+** [[SQLITE_PREPARE_NO_VTAB]] <dt>SQLITE_PREPARE_NO_VTAB</dt>+** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler+** to return an error (error code SQLITE_ERROR) if the statement uses+** any virtual tables. ** </dl> */ #define SQLITE_PREPARE_PERSISTENT 0x01 #define SQLITE_PREPARE_NORMALIZE 0x02+#define SQLITE_PREPARE_NO_VTAB 0x04 /* ** CAPI3REF: Compiling An SQL Statement@@ -3732,7 +3826,7 @@ ** ^The specific value of WHERE-clause [parameter] might influence the ** choice of query plan if the parameter is the left-hand side of a [LIKE] ** or [GLOB] operator or if the parameter is compared to an indexed column-** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.+** and the [SQLITE_ENABLE_STAT4] compile-time option is enabled. ** </li> ** </ol> **@@ -3866,6 +3960,18 @@ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); /*+** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement+** METHOD: sqlite3_stmt+**+** ^The sqlite3_stmt_isexplain(S) interface returns 1 if the+** prepared statement S is an EXPLAIN statement, or 2 if the+** statement S is an EXPLAIN QUERY PLAN.+** ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is+** an ordinary statement or a NULL pointer.+*/+SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);++/* ** CAPI3REF: Determine If A Prepared Statement Has Been Reset ** METHOD: sqlite3_stmt **@@ -4004,7 +4110,9 @@ ** ^The fifth argument to the BLOB and string binding interfaces ** is a destructor used to dispose of the BLOB or ** string after SQLite has finished with it. ^The destructor is called-** to dispose of the BLOB or string even if the call to bind API fails.+** to dispose of the BLOB or string even if the call to the bind API fails,+** except the destructor is not called if the third parameter is a NULL+** pointer or the fourth parameter is negative. ** ^If the fifth argument is ** the special value [SQLITE_STATIC], then SQLite assumes that the ** information is in static, unmanaged space and does not need to be freed.@@ -4753,6 +4861,12 @@ ** perform additional optimizations on deterministic functions, so use ** of the [SQLITE_DETERMINISTIC] flag is recommended where possible. **+** ^The fourth parameter may also optionally include the [SQLITE_DIRECTONLY]+** flag, which if present prevents the function from being invoked from+** within VIEWs or TRIGGERs. For security reasons, the [SQLITE_DIRECTONLY]+** flag is recommended for any application-defined SQL function that has+** side-effects.+** ** ^(The fifth parameter is an arbitrary pointer. The implementation of the ** function can gain access to this pointer using [sqlite3_user_data()].)^ **@@ -4869,8 +4983,30 @@ ** [SQLITE_UTF8 | preferred text encoding] as the fourth argument ** to [sqlite3_create_function()], [sqlite3_create_function16()], or ** [sqlite3_create_function_v2()].+**+** The SQLITE_DETERMINISTIC flag means that the new function will always+** maps the same inputs into the same output. The abs() function is+** deterministic, for example, but randomblob() is not.+**+** The SQLITE_DIRECTONLY flag means that the function may only be invoked+** from top-level SQL, and cannot be used in VIEWs or TRIGGERs. This is+** a security feature which is recommended for all +** [application-defined SQL functions] that have side-effects. This flag +** prevents an attacker from adding triggers and views to a schema then +** tricking a high-privilege application into causing unintended side-effects+** while performing ordinary queries.+**+** The SQLITE_SUBTYPE flag indicates to SQLite that a function may call+** [sqlite3_value_subtype()] to inspect the sub-types of its arguments.+** Specifying this flag makes no difference for scalar or aggregate user+** functions. However, if it is not specified for a user-defined window+** function, then any sub-types belonging to arguments passed to the window+** function may be discarded before the window function is called (i.e.+** sqlite3_value_subtype() will always return 0). */-#define SQLITE_DETERMINISTIC 0x800+#define SQLITE_DETERMINISTIC 0x000000800+#define SQLITE_DIRECTONLY 0x000080000+#define SQLITE_SUBTYPE 0x000100000 /* ** CAPI3REF: Deprecated Functions@@ -4921,6 +5057,8 @@ ** <tr><td><b>sqlite3_value_nochange </b> ** <td>→ <td>True if the column is unchanged in an UPDATE ** against a virtual table.+** <tr><td><b>sqlite3_value_frombind </b>+** <td>→ <td>True if value originated from a [bound parameter] ** </table></blockquote> ** ** <b>Details:</b>@@ -4982,6 +5120,11 @@ ** than within an [xUpdate] method call for an UPDATE statement, then ** the return value is arbitrary and meaningless. **+** ^The sqlite3_value_frombind(X) interface returns non-zero if the+** value X originated from one of the [sqlite3_bind_int|sqlite3_bind()]+** interfaces. ^If X comes from an SQL literal value, or a table column,+** and expression, then sqlite3_value_frombind(X) returns zero.+** ** Please pay particular attention to the fact that the pointer returned ** from [sqlite3_value_blob()], [sqlite3_value_text()], or ** [sqlite3_value_text16()] can be invalidated by a subsequent call to@@ -5027,6 +5170,7 @@ SQLITE_API int sqlite3_value_type(sqlite3_value*); SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); SQLITE_API int sqlite3_value_nochange(sqlite3_value*);+SQLITE_API int sqlite3_value_frombind(sqlite3_value*); /* ** CAPI3REF: Finding The Subtype Of SQL Values@@ -5762,7 +5906,7 @@ ** associated with database N of connection D. ^The main database file ** has the name "main". If there is no attached database N on the database ** connection D, or if database N is a temporary or in-memory database, then-** a NULL pointer is returned.+** this function will return either a NULL pointer or an empty string. ** ** ^The filename returned by this function is the output of the ** xFullPathname method of the [VFS]. ^In other words, the filename@@ -6508,6 +6652,12 @@ ** ^The sqlite3_create_module() ** interface is equivalent to sqlite3_create_module_v2() with a NULL ** destructor.+**+** ^If the third parameter (the pointer to the sqlite3_module object) is+** NULL then no new module is create and any existing modules with the+** same name are dropped.+**+** See also: [sqlite3_drop_modules()] */ SQLITE_API int sqlite3_create_module( sqlite3 *db, /* SQLite connection to register module with */@@ -6524,6 +6674,23 @@ ); /*+** CAPI3REF: Remove Unnecessary Virtual Table Implementations+** METHOD: sqlite3+**+** ^The sqlite3_drop_modules(D,L) interface removes all virtual+** table modules from database connection D except those named on list L.+** The L parameter must be either NULL or a pointer to an array of pointers+** to strings where the array is terminated by a single NULL pointer.+** ^If the L parameter is NULL, then all virtual table modules are removed.+**+** See also: [sqlite3_create_module()]+*/+SQLITE_API int sqlite3_drop_modules(+ sqlite3 *db, /* Remove modules from this connection */+ const char **azKeep /* Except, do not remove the ones named here */+);++/* ** CAPI3REF: Virtual Table Instance Object ** KEYWORDS: sqlite3_vtab **@@ -7231,7 +7398,7 @@ #define SQLITE_TESTCTRL_FIRST 5 #define SQLITE_TESTCTRL_PRNG_SAVE 5 #define SQLITE_TESTCTRL_PRNG_RESTORE 6-#define SQLITE_TESTCTRL_PRNG_RESET 7+#define SQLITE_TESTCTRL_PRNG_RESET 7 /* NOT USED */ #define SQLITE_TESTCTRL_BITVEC_TEST 8 #define SQLITE_TESTCTRL_FAULT_INSTALL 9 #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10@@ -7253,7 +7420,10 @@ #define SQLITE_TESTCTRL_SORTER_MMAP 24 #define SQLITE_TESTCTRL_IMPOSTER 25 #define SQLITE_TESTCTRL_PARSER_COVERAGE 26-#define SQLITE_TESTCTRL_LAST 26 /* Largest TESTCTRL */+#define SQLITE_TESTCTRL_RESULT_INTREAL 27+#define SQLITE_TESTCTRL_PRNG_SEED 28+#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29+#define SQLITE_TESTCTRL_LAST 29 /* Largest TESTCTRL */ /* ** CAPI3REF: SQL Keyword Checking@@ -9996,7 +10166,7 @@ ** sqlite3changeset_next() is called on the iterator or until the ** conflict-handler function returns. If pnCol is not NULL, then *pnCol is ** set to the number of columns in the table affected by the change. If-** pbIncorrect is not NULL, then *pbIndirect is set to true (1) if the change+** pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change ** is an indirect change, or false (0) otherwise. See the documentation for ** [sqlite3session_indirect()] for a description of direct and indirect ** changes. Finally, if pOp is not NULL, then *pOp is set to one of @@ -10863,7 +11033,7 @@ ** in size. This function allocates and populates a buffer with a copy ** of the changeset rebased rebased according to the configuration of the ** rebaser object passed as the first argument. If successful, (*ppOut)-** is set to point to the new buffer containing the rebased changset and +** is set to point to the new buffer containing the rebased changeset and ** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the ** responsibility of the caller to eventually free the new buffer using ** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)@@ -11230,12 +11400,8 @@ ** ** Usually, output parameter *piPhrase is set to the phrase number, *piCol ** to the column in which it occurs and *piOff the token offset of the-** first token of the phrase. The exception is if the table was created-** with the offsets=0 option specified. In this case *piOff is always-** set to -1.-**-** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM) -** if an error occurs.+** first token of the phrase. Returns SQLITE_OK if successful, or an error+** code (i.e. SQLITE_NOMEM) if an error occurs. ** ** This API can be quite slow if used with an FTS5 table created with the ** "detail=none" or "detail=column" option. @@ -11276,7 +11442,7 @@ ** Save the pointer passed as the second argument as the extension functions ** "auxiliary data". The pointer may then be retrieved by the current or any ** future invocation of the same fts5 extension function made as part of-** of the same MATCH query using the xGetAuxdata() API.+** the same MATCH query using the xGetAuxdata() API. ** ** Each extension function is allocated a single auxiliary data slot for ** each FTS query (MATCH expression). If the extension function is invoked @@ -11291,7 +11457,7 @@ ** The xDelete callback, if one is specified, is also invoked on the ** auxiliary data pointer after the FTS5 query has finished. **-** If an error (e.g. an OOM condition) occurs within this function, an+** If an error (e.g. an OOM condition) occurs within this function, ** the auxiliary data is set to NULL and an error code returned. If the ** xDelete parameter was not NULL, it is invoked on the auxiliary data ** pointer before returning.@@ -11524,11 +11690,11 @@ ** the tokenizer substitutes "first" for "1st" and the query works ** as expected. **-** <li> By adding multiple synonyms for a single term to the FTS index.-** In this case, when tokenizing query text, the tokenizer may -** provide multiple synonyms for a single term within the document.-** FTS5 then queries the index for each synonym individually. For-** example, faced with the query:+** <li> By querying the index for all synonyms of each query term+** separately. In this case, when tokenizing query text, the+** tokenizer may provide multiple synonyms for a single term +** within the document. FTS5 then queries the index for each +** synonym individually. For example, faced with the query: ** ** <codeblock> ** ... MATCH 'first place'</codeblock>@@ -11552,7 +11718,7 @@ ** "place". ** ** This way, even if the tokenizer does not provide synonyms-** when tokenizing query text (it should not - to do would be+** when tokenizing query text (it should not - to do so would be ** inefficient), it doesn't matter if the user queries for ** 'first + place' or '1st + place', as there are entries in the ** FTS index corresponding to both forms of the first token.
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name: persistent-sqlite-version: 2.10.5.2+version: 2.10.6 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>@@ -36,7 +36,7 @@ description: Enable json1 in the vendored SQLite library; has no effect if a system SQLite library is used. default: True flag use-stat3- description: Enable STAT3 in the vendored SQLite library; has no effect if a system SQLite library is used.+ description: This flag is now a no-op, as the corresponding SQLite option is now a no-op; has no effect if a system SQLite library is used. default: False flag use-stat4 description: Enable STAT4 in the vendored SQLite library (supercedes stat3); has no effect if a system SQLite library is used.@@ -83,8 +83,6 @@ cc-options: -DHAVE_USLEEP if flag(json1) cc-options: -DSQLITE_ENABLE_JSON1- if flag(use-stat3)- cc-options: -DSQLITE_ENABLE_STAT3 if flag(use-stat4) cc-options: -DSQLITE_ENABLE_STAT4