diff --git a/Sources/CSQLite/include/sqlite_nio_sqlite3.h b/Sources/CSQLite/include/sqlite_nio_sqlite3.h
index 4077963..e39aa4d 100644
--- a/Sources/CSQLite/include/sqlite_nio_sqlite3.h
+++ b/Sources/CSQLite/include/sqlite_nio_sqlite3.h
@@ -146,9 +146,9 @@ extern "C" {
** [sqlite_nio_sqlite3_libversion_number()], [sqlite_nio_sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.46.0"
-#define SQLITE_VERSION_NUMBER 3046000
-#define SQLITE_SOURCE_ID "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e"
+#define SQLITE_VERSION "3.46.1"
+#define SQLITE_VERSION_NUMBER 3046001
+#define SQLITE_SOURCE_ID "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -887,7 +887,7 @@ struct sqlite3_io_methods {
**
**
[[SQLITE_FCNTL_SIZE_LIMIT]]
** The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that
-** implements [sqlite_nio_sqlite3_deserialize()] to set an upper bound on the size
+** 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
@@ -2137,7 +2137,7 @@ struct sqlite3_mem_methods {
** SQLITE_CONFIG_MEMDB_MAXSIZE
** 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 [sqlite_nio_sqlite3_deserialize()]. This default maximum
+** database created using [sqlite3_deserialize()]. This default maximum
** size can be adjusted up or down for individual databases using the
** [SQLITE_FCNTL_SIZE_LIMIT] [sqlite_nio_sqlite3_file_control|file-control]. If this
** configuration setting is never used, then the default maximum is determined
@@ -2290,10 +2290,10 @@ struct sqlite3_mem_methods {
**
** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]]
** SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
-** ^This option is used to enable or disable the [sqlite_nio_sqlite3_load_extension()]
+** ^This option is used to enable or disable the [sqlite3_load_extension()]
** interface independently of the [load_extension()] SQL function.
-** The [sqlite_nio_sqlite3_enable_load_extension()] API enables or disables both the
-** C-API [sqlite_nio_sqlite3_load_extension()] and the SQL function [load_extension()].
+** The [sqlite3_enable_load_extension()] API enables or disables both the
+** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
** There should be two additional arguments.
** When the first argument to this interface is 1, then only the C-API is
** enabled and the SQL function remains disabled. If the first argument to
@@ -2301,7 +2301,7 @@ struct sqlite3_mem_methods {
** If the first argument is -1, then no changes are made to state of either the
** C-API or the SQL function.
** The second parameter is a pointer to an integer into which
-** is written 0 or 1 to indicate whether [sqlite_nio_sqlite3_load_extension()] interface
+** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
** is disabled or enabled following this call. The second parameter may
** be a NULL pointer, in which case the new setting is not reported back.
**
@@ -2481,7 +2481,7 @@ struct sqlite3_mem_methods {
** SQLITE_DBCONFIG_STMT_SCANSTATUS
** The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in
** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears
-** a flag that enables collection of the sqlite_nio_sqlite3_stmt_scanstatus_v2()
+** a flag that enables collection of the sqlite3_stmt_scanstatus_v2()
** statistics. For statistics to be collected, the flag must be set on
** the database handle both when the SQL statement is prepared and when it
** is stepped. The flag is set (collection of statistics is enabled)
@@ -2782,19 +2782,19 @@ SQLITE_API int sqlite_nio_sqlite3_is_interrupted(sqlite3*);
** will not detect syntactically incorrect SQL.
**
** ^(If SQLite has not been initialized using [sqlite_nio_sqlite3_initialize()] prior
-** to invoking sqlite_nio_sqlite3_complete16() then sqlite_nio_sqlite3_initialize() is invoked
-** automatically by sqlite_nio_sqlite3_complete16(). If that initialization fails,
-** then the return value from sqlite_nio_sqlite3_complete16() will be non-zero
+** to invoking sqlite3_complete16() then sqlite_nio_sqlite3_initialize() is invoked
+** automatically by sqlite3_complete16(). If that initialization fails,
+** then the return value from sqlite3_complete16() will be non-zero
** regardless of whether or not the input SQL is complete.)^
**
-** The input to [sqlite_nio_sqlite3_complete()] must be a zero-terminated
+** The input to [sqlite3_complete()] must be a zero-terminated
** UTF-8 string.
**
-** The input to [sqlite_nio_sqlite3_complete16()] must be a zero-terminated
+** The input to [sqlite3_complete16()] must be a zero-terminated
** UTF-16 string in native byte order.
*/
-SQLITE_API int sqlite_nio_sqlite3_complete(const char *sql);
-SQLITE_API int sqlite_nio_sqlite3_complete16(const void *sql);
+SQLITE_API int sqlite3_complete(const char *sql);
+SQLITE_API int sqlite3_complete16(const void *sql);
/*
** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
@@ -2888,7 +2888,7 @@ SQLITE_API int sqlite_nio_sqlite3_busy_timeout(sqlite3*, int ms);
** Use of this interface is not recommended.
**
** Definition: A result table is memory data structure created by the
-** [sqlite_nio_sqlite3_get_table()] interface. A result table records the
+** [sqlite3_get_table()] interface. A result table records the
** complete query results from one or more queries.
**
** The table conceptually has a number of rows and columns. But
@@ -2933,27 +2933,27 @@ SQLITE_API int sqlite_nio_sqlite3_busy_timeout(sqlite3*, int ms);
** azResult[7] = "21";
** )^
**
-** ^The sqlite_nio_sqlite3_get_table() function evaluates one or more
+** ^The sqlite3_get_table() function evaluates one or more
** semicolon-separated SQL statements in the zero-terminated UTF-8
** string of its 2nd parameter and returns a result table to the
** pointer given in its 3rd parameter.
**
-** After the application has finished with the result from sqlite_nio_sqlite3_get_table(),
+** After the application has finished with the result from sqlite3_get_table(),
** it must pass the result table pointer to sqlite_nio_sqlite3_free_table() in order to
** release the memory that was malloced. Because of the way the
-** [sqlite_nio_sqlite3_malloc()] happens within sqlite_nio_sqlite3_get_table(), the calling
+** [sqlite_nio_sqlite3_malloc()] happens within sqlite3_get_table(), the calling
** function must not try to call [sqlite_nio_sqlite3_free()] directly. Only
** [sqlite_nio_sqlite3_free_table()] is able to release the memory properly and safely.
**
-** The sqlite_nio_sqlite3_get_table() interface is implemented as a wrapper around
-** [sqlite_nio_sqlite3_exec()]. The sqlite_nio_sqlite3_get_table() routine does not have access
+** The sqlite3_get_table() interface is implemented as a wrapper around
+** [sqlite_nio_sqlite3_exec()]. The sqlite3_get_table() routine does not have access
** to any internal data structures of SQLite. It uses only the public
** interface defined here. As a consequence, errors that occur in the
** wrapper layer outside of the internal [sqlite_nio_sqlite3_exec()] call are not
** reflected in subsequent calls to [sqlite_nio_sqlite3_errcode()] or
** [sqlite_nio_sqlite3_errmsg()].
*/
-SQLITE_API int sqlite_nio_sqlite3_get_table(
+SQLITE_API int sqlite3_get_table(
sqlite3 *db, /* An open database */
const char *zSql, /* SQL to be evaluated */
char ***pazResult, /* Results of the query */
@@ -3168,7 +3168,7 @@ SQLITE_API void sqlite_nio_sqlite3_randomness(int N, void *P);
** access is denied.
**
** ^The first parameter to the authorizer callback is a copy of the third
-** parameter to the sqlite_nio_sqlite3_set_authorizer() interface. ^The second parameter
+** parameter to the sqlite3_set_authorizer() interface. ^The second parameter
** to the callback is an integer [SQLITE_COPY | action code] that specifies
** the particular action to be authorized. ^The third through sixth parameters
** to the callback are either NULL pointers or zero-terminated strings
@@ -3208,7 +3208,7 @@ SQLITE_API void sqlite_nio_sqlite3_randomness(int N, void *P);
** in addition to using an authorizer.
**
** ^(Only a single authorizer can be in place on a database connection
-** at a time. Each call to sqlite_nio_sqlite3_set_authorizer overrides the
+** at a time. Each call to sqlite3_set_authorizer overrides the
** previous call.)^ ^Disable the authorizer by installing a NULL callback.
** The authorizer is disabled by default.
**
@@ -3228,7 +3228,7 @@ SQLITE_API void sqlite_nio_sqlite3_randomness(int N, void *P);
** as stated in the previous paragraph, sqlite_nio_sqlite3_step() invokes
** sqlite_nio_sqlite3_prepare_v2() to reprepare a statement after a schema change.
*/
-SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
+SQLITE_API int sqlite3_set_authorizer(
sqlite3*,
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
void *pUserData
@@ -3237,10 +3237,10 @@ SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
/*
** CAPI3REF: Authorizer Return Codes
**
-** The [sqlite_nio_sqlite3_set_authorizer | authorizer callback function] must
+** The [sqlite3_set_authorizer | authorizer callback function] must
** return either [SQLITE_OK] or one of these two constants in order
** to signal SQLite whether or not the action is permitted. See the
-** [sqlite_nio_sqlite3_set_authorizer | authorizer documentation] for additional
+** [sqlite3_set_authorizer | authorizer documentation] for additional
** information.
**
** Note that SQLITE_IGNORE is also used as a [conflict resolution mode]
@@ -3252,7 +3252,7 @@ SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
/*
** CAPI3REF: Authorizer Action Codes
**
-** The [sqlite_nio_sqlite3_set_authorizer()] interface registers a callback function
+** The [sqlite3_set_authorizer()] interface registers a callback function
** that is invoked to authorize certain SQL statement actions. The
** second parameter to the callback is an integer code that specifies
** what action is being authorized. These are the integer action codes that
@@ -3308,24 +3308,24 @@ SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
** CAPI3REF: Deprecated Tracing And Profiling Functions
** DEPRECATED
**
-** These routines are deprecated. Use the [sqlite_nio_sqlite3_trace_v2()] interface
+** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
** instead of the routines described here.
**
** These routines register callback functions that can be used for
** tracing and profiling the execution of SQL statements.
**
-** ^The callback function registered by sqlite_nio_sqlite3_trace() is invoked at
+** ^The callback function registered by sqlite3_trace() is invoked at
** various times when an SQL statement is being run by [sqlite_nio_sqlite3_step()].
-** ^The sqlite_nio_sqlite3_trace() callback is invoked with a UTF-8 rendering of the
+** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the
** SQL statement text as the statement first begins executing.
-** ^(Additional sqlite_nio_sqlite3_trace() callbacks might occur
+** ^(Additional sqlite3_trace() callbacks might occur
** as each triggered subprogram is entered. The callbacks for triggers
** contain a UTF-8 SQL comment that identifies the trigger.)^
**
** The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit
-** the length of [bound parameter] expansion in the output of sqlite_nio_sqlite3_trace().
+** the length of [bound parameter] expansion in the output of sqlite3_trace().
**
-** ^The callback function registered by sqlite_nio_sqlite3_profile() is invoked
+** ^The callback function registered by sqlite3_profile() is invoked
** as each SQL statement finishes. ^The profile callback contains
** the original statement text and an estimate of wall-clock time
** of how long that statement took to run. ^The profile callback
@@ -3333,12 +3333,12 @@ SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
** 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. Invoking
-** either [sqlite_nio_sqlite3_trace()] or [sqlite_nio_sqlite3_trace_v2()] will cancel the
+** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the
** profile callback.
*/
-SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_trace(sqlite3*,
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
void(*xTrace)(void*,const char*), void*);
-SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
/*
@@ -3346,8 +3346,8 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** KEYWORDS: SQLITE_TRACE
**
** These constants identify classes of events that can be monitored
-** using the [sqlite_nio_sqlite3_trace_v2()] tracing logic. The M argument
-** to [sqlite_nio_sqlite3_trace_v2(D,M,X,P)] is an OR-ed combination of one or more of
+** using the [sqlite3_trace_v2()] tracing logic. The M argument
+** to [sqlite3_trace_v2(D,M,X,P)] is an OR-ed combination of one or more of
** the following constants. ^The first argument to the trace callback
** is one of the following constants.
**
@@ -3356,7 +3356,7 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** ^A trace callback has four arguments: xCallback(T,C,P,X).
** ^The T argument is one of the integer type codes above.
** ^The C argument is a copy of the context pointer passed in as the
-** fourth argument to [sqlite_nio_sqlite3_trace_v2()].
+** fourth argument to [sqlite3_trace_v2()].
** The P and X arguments are pointers whose meanings depend on T.
**
**
@@ -3368,13 +3368,13 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** [prepared statement]. ^The X argument is a pointer to a string which
** is the unexpanded SQL text of the prepared statement or an SQL comment
** that indicates the invocation of a trigger. ^The callback can compute
-** the same text that would have been returned by the legacy [sqlite_nio_sqlite3_trace()]
+** the same text that would have been returned by the legacy [sqlite3_trace()]
** interface by using the X argument when X begins with "--" and invoking
** [sqlite_nio_sqlite3_expanded_sql(P)] otherwise.
**
** [[SQLITE_TRACE_PROFILE]] - SQLITE_TRACE_PROFILE
** - ^An SQLITE_TRACE_PROFILE callback provides approximately the same
-** information as is provided by the [sqlite_nio_sqlite3_profile()] callback.
+** information as is provided by the [sqlite3_profile()] callback.
** ^The P argument is a pointer to the [prepared statement] and the
** X argument points to a 64-bit integer which is approximately
** the number of nanoseconds that the prepared statement took to run.
@@ -3402,16 +3402,16 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** CAPI3REF: SQL Trace Hook
** METHOD: sqlite3
**
-** ^The sqlite_nio_sqlite3_trace_v2(D,M,X,P) interface registers a trace callback
+** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback
** function X against [database connection] D, using property mask M
** and context pointer P. ^If the X callback is
** NULL or if the M mask is zero, then tracing is disabled. The
** M argument should be the bitwise OR-ed combination of
** zero or more [SQLITE_TRACE] constants.
**
-** ^Each call to either sqlite_nio_sqlite3_trace(D,X,P) or sqlite_nio_sqlite3_trace_v2(D,M,X,P)
-** overrides (cancels) all prior calls to sqlite_nio_sqlite3_trace(D,X,P) or
-** sqlite_nio_sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
+** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)
+** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or
+** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
** database connection may have at most one trace callback.
**
** ^The X callback is invoked whenever any of the events identified by
@@ -3425,11 +3425,11 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** ^The C argument is a copy of the context pointer.
** The P and X arguments are pointers whose meanings depend on T.
**
-** The sqlite_nio_sqlite3_trace_v2() interface is intended to replace the legacy
-** interfaces [sqlite_nio_sqlite3_trace()] and [sqlite_nio_sqlite3_profile()], both of which
+** The sqlite3_trace_v2() interface is intended to replace the legacy
+** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
** are deprecated.
*/
-SQLITE_API int sqlite_nio_sqlite3_trace_v2(
+SQLITE_API int sqlite3_trace_v2(
sqlite3*,
unsigned uMask,
int(*xCallback)(unsigned,void*,void*,void*),
@@ -3440,7 +3440,7 @@ SQLITE_API int sqlite_nio_sqlite3_trace_v2(
** CAPI3REF: Query Progress Callbacks
** METHOD: sqlite3
**
-** ^The sqlite_nio_sqlite3_progress_handler(D,N,X,P) interface causes the callback
+** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback
** function X to be invoked periodically during long running calls to
** [sqlite_nio_sqlite3_step()] and [sqlite_nio_sqlite3_prepare()] and similar for
** database connection D. An example use for this
@@ -3475,7 +3475,7 @@ SQLITE_API int sqlite_nio_sqlite3_trace_v2(
** invoked directly from [sqlite_nio_sqlite3_prepare()] while analyzing and generating
** code for complex queries.
*/
-SQLITE_API void sqlite_nio_sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
/*
** CAPI3REF: Opening A New Database Connection
@@ -3558,7 +3558,7 @@ SQLITE_API void sqlite_nio_sqlite3_progress_handler(sqlite3*, int, int(*)(void*)
** ^(
- [SQLITE_OPEN_SHAREDCACHE]
** - The database is opened [shared cache] enabled, overriding
** the default shared cache setting provided by
-** [sqlite_nio_sqlite3_enable_shared_cache()].)^
+** [sqlite3_enable_shared_cache()].)^
** The [use of shared cache mode is discouraged] and hence shared cache
** capabilities may be omitted from many builds of SQLite. In such cases,
** this option is a no-op.
@@ -3566,7 +3566,7 @@ SQLITE_API void sqlite_nio_sqlite3_progress_handler(sqlite3*, int, int(*)(void*)
** ^(
- [SQLITE_OPEN_PRIVATECACHE]
** - The database is opened [shared cache] disabled, overriding
** the default shared cache setting provided by
-** [sqlite_nio_sqlite3_enable_shared_cache()].)^
+** [sqlite3_enable_shared_cache()].)^
**
** [[OPEN_EXRESCODE]] ^(
- [SQLITE_OPEN_EXRESCODE]
** - The database connection comes up in "extended result code mode".
@@ -4074,7 +4074,7 @@ typedef struct sqlite3_stmt sqlite3_stmt;
** off the Internet. The internal databases can be given the
** large, default limits. Databases managed by external sources can
** be given much smaller limits designed to prevent a denial of service
-** attack. Developers might also want to use the [sqlite_nio_sqlite3_set_authorizer()]
+** attack. Developers might also want to use the [sqlite3_set_authorizer()]
** interface to further control untrusted SQL. The size of the database
** created by an untrusted script can be contained using the
** [max_page_count] [PRAGMA].
@@ -5635,12 +5635,12 @@ SQLITE_API int sqlite_nio_sqlite3_create_window_function(
** these functions, we will not explain what they do.
*/
#ifndef SQLITE_OMIT_DEPRECATED
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_aggregate_count(sqlite3_context*);
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_expired(sqlite3_stmt*);
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_global_recover(void);
-SQLITE_API SQLITE_DEPRECATED void sqlite_nio_sqlite3_thread_cleanup(void);
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
void*,sqlite3_int64);
#endif
@@ -6538,33 +6538,33 @@ SQLITE_API SQLITE_EXTERN char *sqlite_nio_sqlite3_data_directory;
** CAPI3REF: Win32 Specific Interface
**
** These interfaces are available only on Windows. The
-** [sqlite_nio_sqlite3_win32_set_directory] interface is used to set the value associated
+** [sqlite3_win32_set_directory] interface is used to set the value associated
** with the [sqlite_nio_sqlite3_temp_directory] or [sqlite_nio_sqlite3_data_directory] variable, to
** zValue, depending on the value of the type parameter. The zValue parameter
** should be NULL to cause the previous value to be freed via [sqlite_nio_sqlite3_free];
** a non-NULL value will be copied into memory obtained from [sqlite_nio_sqlite3_malloc]
-** prior to being used. The [sqlite_nio_sqlite3_win32_set_directory] interface returns
+** prior to being used. The [sqlite3_win32_set_directory] interface returns
** [SQLITE_OK] to indicate success, [SQLITE_ERROR] if the type is unsupported,
** or [SQLITE_NOMEM] if memory could not be allocated. The value of the
** [sqlite_nio_sqlite3_data_directory] variable is intended to act as a replacement for
** the current directory on the sub-platforms of Win32 where that concept is
-** not present, e.g. WinRT and UWP. The [sqlite_nio_sqlite3_win32_set_directory8] and
-** [sqlite_nio_sqlite3_win32_set_directory16] interfaces behave exactly the same as the
-** sqlite_nio_sqlite3_win32_set_directory interface except the string parameter must be
+** not present, e.g. WinRT and UWP. The [sqlite3_win32_set_directory8] and
+** [sqlite3_win32_set_directory16] interfaces behave exactly the same as the
+** sqlite3_win32_set_directory interface except the string parameter must be
** UTF-8 or UTF-16, respectively.
*/
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory(
+SQLITE_API int sqlite3_win32_set_directory(
unsigned long type, /* Identifier for directory being set or reset */
void *zValue /* New value for directory being set or reset */
);
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory8(unsigned long type, const char *zValue);
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory16(unsigned long type, const void *zValue);
+SQLITE_API int sqlite3_win32_set_directory8(unsigned long type, const char *zValue);
+SQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zValue);
/*
** CAPI3REF: Win32 Directory Types
**
** These macros are only available on Windows. They define the allowed values
-** for the type argument to the [sqlite_nio_sqlite3_win32_set_directory] interface.
+** for the type argument to the [sqlite3_win32_set_directory] interface.
*/
#define SQLITE_WIN32_DATA_DIRECTORY_TYPE 1
#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE 2
@@ -6619,7 +6619,7 @@ SQLITE_API sqlite3 *sqlite_nio_sqlite3_db_handle(sqlite3_stmt*);
** Space to hold the string that is returned by sqlite_nio_sqlite3_db_name() is managed
** by SQLite itself. The string might be deallocated by any operation that
** changes the schema, including [ATTACH] or [DETACH] or calls to
-** [sqlite_nio_sqlite3_serialize()] or [sqlite_nio_sqlite3_deserialize()], even operations that
+** [sqlite3_serialize()] or [sqlite3_deserialize()], even operations that
** occur on a different thread. Applications that need to
** remember the string long-term should make their own copy. Applications that
** are accessing the same database connection simultaneously on multiple
@@ -6958,7 +6958,7 @@ SQLITE_API void *sqlite_nio_sqlite3_update_hook(
**
** See Also: [SQLite Shared-Cache Mode]
*/
-SQLITE_API int sqlite_nio_sqlite3_enable_shared_cache(int);
+SQLITE_API int sqlite3_enable_shared_cache(int);
/*
** CAPI3REF: Attempt To Free Heap Memory
@@ -7156,7 +7156,7 @@ SQLITE_API int sqlite_nio_sqlite3_table_column_metadata(
**
** ^This interface loads an SQLite extension library from the named file.
**
-** ^The sqlite_nio_sqlite3_load_extension() interface attempts to load an
+** ^The sqlite3_load_extension() interface attempts to load an
** [SQLite extension] library contained in the file zFile. If
** the file cannot be loaded directly, attempts are made to load
** with various operating-system specific extensions added.
@@ -7171,30 +7171,30 @@ SQLITE_API int sqlite_nio_sqlite3_table_column_metadata(
** X is consists of the lower-case equivalent of all ASCII alphabetic
** characters in the filename from the last "/" to the first following
** "." and omitting any initial "lib".)^
-** ^The sqlite_nio_sqlite3_load_extension() interface returns
+** ^The sqlite3_load_extension() interface returns
** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
** ^If an error occurs and pzErrMsg is not 0, then the
-** [sqlite_nio_sqlite3_load_extension()] interface shall attempt to
+** [sqlite3_load_extension()] interface shall attempt to
** fill *pzErrMsg with error message text stored in memory
** obtained from [sqlite_nio_sqlite3_malloc()]. The calling function
** should free this memory by calling [sqlite_nio_sqlite3_free()].
**
** ^Extension loading must be enabled using
-** [sqlite_nio_sqlite3_enable_load_extension()] or
+** [sqlite3_enable_load_extension()] or
** [sqlite_nio_sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL)
** prior to calling this API,
** otherwise an error will be returned.
**
** Security warning: It is recommended that the
** [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this
-** interface. The use of the [sqlite_nio_sqlite3_enable_load_extension()] interface
+** interface. The use of the [sqlite3_enable_load_extension()] interface
** should be avoided. This will keep the SQL function [load_extension()]
** disabled and prevent SQL injections from giving attackers
** access to extension loading capabilities.
**
** See also the [load_extension() SQL function].
*/
-SQLITE_API int sqlite_nio_sqlite3_load_extension(
+SQLITE_API int sqlite3_load_extension(
sqlite3 *db, /* Load the extension into this database connection */
const char *zFile, /* Name of the shared library containing extension */
const char *zProc, /* Entry point. Derived from zFile if 0 */
@@ -7208,15 +7208,15 @@ SQLITE_API int sqlite_nio_sqlite3_load_extension(
** ^So as not to open security holes in older applications that are
** unprepared to deal with [extension loading], and as a means of disabling
** [extension loading] while evaluating user-entered SQL, the following API
-** is provided to turn the [sqlite_nio_sqlite3_load_extension()] mechanism on and off.
+** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
**
** ^Extension loading is off by default.
-** ^Call the sqlite_nio_sqlite3_enable_load_extension() routine with onoff==1
+** ^Call the sqlite3_enable_load_extension() routine with onoff==1
** to turn extension loading on and call it with onoff==0 to turn
** it back off again.
**
** ^This interface enables or disables both the C-API
-** [sqlite_nio_sqlite3_load_extension()] and the SQL function [load_extension()].
+** [sqlite3_load_extension()] and the SQL function [load_extension()].
** ^(Use [sqlite_nio_sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)
** to enable or disable only the C-API.)^
**
@@ -7226,7 +7226,7 @@ SQLITE_API int sqlite_nio_sqlite3_load_extension(
** remains disabled. This will prevent SQL injections from giving attackers
** access to extension loading capabilities.
*/
-SQLITE_API int sqlite_nio_sqlite3_enable_load_extension(sqlite3 *db, int onoff);
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
/*
** CAPI3REF: Automatically Load Statically Linked Extensions
@@ -8079,7 +8079,7 @@ SQLITE_API int sqlite_nio_sqlite3_vfs_unregister(sqlite3_vfs*);
** sqlite_nio_sqlite3_mutex_leave(), or sqlite_nio_sqlite3_mutex_free() is a NULL pointer,
** then any of the four routines behaves as a no-op.
**
-** See also: [sqlite_nio_sqlite3_mutex_held()] and [sqlite_nio_sqlite3_mutex_notheld()].
+** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
*/
SQLITE_API sqlite3_mutex *sqlite_nio_sqlite3_mutex_alloc(int);
SQLITE_API void sqlite_nio_sqlite3_mutex_free(sqlite3_mutex*);
@@ -8125,8 +8125,8 @@ SQLITE_API void sqlite_nio_sqlite3_mutex_leave(sqlite3_mutex*);
**
- [sqlite_nio_sqlite3_mutex_enter()]
** - [sqlite_nio_sqlite3_mutex_try()]
** - [sqlite_nio_sqlite3_mutex_leave()]
-** - [sqlite_nio_sqlite3_mutex_held()]
-** - [sqlite_nio_sqlite3_mutex_notheld()]
+** - [sqlite3_mutex_held()]
+** - [sqlite3_mutex_notheld()]
** )^
**
** The only difference is that the public sqlite3_XXX functions enumerated
@@ -8168,7 +8168,7 @@ struct sqlite3_mutex_methods {
/*
** CAPI3REF: Mutex Verification Routines
**
-** The sqlite_nio_sqlite3_mutex_held() and sqlite_nio_sqlite3_mutex_notheld() routines
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
** are intended for use inside assert() statements. The SQLite core
** never uses these routines except inside an assert() and applications
** are advised to follow the lead of the core. The SQLite core only
@@ -8185,18 +8185,18 @@ struct sqlite3_mutex_methods {
** versions of these routines, it should at least provide stubs that always
** return true so that one does not get spurious assertion failures.
**
-** If the argument to sqlite_nio_sqlite3_mutex_held() is a NULL pointer then
+** If the argument to sqlite3_mutex_held() is a NULL pointer then
** the routine should return 1. This seems counter-intuitive since
** clearly the mutex cannot be held if it does not exist. But
** the reason the mutex does not exist is because the build is not
** using mutexes. And we do not want the assert() containing the
-** call to sqlite_nio_sqlite3_mutex_held() to fail, so a non-zero return is
-** the appropriate thing to do. The sqlite_nio_sqlite3_mutex_notheld()
+** call to sqlite3_mutex_held() to fail, so a non-zero return is
+** the appropriate thing to do. The sqlite3_mutex_notheld()
** interface should also return 1 when given a NULL pointer.
*/
#ifndef NDEBUG
-SQLITE_API int sqlite_nio_sqlite3_mutex_held(sqlite3_mutex*);
-SQLITE_API int sqlite_nio_sqlite3_mutex_notheld(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
#endif
/*
@@ -10176,7 +10176,7 @@ SQLITE_API int sqlite_nio_sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlit
** is for the SQL statement being evaluated.
**
** Note that the [SQLITE_IGNORE] constant is also used as a potential
-** return value from the [sqlite_nio_sqlite3_set_authorizer()] callback and that
+** return value from the [sqlite3_set_authorizer()] callback and that
** [SQLITE_ABORT] is also a [result code].
*/
#define SQLITE_ROLLBACK 1
@@ -10190,8 +10190,8 @@ SQLITE_API int sqlite_nio_sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlit
** KEYWORDS: {scanstatus options}
**
** The following constants can be used for the T parameter to the
-** [sqlite_nio_sqlite3_stmt_scanstatus(S,X,T,V)] interface. Each constant designates a
-** different metric for sqlite_nio_sqlite3_stmt_scanstatus() to return.
+** [sqlite3_stmt_scanstatus(S,X,T,V)] interface. Each constant designates a
+** different metric for sqlite3_stmt_scanstatus() to return.
**
** When the value returned to V is a string, space to hold that string is
** managed by the prepared statement S and will be automatically freed when
@@ -10282,8 +10282,8 @@ SQLITE_API int sqlite_nio_sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlit
** SQLITE_SCANSTAT_COMPLEX is not specified, then only query plan elements
** that correspond to query loops (the "SCAN..." and "SEARCH..." elements of
** the EXPLAIN QUERY PLAN output) are available. Invoking API
-** sqlite_nio_sqlite3_stmt_scanstatus() is equivalent to calling
-** sqlite_nio_sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
+** sqlite3_stmt_scanstatus() is equivalent to calling
+** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
**
** Parameter "idx" identifies the specific query element to retrieve statistics
** for. Query elements are numbered starting from zero. A value of -1 may be
@@ -10292,15 +10292,15 @@ SQLITE_API int sqlite_nio_sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlit
** elements used to implement the statement - a non-zero value is returned and
** the variable that pOut points to is unchanged.
**
-** See also: [sqlite_nio_sqlite3_stmt_scanstatus_reset()]
+** See also: [sqlite3_stmt_scanstatus_reset()]
*/
-SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus(
+SQLITE_API int sqlite3_stmt_scanstatus(
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
int idx, /* Index of loop to report on */
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
void *pOut /* Result written here */
);
-SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus_v2(
+SQLITE_API int sqlite3_stmt_scanstatus_v2(
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
int idx, /* Index of loop to report on */
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
@@ -10318,12 +10318,12 @@ SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus_v2(
** CAPI3REF: Zero Scan-Status Counters
** METHOD: sqlite3_stmt
**
-** ^Zero all [sqlite_nio_sqlite3_stmt_scanstatus()] related event counters.
+** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
**
** This API is only available if the library is built with pre-processor
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
*/
-SQLITE_API void sqlite_nio_sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
/*
** CAPI3REF: Flush caches to disk mid-transaction
@@ -10516,16 +10516,16 @@ typedef struct sqlite3_snapshot {
** CAPI3REF: Record A Database Snapshot
** CONSTRUCTOR: sqlite3_snapshot
**
-** ^The [sqlite_nio_sqlite3_snapshot_get(D,S,P)] interface attempts to make a
+** ^The [sqlite3_snapshot_get(D,S,P)] interface attempts to make a
** new [sqlite3_snapshot] object that records the current state of
** schema S in database connection D. ^On success, the
-** [sqlite_nio_sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly
+** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly
** created [sqlite3_snapshot] object into *P and returns SQLITE_OK.
** If there is not already a read-transaction open on schema S when
** this function is called, one is opened automatically.
**
** The following must be true for this function to succeed. If any of
-** the following statements are false when sqlite_nio_sqlite3_snapshot_get() is
+** the following statements are false when sqlite3_snapshot_get() is
** called, SQLITE_ERROR is returned. The final value of *P is undefined
** in this case.
**
@@ -10549,13 +10549,13 @@ typedef struct sqlite3_snapshot {
** whether or not a read transaction is opened on schema S is undefined.
**
** The [sqlite3_snapshot] object returned from a successful call to
-** [sqlite_nio_sqlite3_snapshot_get()] must be freed using [sqlite_nio_sqlite3_snapshot_free()]
+** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()]
** to avoid a memory leak.
**
-** The [sqlite_nio_sqlite3_snapshot_get()] interface is only available when the
+** The [sqlite3_snapshot_get()] interface is only available when the
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_get(
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
sqlite3 *db,
const char *zSchema,
sqlite3_snapshot **ppSnapshot
@@ -10565,22 +10565,22 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_get(
** CAPI3REF: Start a read transaction on an historical snapshot
** METHOD: sqlite3_snapshot
**
-** ^The [sqlite_nio_sqlite3_snapshot_open(D,S,P)] interface either starts a new read
+** ^The [sqlite3_snapshot_open(D,S,P)] interface either starts a new read
** transaction or upgrades an existing one for schema S of
** [database connection] D such that the read transaction refers to
** historical [snapshot] P, rather than the most recent change to the
-** database. ^The [sqlite_nio_sqlite3_snapshot_open()] interface returns SQLITE_OK
+** database. ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK
** on success or an appropriate [error code] if it fails.
**
** ^In order to succeed, the database connection must not be in
-** [autocommit mode] when [sqlite_nio_sqlite3_snapshot_open(D,S,P)] is called. If there
+** [autocommit mode] when [sqlite3_snapshot_open(D,S,P)] is called. If there
** is already a read transaction open on schema S, then the database handle
** must have no active statements (SELECT statements that have been passed
** to sqlite_nio_sqlite3_step() but not sqlite_nio_sqlite3_reset() or sqlite_nio_sqlite3_finalize()).
** SQLITE_ERROR is returned if either of these conditions is violated, or
** if schema S does not exist, or if the snapshot object is invalid.
**
-** ^A call to sqlite_nio_sqlite3_snapshot_open() will fail to open if the specified
+** ^A call to sqlite3_snapshot_open() will fail to open if the specified
** snapshot has been overwritten by a [checkpoint]. In this case
** SQLITE_ERROR_SNAPSHOT is returned.
**
@@ -10592,7 +10592,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_get(
** read transaction is undefined. If SQLITE_OK is returned, then the
** read transaction is now open on database snapshot P.
**
-** ^(A call to [sqlite_nio_sqlite3_snapshot_open(D,S,P)] will fail if the
+** ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the
** database connection D does not know that the database file for
** schema S is in [WAL mode]. A database connection might not know
** that the database file is in [WAL mode] if there has been no prior
@@ -10601,10 +10601,10 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_get(
** (Hint: Run "[PRAGMA application_id]" against a newly opened
** database connection in order to make it ready to use snapshots.)
**
-** The [sqlite_nio_sqlite3_snapshot_open()] interface is only available when the
+** The [sqlite3_snapshot_open()] interface is only available when the
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_open(
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
sqlite3 *db,
const char *zSchema,
sqlite3_snapshot *pSnapshot
@@ -10614,27 +10614,27 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_open(
** CAPI3REF: Destroy a snapshot
** DESTRUCTOR: sqlite3_snapshot
**
-** ^The [sqlite_nio_sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P.
+** ^The [sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P.
** The application must eventually free every [sqlite3_snapshot] object
** using this routine to avoid a memory leak.
**
-** The [sqlite_nio_sqlite3_snapshot_free()] interface is only available when the
+** The [sqlite3_snapshot_free()] interface is only available when the
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL void sqlite_nio_sqlite3_snapshot_free(sqlite3_snapshot*);
+SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
/*
** CAPI3REF: Compare the ages of two snapshot handles.
** METHOD: sqlite3_snapshot
**
-** The sqlite_nio_sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages
+** The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages
** of two valid snapshot handles.
**
** If the two snapshot handles are not associated with the same database
** file, the result of the comparison is undefined.
**
** Additionally, the result of the comparison is only valid if both of the
-** snapshot handles were obtained by calling sqlite_nio_sqlite3_snapshot_get() since the
+** snapshot handles were obtained by calling sqlite3_snapshot_get() since the
** last time the wal file was deleted. The wal file is deleted when the
** database is changed back to rollback mode or when the number of database
** clients drops to zero. If either snapshot handle was obtained before the
@@ -10648,7 +10648,7 @@ SQLITE_API SQLITE_EXPERIMENTAL void sqlite_nio_sqlite3_snapshot_free(sqlite3_sna
** This interface is only available if SQLite is compiled with the
** [SQLITE_ENABLE_SNAPSHOT] option.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_cmp(
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
sqlite3_snapshot *p1,
sqlite3_snapshot *p2
);
@@ -10661,13 +10661,13 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_cmp(
** (either through the use of the [SQLITE_FCNTL_PERSIST_WAL] [file control]
** or because the last process to have the database opened exited without
** calling [sqlite_nio_sqlite3_close()]) and a new connection is subsequently opened
-** on that database and [WAL file], the [sqlite_nio_sqlite3_snapshot_open()] interface
+** on that database and [WAL file], the [sqlite3_snapshot_open()] interface
** will only be able to open the last transaction added to the WAL file
** even though the WAL file contains other valid transactions.
**
** This function attempts to scan the WAL file associated with database zDb
** of database handle db and make all valid snapshots available to
-** sqlite_nio_sqlite3_snapshot_open(). It is an error if there is already a read
+** sqlite3_snapshot_open(). It is an error if there is already a read
** transaction open on the database, or if the database is not a WAL mode
** database.
**
@@ -10676,12 +10676,12 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_cmp(
** This interface is only available if SQLite is compiled with the
** [SQLITE_ENABLE_SNAPSHOT] option.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);
/*
** CAPI3REF: Serialize a database
**
-** The sqlite_nio_sqlite3_serialize(D,S,P,F) interface returns a pointer to memory
+** The sqlite3_serialize(D,S,P,F) interface returns a pointer to memory
** that is a serialization of the S database on [database connection] D.
** If P is not a NULL pointer, then the size of the database in bytes
** is written into *P.
@@ -10691,17 +10691,17 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_recover(sqlite3 *
** the serialization is the same sequence of bytes which would be written
** to disk if that database where backed up to disk.
**
-** The usual case is that sqlite_nio_sqlite3_serialize() copies the serialization of
+** The usual case is that sqlite3_serialize() copies the serialization of
** the database into memory obtained from [sqlite_nio_sqlite3_malloc64()] and returns
** a pointer to that memory. The caller is responsible for freeing the
** returned value to avoid a memory leak. However, if the F argument
** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
-** are made, and the sqlite_nio_sqlite3_serialize() function will return a pointer
+** are made, and the sqlite3_serialize() function will return a pointer
** to the contiguous memory representation of the database that SQLite
** is currently using for that database, or NULL if the no such contiguous
** memory representation of the database exists. A contiguous memory
** representation of the database will usually only exist if there has
-** been a prior call to [sqlite_nio_sqlite3_deserialize(D,S,...)] with the same
+** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
** values of D and S.
** The size of the database is written into *P even if the
** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
@@ -10714,14 +10714,14 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_recover(sqlite3 *
** buffer. If the bit had been clear, the returned buffer will not
** be accessed by SQLite after the call.
**
-** A call to sqlite_nio_sqlite3_serialize(D,S,P,F) might return NULL even if the
+** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
** allocation error occurs.
**
** This interface is omitted if SQLite is compiled with the
** [SQLITE_OMIT_DESERIALIZE] option.
*/
-SQLITE_API unsigned char *sqlite_nio_sqlite3_serialize(
+SQLITE_API unsigned char *sqlite3_serialize(
sqlite3 *db, /* The database connection */
const char *zSchema, /* Which DB to serialize. ex: "main", "temp", ... */
sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */
@@ -10729,25 +10729,25 @@ SQLITE_API unsigned char *sqlite_nio_sqlite3_serialize(
);
/*
-** CAPI3REF: Flags for sqlite_nio_sqlite3_serialize
+** CAPI3REF: Flags for sqlite3_serialize
**
** Zero or more of the following constants can be OR-ed together for
-** the F argument to [sqlite_nio_sqlite3_serialize(D,S,P,F)].
+** the F argument to [sqlite3_serialize(D,S,P,F)].
**
-** SQLITE_SERIALIZE_NOCOPY means that [sqlite_nio_sqlite3_serialize()] will return
+** SQLITE_SERIALIZE_NOCOPY means that [sqlite3_serialize()] will return
** a pointer to contiguous in-memory database that it is currently using,
** without making a copy of the database. If SQLite is not currently using
** a contiguous in-memory database, then this option causes
-** [sqlite_nio_sqlite3_serialize()] to return a NULL pointer. SQLite will only be
+** [sqlite3_serialize()] to return a NULL pointer. SQLite will only be
** using a contiguous in-memory database if it has been initialized by a
-** prior call to [sqlite_nio_sqlite3_deserialize()].
+** prior call to [sqlite3_deserialize()].
*/
#define SQLITE_SERIALIZE_NOCOPY 0x001 /* Do no memory allocations */
/*
** CAPI3REF: Deserialize a database
**
-** The sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F) interface causes the
+** The sqlite3_deserialize(D,S,P,N,M,F) interface causes the
** [database connection] D to disconnect from database S and then
** reopen S as an in-memory database based on the serialization contained
** in P. The serialized database P is N bytes in size. M is the size of
@@ -10765,29 +10765,29 @@ SQLITE_API unsigned char *sqlite_nio_sqlite3_serialize(
** Applications must not modify the buffer P or invalidate it before
** the database connection D is closed.
**
-** The sqlite_nio_sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
+** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
** database is currently in a read transaction or is involved in a backup
** operation.
**
** It is not possible to deserialized into the TEMP database. If the
-** S argument to sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
+** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
** function returns SQLITE_ERROR.
**
** The deserialized database should not be in [WAL mode]. If the database
** is in WAL mode, then any attempt to use the database file will result
** in an [SQLITE_CANTOPEN] error. The application can set the
** [file format version numbers] (bytes 18 and 19) of the input database P
-** to 0x01 prior to invoking sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F) to force the
+** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the
** database file into rollback mode and work around this limitation.
**
-** If sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
+** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
** [sqlite_nio_sqlite3_free()] is invoked on argument P prior to returning.
**
** This interface is omitted if SQLite is compiled with the
** [SQLITE_OMIT_DESERIALIZE] option.
*/
-SQLITE_API int sqlite_nio_sqlite3_deserialize(
+SQLITE_API int sqlite3_deserialize(
sqlite3 *db, /* The database connection */
const char *zSchema, /* Which DB to reopen with the deserialization */
unsigned char *pData, /* The serialized database content */
@@ -10797,10 +10797,10 @@ SQLITE_API int sqlite_nio_sqlite3_deserialize(
);
/*
-** CAPI3REF: Flags for sqlite_nio_sqlite3_deserialize()
+** CAPI3REF: Flags for sqlite3_deserialize()
**
** The following are allowed values for 6th argument (the F argument) to
-** the [sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F)] interface.
+** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
**
** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
** in the P argument is held in memory obtained from [sqlite_nio_sqlite3_malloc64()]
diff --git a/Sources/CSQLite/sqlite_nio_sqlite3.c b/Sources/CSQLite/sqlite_nio_sqlite3.c
index b896580..e1ebb95 100644
--- a/Sources/CSQLite/sqlite_nio_sqlite3.c
+++ b/Sources/CSQLite/sqlite_nio_sqlite3.c
@@ -2,7 +2,7 @@
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
-** version 3.46.0. By combining all the individual C code files into this
+** version 3.46.1. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements
@@ -20,7 +20,7 @@
** separate file. This file contains only code for the core SQLite library.
**
** The content in this amalgamation comes from Fossil check-in
-** 96c92aba00c8375bc32fafcdf12429c58bd8.
+** c9c2ab54ba1f5f46360f1b4f35d849cd3f08.
*/
#define SQLITE_CORE 1
#define SQLITE_AMALGAMATION 1
@@ -461,9 +461,9 @@ extern "C" {
** [sqlite_nio_sqlite3_libversion_number()], [sqlite_nio_sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.46.0"
-#define SQLITE_VERSION_NUMBER 3046000
-#define SQLITE_SOURCE_ID "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e"
+#define SQLITE_VERSION "3.46.1"
+#define SQLITE_VERSION_NUMBER 3046001
+#define SQLITE_SOURCE_ID "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -1202,7 +1202,7 @@ struct sqlite3_io_methods {
**
** - [[SQLITE_FCNTL_SIZE_LIMIT]]
** The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that
-** implements [sqlite_nio_sqlite3_deserialize()] to set an upper bound on the size
+** 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
@@ -2452,7 +2452,7 @@ struct sqlite3_mem_methods {
**
- SQLITE_CONFIG_MEMDB_MAXSIZE
**
- 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 [sqlite_nio_sqlite3_deserialize()]. This default maximum
+** database created using [sqlite3_deserialize()]. This default maximum
** size can be adjusted up or down for individual databases using the
** [SQLITE_FCNTL_SIZE_LIMIT] [sqlite_nio_sqlite3_file_control|file-control]. If this
** configuration setting is never used, then the default maximum is determined
@@ -2605,10 +2605,10 @@ struct sqlite3_mem_methods {
**
** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]]
**
- SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
-** - ^This option is used to enable or disable the [sqlite_nio_sqlite3_load_extension()]
+**
- ^This option is used to enable or disable the [sqlite3_load_extension()]
** interface independently of the [load_extension()] SQL function.
-** The [sqlite_nio_sqlite3_enable_load_extension()] API enables or disables both the
-** C-API [sqlite_nio_sqlite3_load_extension()] and the SQL function [load_extension()].
+** The [sqlite3_enable_load_extension()] API enables or disables both the
+** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
** There should be two additional arguments.
** When the first argument to this interface is 1, then only the C-API is
** enabled and the SQL function remains disabled. If the first argument to
@@ -2616,7 +2616,7 @@ struct sqlite3_mem_methods {
** If the first argument is -1, then no changes are made to state of either the
** C-API or the SQL function.
** The second parameter is a pointer to an integer into which
-** is written 0 or 1 to indicate whether [sqlite_nio_sqlite3_load_extension()] interface
+** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
** is disabled or enabled following this call. The second parameter may
** be a NULL pointer, in which case the new setting is not reported back.
**
@@ -2796,7 +2796,7 @@ struct sqlite3_mem_methods {
** - SQLITE_DBCONFIG_STMT_SCANSTATUS
** - The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in
** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears
-** a flag that enables collection of the sqlite_nio_sqlite3_stmt_scanstatus_v2()
+** a flag that enables collection of the sqlite3_stmt_scanstatus_v2()
** statistics. For statistics to be collected, the flag must be set on
** the database handle both when the SQL statement is prepared and when it
** is stepped. The flag is set (collection of statistics is enabled)
@@ -3097,19 +3097,19 @@ SQLITE_API int sqlite_nio_sqlite3_is_interrupted(sqlite3*);
** will not detect syntactically incorrect SQL.
**
** ^(If SQLite has not been initialized using [sqlite_nio_sqlite3_initialize()] prior
-** to invoking sqlite_nio_sqlite3_complete16() then sqlite_nio_sqlite3_initialize() is invoked
-** automatically by sqlite_nio_sqlite3_complete16(). If that initialization fails,
-** then the return value from sqlite_nio_sqlite3_complete16() will be non-zero
+** to invoking sqlite3_complete16() then sqlite_nio_sqlite3_initialize() is invoked
+** automatically by sqlite3_complete16(). If that initialization fails,
+** then the return value from sqlite3_complete16() will be non-zero
** regardless of whether or not the input SQL is complete.)^
**
-** The input to [sqlite_nio_sqlite3_complete()] must be a zero-terminated
+** The input to [sqlite3_complete()] must be a zero-terminated
** UTF-8 string.
**
-** The input to [sqlite_nio_sqlite3_complete16()] must be a zero-terminated
+** The input to [sqlite3_complete16()] must be a zero-terminated
** UTF-16 string in native byte order.
*/
-SQLITE_API int sqlite_nio_sqlite3_complete(const char *sql);
-SQLITE_API int sqlite_nio_sqlite3_complete16(const void *sql);
+SQLITE_API int sqlite3_complete(const char *sql);
+SQLITE_API int sqlite3_complete16(const void *sql);
/*
** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
@@ -3203,7 +3203,7 @@ SQLITE_API int sqlite_nio_sqlite3_busy_timeout(sqlite3*, int ms);
** Use of this interface is not recommended.
**
** Definition: A result table is memory data structure created by the
-** [sqlite_nio_sqlite3_get_table()] interface. A result table records the
+** [sqlite3_get_table()] interface. A result table records the
** complete query results from one or more queries.
**
** The table conceptually has a number of rows and columns. But
@@ -3248,27 +3248,27 @@ SQLITE_API int sqlite_nio_sqlite3_busy_timeout(sqlite3*, int ms);
** azResult[7] = "21";
** )^
**
-** ^The sqlite_nio_sqlite3_get_table() function evaluates one or more
+** ^The sqlite3_get_table() function evaluates one or more
** semicolon-separated SQL statements in the zero-terminated UTF-8
** string of its 2nd parameter and returns a result table to the
** pointer given in its 3rd parameter.
**
-** After the application has finished with the result from sqlite_nio_sqlite3_get_table(),
+** After the application has finished with the result from sqlite3_get_table(),
** it must pass the result table pointer to sqlite_nio_sqlite3_free_table() in order to
** release the memory that was malloced. Because of the way the
-** [sqlite_nio_sqlite3_malloc()] happens within sqlite_nio_sqlite3_get_table(), the calling
+** [sqlite_nio_sqlite3_malloc()] happens within sqlite3_get_table(), the calling
** function must not try to call [sqlite_nio_sqlite3_free()] directly. Only
** [sqlite_nio_sqlite3_free_table()] is able to release the memory properly and safely.
**
-** The sqlite_nio_sqlite3_get_table() interface is implemented as a wrapper around
-** [sqlite_nio_sqlite3_exec()]. The sqlite_nio_sqlite3_get_table() routine does not have access
+** The sqlite3_get_table() interface is implemented as a wrapper around
+** [sqlite_nio_sqlite3_exec()]. The sqlite3_get_table() routine does not have access
** to any internal data structures of SQLite. It uses only the public
** interface defined here. As a consequence, errors that occur in the
** wrapper layer outside of the internal [sqlite_nio_sqlite3_exec()] call are not
** reflected in subsequent calls to [sqlite_nio_sqlite3_errcode()] or
** [sqlite_nio_sqlite3_errmsg()].
*/
-SQLITE_API int sqlite_nio_sqlite3_get_table(
+SQLITE_API int sqlite3_get_table(
sqlite3 *db, /* An open database */
const char *zSql, /* SQL to be evaluated */
char ***pazResult, /* Results of the query */
@@ -3483,7 +3483,7 @@ SQLITE_API void sqlite_nio_sqlite3_randomness(int N, void *P);
** access is denied.
**
** ^The first parameter to the authorizer callback is a copy of the third
-** parameter to the sqlite_nio_sqlite3_set_authorizer() interface. ^The second parameter
+** parameter to the sqlite3_set_authorizer() interface. ^The second parameter
** to the callback is an integer [SQLITE_COPY | action code] that specifies
** the particular action to be authorized. ^The third through sixth parameters
** to the callback are either NULL pointers or zero-terminated strings
@@ -3523,7 +3523,7 @@ SQLITE_API void sqlite_nio_sqlite3_randomness(int N, void *P);
** in addition to using an authorizer.
**
** ^(Only a single authorizer can be in place on a database connection
-** at a time. Each call to sqlite_nio_sqlite3_set_authorizer overrides the
+** at a time. Each call to sqlite3_set_authorizer overrides the
** previous call.)^ ^Disable the authorizer by installing a NULL callback.
** The authorizer is disabled by default.
**
@@ -3543,7 +3543,7 @@ SQLITE_API void sqlite_nio_sqlite3_randomness(int N, void *P);
** as stated in the previous paragraph, sqlite_nio_sqlite3_step() invokes
** sqlite_nio_sqlite3_prepare_v2() to reprepare a statement after a schema change.
*/
-SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
+SQLITE_API int sqlite3_set_authorizer(
sqlite3*,
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
void *pUserData
@@ -3552,10 +3552,10 @@ SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
/*
** CAPI3REF: Authorizer Return Codes
**
-** The [sqlite_nio_sqlite3_set_authorizer | authorizer callback function] must
+** The [sqlite3_set_authorizer | authorizer callback function] must
** return either [SQLITE_OK] or one of these two constants in order
** to signal SQLite whether or not the action is permitted. See the
-** [sqlite_nio_sqlite3_set_authorizer | authorizer documentation] for additional
+** [sqlite3_set_authorizer | authorizer documentation] for additional
** information.
**
** Note that SQLITE_IGNORE is also used as a [conflict resolution mode]
@@ -3567,7 +3567,7 @@ SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
/*
** CAPI3REF: Authorizer Action Codes
**
-** The [sqlite_nio_sqlite3_set_authorizer()] interface registers a callback function
+** The [sqlite3_set_authorizer()] interface registers a callback function
** that is invoked to authorize certain SQL statement actions. The
** second parameter to the callback is an integer code that specifies
** what action is being authorized. These are the integer action codes that
@@ -3623,24 +3623,24 @@ SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
** CAPI3REF: Deprecated Tracing And Profiling Functions
** DEPRECATED
**
-** These routines are deprecated. Use the [sqlite_nio_sqlite3_trace_v2()] interface
+** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
** instead of the routines described here.
**
** These routines register callback functions that can be used for
** tracing and profiling the execution of SQL statements.
**
-** ^The callback function registered by sqlite_nio_sqlite3_trace() is invoked at
+** ^The callback function registered by sqlite3_trace() is invoked at
** various times when an SQL statement is being run by [sqlite_nio_sqlite3_step()].
-** ^The sqlite_nio_sqlite3_trace() callback is invoked with a UTF-8 rendering of the
+** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the
** SQL statement text as the statement first begins executing.
-** ^(Additional sqlite_nio_sqlite3_trace() callbacks might occur
+** ^(Additional sqlite3_trace() callbacks might occur
** as each triggered subprogram is entered. The callbacks for triggers
** contain a UTF-8 SQL comment that identifies the trigger.)^
**
** The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit
-** the length of [bound parameter] expansion in the output of sqlite_nio_sqlite3_trace().
+** the length of [bound parameter] expansion in the output of sqlite3_trace().
**
-** ^The callback function registered by sqlite_nio_sqlite3_profile() is invoked
+** ^The callback function registered by sqlite3_profile() is invoked
** as each SQL statement finishes. ^The profile callback contains
** the original statement text and an estimate of wall-clock time
** of how long that statement took to run. ^The profile callback
@@ -3648,12 +3648,12 @@ SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
** 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. Invoking
-** either [sqlite_nio_sqlite3_trace()] or [sqlite_nio_sqlite3_trace_v2()] will cancel the
+** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the
** profile callback.
*/
-SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_trace(sqlite3*,
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
void(*xTrace)(void*,const char*), void*);
-SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
/*
@@ -3661,8 +3661,8 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** KEYWORDS: SQLITE_TRACE
**
** These constants identify classes of events that can be monitored
-** using the [sqlite_nio_sqlite3_trace_v2()] tracing logic. The M argument
-** to [sqlite_nio_sqlite3_trace_v2(D,M,X,P)] is an OR-ed combination of one or more of
+** using the [sqlite3_trace_v2()] tracing logic. The M argument
+** to [sqlite3_trace_v2(D,M,X,P)] is an OR-ed combination of one or more of
** the following constants. ^The first argument to the trace callback
** is one of the following constants.
**
@@ -3671,7 +3671,7 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** ^A trace callback has four arguments: xCallback(T,C,P,X).
** ^The T argument is one of the integer type codes above.
** ^The C argument is a copy of the context pointer passed in as the
-** fourth argument to [sqlite_nio_sqlite3_trace_v2()].
+** fourth argument to [sqlite3_trace_v2()].
** The P and X arguments are pointers whose meanings depend on T.
**
**
@@ -3683,13 +3683,13 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** [prepared statement]. ^The X argument is a pointer to a string which
** is the unexpanded SQL text of the prepared statement or an SQL comment
** that indicates the invocation of a trigger. ^The callback can compute
-** the same text that would have been returned by the legacy [sqlite_nio_sqlite3_trace()]
+** the same text that would have been returned by the legacy [sqlite3_trace()]
** interface by using the X argument when X begins with "--" and invoking
** [sqlite_nio_sqlite3_expanded_sql(P)] otherwise.
**
** [[SQLITE_TRACE_PROFILE]] - SQLITE_TRACE_PROFILE
** - ^An SQLITE_TRACE_PROFILE callback provides approximately the same
-** information as is provided by the [sqlite_nio_sqlite3_profile()] callback.
+** information as is provided by the [sqlite3_profile()] callback.
** ^The P argument is a pointer to the [prepared statement] and the
** X argument points to a 64-bit integer which is approximately
** the number of nanoseconds that the prepared statement took to run.
@@ -3717,16 +3717,16 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** CAPI3REF: SQL Trace Hook
** METHOD: sqlite3
**
-** ^The sqlite_nio_sqlite3_trace_v2(D,M,X,P) interface registers a trace callback
+** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback
** function X against [database connection] D, using property mask M
** and context pointer P. ^If the X callback is
** NULL or if the M mask is zero, then tracing is disabled. The
** M argument should be the bitwise OR-ed combination of
** zero or more [SQLITE_TRACE] constants.
**
-** ^Each call to either sqlite_nio_sqlite3_trace(D,X,P) or sqlite_nio_sqlite3_trace_v2(D,M,X,P)
-** overrides (cancels) all prior calls to sqlite_nio_sqlite3_trace(D,X,P) or
-** sqlite_nio_sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
+** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)
+** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or
+** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
** database connection may have at most one trace callback.
**
** ^The X callback is invoked whenever any of the events identified by
@@ -3740,11 +3740,11 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite_nio_sqlite3_profile(sqlite3*,
** ^The C argument is a copy of the context pointer.
** The P and X arguments are pointers whose meanings depend on T.
**
-** The sqlite_nio_sqlite3_trace_v2() interface is intended to replace the legacy
-** interfaces [sqlite_nio_sqlite3_trace()] and [sqlite_nio_sqlite3_profile()], both of which
+** The sqlite3_trace_v2() interface is intended to replace the legacy
+** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
** are deprecated.
*/
-SQLITE_API int sqlite_nio_sqlite3_trace_v2(
+SQLITE_API int sqlite3_trace_v2(
sqlite3*,
unsigned uMask,
int(*xCallback)(unsigned,void*,void*,void*),
@@ -3755,7 +3755,7 @@ SQLITE_API int sqlite_nio_sqlite3_trace_v2(
** CAPI3REF: Query Progress Callbacks
** METHOD: sqlite3
**
-** ^The sqlite_nio_sqlite3_progress_handler(D,N,X,P) interface causes the callback
+** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback
** function X to be invoked periodically during long running calls to
** [sqlite_nio_sqlite3_step()] and [sqlite_nio_sqlite3_prepare()] and similar for
** database connection D. An example use for this
@@ -3790,7 +3790,7 @@ SQLITE_API int sqlite_nio_sqlite3_trace_v2(
** invoked directly from [sqlite_nio_sqlite3_prepare()] while analyzing and generating
** code for complex queries.
*/
-SQLITE_API void sqlite_nio_sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
/*
** CAPI3REF: Opening A New Database Connection
@@ -3873,7 +3873,7 @@ SQLITE_API void sqlite_nio_sqlite3_progress_handler(sqlite3*, int, int(*)(void*)
** ^(
- [SQLITE_OPEN_SHAREDCACHE]
** - The database is opened [shared cache] enabled, overriding
** the default shared cache setting provided by
-** [sqlite_nio_sqlite3_enable_shared_cache()].)^
+** [sqlite3_enable_shared_cache()].)^
** The [use of shared cache mode is discouraged] and hence shared cache
** capabilities may be omitted from many builds of SQLite. In such cases,
** this option is a no-op.
@@ -3881,7 +3881,7 @@ SQLITE_API void sqlite_nio_sqlite3_progress_handler(sqlite3*, int, int(*)(void*)
** ^(
- [SQLITE_OPEN_PRIVATECACHE]
** - The database is opened [shared cache] disabled, overriding
** the default shared cache setting provided by
-** [sqlite_nio_sqlite3_enable_shared_cache()].)^
+** [sqlite3_enable_shared_cache()].)^
**
** [[OPEN_EXRESCODE]] ^(
- [SQLITE_OPEN_EXRESCODE]
** - The database connection comes up in "extended result code mode".
@@ -4389,7 +4389,7 @@ typedef struct sqlite3_stmt sqlite3_stmt;
** off the Internet. The internal databases can be given the
** large, default limits. Databases managed by external sources can
** be given much smaller limits designed to prevent a denial of service
-** attack. Developers might also want to use the [sqlite_nio_sqlite3_set_authorizer()]
+** attack. Developers might also want to use the [sqlite3_set_authorizer()]
** interface to further control untrusted SQL. The size of the database
** created by an untrusted script can be contained using the
** [max_page_count] [PRAGMA].
@@ -5950,12 +5950,12 @@ SQLITE_API int sqlite_nio_sqlite3_create_window_function(
** these functions, we will not explain what they do.
*/
#ifndef SQLITE_OMIT_DEPRECATED
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_aggregate_count(sqlite3_context*);
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_expired(sqlite3_stmt*);
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_global_recover(void);
-SQLITE_API SQLITE_DEPRECATED void sqlite_nio_sqlite3_thread_cleanup(void);
-SQLITE_API SQLITE_DEPRECATED int sqlite_nio_sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
void*,sqlite3_int64);
#endif
@@ -6853,33 +6853,33 @@ SQLITE_API char *sqlite_nio_sqlite3_data_directory;
** CAPI3REF: Win32 Specific Interface
**
** These interfaces are available only on Windows. The
-** [sqlite_nio_sqlite3_win32_set_directory] interface is used to set the value associated
+** [sqlite3_win32_set_directory] interface is used to set the value associated
** with the [sqlite_nio_sqlite3_temp_directory] or [sqlite_nio_sqlite3_data_directory] variable, to
** zValue, depending on the value of the type parameter. The zValue parameter
** should be NULL to cause the previous value to be freed via [sqlite_nio_sqlite3_free];
** a non-NULL value will be copied into memory obtained from [sqlite_nio_sqlite3_malloc]
-** prior to being used. The [sqlite_nio_sqlite3_win32_set_directory] interface returns
+** prior to being used. The [sqlite3_win32_set_directory] interface returns
** [SQLITE_OK] to indicate success, [SQLITE_ERROR] if the type is unsupported,
** or [SQLITE_NOMEM] if memory could not be allocated. The value of the
** [sqlite_nio_sqlite3_data_directory] variable is intended to act as a replacement for
** the current directory on the sub-platforms of Win32 where that concept is
-** not present, e.g. WinRT and UWP. The [sqlite_nio_sqlite3_win32_set_directory8] and
-** [sqlite_nio_sqlite3_win32_set_directory16] interfaces behave exactly the same as the
-** sqlite_nio_sqlite3_win32_set_directory interface except the string parameter must be
+** not present, e.g. WinRT and UWP. The [sqlite3_win32_set_directory8] and
+** [sqlite3_win32_set_directory16] interfaces behave exactly the same as the
+** sqlite3_win32_set_directory interface except the string parameter must be
** UTF-8 or UTF-16, respectively.
*/
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory(
+SQLITE_API int sqlite3_win32_set_directory(
unsigned long type, /* Identifier for directory being set or reset */
void *zValue /* New value for directory being set or reset */
);
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory8(unsigned long type, const char *zValue);
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory16(unsigned long type, const void *zValue);
+SQLITE_API int sqlite3_win32_set_directory8(unsigned long type, const char *zValue);
+SQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zValue);
/*
** CAPI3REF: Win32 Directory Types
**
** These macros are only available on Windows. They define the allowed values
-** for the type argument to the [sqlite_nio_sqlite3_win32_set_directory] interface.
+** for the type argument to the [sqlite3_win32_set_directory] interface.
*/
#define SQLITE_WIN32_DATA_DIRECTORY_TYPE 1
#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE 2
@@ -6934,7 +6934,7 @@ SQLITE_API sqlite3 *sqlite_nio_sqlite3_db_handle(sqlite3_stmt*);
** Space to hold the string that is returned by sqlite_nio_sqlite3_db_name() is managed
** by SQLite itself. The string might be deallocated by any operation that
** changes the schema, including [ATTACH] or [DETACH] or calls to
-** [sqlite_nio_sqlite3_serialize()] or [sqlite_nio_sqlite3_deserialize()], even operations that
+** [sqlite3_serialize()] or [sqlite3_deserialize()], even operations that
** occur on a different thread. Applications that need to
** remember the string long-term should make their own copy. Applications that
** are accessing the same database connection simultaneously on multiple
@@ -7273,7 +7273,7 @@ SQLITE_API void *sqlite_nio_sqlite3_update_hook(
**
** See Also: [SQLite Shared-Cache Mode]
*/
-SQLITE_API int sqlite_nio_sqlite3_enable_shared_cache(int);
+SQLITE_API int sqlite3_enable_shared_cache(int);
/*
** CAPI3REF: Attempt To Free Heap Memory
@@ -7471,7 +7471,7 @@ SQLITE_API int sqlite_nio_sqlite3_table_column_metadata(
**
** ^This interface loads an SQLite extension library from the named file.
**
-** ^The sqlite_nio_sqlite3_load_extension() interface attempts to load an
+** ^The sqlite3_load_extension() interface attempts to load an
** [SQLite extension] library contained in the file zFile. If
** the file cannot be loaded directly, attempts are made to load
** with various operating-system specific extensions added.
@@ -7486,30 +7486,30 @@ SQLITE_API int sqlite_nio_sqlite3_table_column_metadata(
** X is consists of the lower-case equivalent of all ASCII alphabetic
** characters in the filename from the last "/" to the first following
** "." and omitting any initial "lib".)^
-** ^The sqlite_nio_sqlite3_load_extension() interface returns
+** ^The sqlite3_load_extension() interface returns
** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
** ^If an error occurs and pzErrMsg is not 0, then the
-** [sqlite_nio_sqlite3_load_extension()] interface shall attempt to
+** [sqlite3_load_extension()] interface shall attempt to
** fill *pzErrMsg with error message text stored in memory
** obtained from [sqlite_nio_sqlite3_malloc()]. The calling function
** should free this memory by calling [sqlite_nio_sqlite3_free()].
**
** ^Extension loading must be enabled using
-** [sqlite_nio_sqlite3_enable_load_extension()] or
+** [sqlite3_enable_load_extension()] or
** [sqlite_nio_sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL)
** prior to calling this API,
** otherwise an error will be returned.
**
** Security warning: It is recommended that the
** [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this
-** interface. The use of the [sqlite_nio_sqlite3_enable_load_extension()] interface
+** interface. The use of the [sqlite3_enable_load_extension()] interface
** should be avoided. This will keep the SQL function [load_extension()]
** disabled and prevent SQL injections from giving attackers
** access to extension loading capabilities.
**
** See also the [load_extension() SQL function].
*/
-SQLITE_API int sqlite_nio_sqlite3_load_extension(
+SQLITE_API int sqlite3_load_extension(
sqlite3 *db, /* Load the extension into this database connection */
const char *zFile, /* Name of the shared library containing extension */
const char *zProc, /* Entry point. Derived from zFile if 0 */
@@ -7523,15 +7523,15 @@ SQLITE_API int sqlite_nio_sqlite3_load_extension(
** ^So as not to open security holes in older applications that are
** unprepared to deal with [extension loading], and as a means of disabling
** [extension loading] while evaluating user-entered SQL, the following API
-** is provided to turn the [sqlite_nio_sqlite3_load_extension()] mechanism on and off.
+** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
**
** ^Extension loading is off by default.
-** ^Call the sqlite_nio_sqlite3_enable_load_extension() routine with onoff==1
+** ^Call the sqlite3_enable_load_extension() routine with onoff==1
** to turn extension loading on and call it with onoff==0 to turn
** it back off again.
**
** ^This interface enables or disables both the C-API
-** [sqlite_nio_sqlite3_load_extension()] and the SQL function [load_extension()].
+** [sqlite3_load_extension()] and the SQL function [load_extension()].
** ^(Use [sqlite_nio_sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)
** to enable or disable only the C-API.)^
**
@@ -7541,7 +7541,7 @@ SQLITE_API int sqlite_nio_sqlite3_load_extension(
** remains disabled. This will prevent SQL injections from giving attackers
** access to extension loading capabilities.
*/
-SQLITE_API int sqlite_nio_sqlite3_enable_load_extension(sqlite3 *db, int onoff);
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
/*
** CAPI3REF: Automatically Load Statically Linked Extensions
@@ -8394,7 +8394,7 @@ SQLITE_API int sqlite_nio_sqlite3_vfs_unregister(sqlite3_vfs*);
** sqlite_nio_sqlite3_mutex_leave(), or sqlite_nio_sqlite3_mutex_free() is a NULL pointer,
** then any of the four routines behaves as a no-op.
**
-** See also: [sqlite_nio_sqlite3_mutex_held()] and [sqlite_nio_sqlite3_mutex_notheld()].
+** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
*/
SQLITE_API sqlite3_mutex *sqlite_nio_sqlite3_mutex_alloc(int);
SQLITE_API void sqlite_nio_sqlite3_mutex_free(sqlite3_mutex*);
@@ -8440,8 +8440,8 @@ SQLITE_API void sqlite_nio_sqlite3_mutex_leave(sqlite3_mutex*);
**
- [sqlite_nio_sqlite3_mutex_enter()]
** - [sqlite_nio_sqlite3_mutex_try()]
** - [sqlite_nio_sqlite3_mutex_leave()]
-** - [sqlite_nio_sqlite3_mutex_held()]
-** - [sqlite_nio_sqlite3_mutex_notheld()]
+** - [sqlite3_mutex_held()]
+** - [sqlite3_mutex_notheld()]
** )^
**
** The only difference is that the public sqlite3_XXX functions enumerated
@@ -8483,7 +8483,7 @@ struct sqlite3_mutex_methods {
/*
** CAPI3REF: Mutex Verification Routines
**
-** The sqlite_nio_sqlite3_mutex_held() and sqlite_nio_sqlite3_mutex_notheld() routines
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
** are intended for use inside assert() statements. The SQLite core
** never uses these routines except inside an assert() and applications
** are advised to follow the lead of the core. The SQLite core only
@@ -8500,18 +8500,18 @@ struct sqlite3_mutex_methods {
** versions of these routines, it should at least provide stubs that always
** return true so that one does not get spurious assertion failures.
**
-** If the argument to sqlite_nio_sqlite3_mutex_held() is a NULL pointer then
+** If the argument to sqlite3_mutex_held() is a NULL pointer then
** the routine should return 1. This seems counter-intuitive since
** clearly the mutex cannot be held if it does not exist. But
** the reason the mutex does not exist is because the build is not
** using mutexes. And we do not want the assert() containing the
-** call to sqlite_nio_sqlite3_mutex_held() to fail, so a non-zero return is
-** the appropriate thing to do. The sqlite_nio_sqlite3_mutex_notheld()
+** call to sqlite3_mutex_held() to fail, so a non-zero return is
+** the appropriate thing to do. The sqlite3_mutex_notheld()
** interface should also return 1 when given a NULL pointer.
*/
#ifndef NDEBUG
-SQLITE_API int sqlite_nio_sqlite3_mutex_held(sqlite3_mutex*);
-SQLITE_API int sqlite_nio_sqlite3_mutex_notheld(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
#endif
/*
@@ -10491,7 +10491,7 @@ SQLITE_API int sqlite_nio_sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlit
** is for the SQL statement being evaluated.
**
** Note that the [SQLITE_IGNORE] constant is also used as a potential
-** return value from the [sqlite_nio_sqlite3_set_authorizer()] callback and that
+** return value from the [sqlite3_set_authorizer()] callback and that
** [SQLITE_ABORT] is also a [result code].
*/
#define SQLITE_ROLLBACK 1
@@ -10505,8 +10505,8 @@ SQLITE_API int sqlite_nio_sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlit
** KEYWORDS: {scanstatus options}
**
** The following constants can be used for the T parameter to the
-** [sqlite_nio_sqlite3_stmt_scanstatus(S,X,T,V)] interface. Each constant designates a
-** different metric for sqlite_nio_sqlite3_stmt_scanstatus() to return.
+** [sqlite3_stmt_scanstatus(S,X,T,V)] interface. Each constant designates a
+** different metric for sqlite3_stmt_scanstatus() to return.
**
** When the value returned to V is a string, space to hold that string is
** managed by the prepared statement S and will be automatically freed when
@@ -10597,8 +10597,8 @@ SQLITE_API int sqlite_nio_sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlit
** SQLITE_SCANSTAT_COMPLEX is not specified, then only query plan elements
** that correspond to query loops (the "SCAN..." and "SEARCH..." elements of
** the EXPLAIN QUERY PLAN output) are available. Invoking API
-** sqlite_nio_sqlite3_stmt_scanstatus() is equivalent to calling
-** sqlite_nio_sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
+** sqlite3_stmt_scanstatus() is equivalent to calling
+** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
**
** Parameter "idx" identifies the specific query element to retrieve statistics
** for. Query elements are numbered starting from zero. A value of -1 may be
@@ -10607,15 +10607,15 @@ SQLITE_API int sqlite_nio_sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlit
** elements used to implement the statement - a non-zero value is returned and
** the variable that pOut points to is unchanged.
**
-** See also: [sqlite_nio_sqlite3_stmt_scanstatus_reset()]
+** See also: [sqlite3_stmt_scanstatus_reset()]
*/
-SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus(
+SQLITE_API int sqlite3_stmt_scanstatus(
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
int idx, /* Index of loop to report on */
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
void *pOut /* Result written here */
);
-SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus_v2(
+SQLITE_API int sqlite3_stmt_scanstatus_v2(
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
int idx, /* Index of loop to report on */
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
@@ -10633,12 +10633,12 @@ SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus_v2(
** CAPI3REF: Zero Scan-Status Counters
** METHOD: sqlite3_stmt
**
-** ^Zero all [sqlite_nio_sqlite3_stmt_scanstatus()] related event counters.
+** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
**
** This API is only available if the library is built with pre-processor
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
*/
-SQLITE_API void sqlite_nio_sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
/*
** CAPI3REF: Flush caches to disk mid-transaction
@@ -10831,16 +10831,16 @@ typedef struct sqlite3_snapshot {
** CAPI3REF: Record A Database Snapshot
** CONSTRUCTOR: sqlite3_snapshot
**
-** ^The [sqlite_nio_sqlite3_snapshot_get(D,S,P)] interface attempts to make a
+** ^The [sqlite3_snapshot_get(D,S,P)] interface attempts to make a
** new [sqlite3_snapshot] object that records the current state of
** schema S in database connection D. ^On success, the
-** [sqlite_nio_sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly
+** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly
** created [sqlite3_snapshot] object into *P and returns SQLITE_OK.
** If there is not already a read-transaction open on schema S when
** this function is called, one is opened automatically.
**
** The following must be true for this function to succeed. If any of
-** the following statements are false when sqlite_nio_sqlite3_snapshot_get() is
+** the following statements are false when sqlite3_snapshot_get() is
** called, SQLITE_ERROR is returned. The final value of *P is undefined
** in this case.
**
@@ -10864,13 +10864,13 @@ typedef struct sqlite3_snapshot {
** whether or not a read transaction is opened on schema S is undefined.
**
** The [sqlite3_snapshot] object returned from a successful call to
-** [sqlite_nio_sqlite3_snapshot_get()] must be freed using [sqlite_nio_sqlite3_snapshot_free()]
+** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()]
** to avoid a memory leak.
**
-** The [sqlite_nio_sqlite3_snapshot_get()] interface is only available when the
+** The [sqlite3_snapshot_get()] interface is only available when the
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_get(
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
sqlite3 *db,
const char *zSchema,
sqlite3_snapshot **ppSnapshot
@@ -10880,22 +10880,22 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_get(
** CAPI3REF: Start a read transaction on an historical snapshot
** METHOD: sqlite3_snapshot
**
-** ^The [sqlite_nio_sqlite3_snapshot_open(D,S,P)] interface either starts a new read
+** ^The [sqlite3_snapshot_open(D,S,P)] interface either starts a new read
** transaction or upgrades an existing one for schema S of
** [database connection] D such that the read transaction refers to
** historical [snapshot] P, rather than the most recent change to the
-** database. ^The [sqlite_nio_sqlite3_snapshot_open()] interface returns SQLITE_OK
+** database. ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK
** on success or an appropriate [error code] if it fails.
**
** ^In order to succeed, the database connection must not be in
-** [autocommit mode] when [sqlite_nio_sqlite3_snapshot_open(D,S,P)] is called. If there
+** [autocommit mode] when [sqlite3_snapshot_open(D,S,P)] is called. If there
** is already a read transaction open on schema S, then the database handle
** must have no active statements (SELECT statements that have been passed
** to sqlite_nio_sqlite3_step() but not sqlite_nio_sqlite3_reset() or sqlite_nio_sqlite3_finalize()).
** SQLITE_ERROR is returned if either of these conditions is violated, or
** if schema S does not exist, or if the snapshot object is invalid.
**
-** ^A call to sqlite_nio_sqlite3_snapshot_open() will fail to open if the specified
+** ^A call to sqlite3_snapshot_open() will fail to open if the specified
** snapshot has been overwritten by a [checkpoint]. In this case
** SQLITE_ERROR_SNAPSHOT is returned.
**
@@ -10907,7 +10907,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_get(
** read transaction is undefined. If SQLITE_OK is returned, then the
** read transaction is now open on database snapshot P.
**
-** ^(A call to [sqlite_nio_sqlite3_snapshot_open(D,S,P)] will fail if the
+** ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the
** database connection D does not know that the database file for
** schema S is in [WAL mode]. A database connection might not know
** that the database file is in [WAL mode] if there has been no prior
@@ -10916,10 +10916,10 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_get(
** (Hint: Run "[PRAGMA application_id]" against a newly opened
** database connection in order to make it ready to use snapshots.)
**
-** The [sqlite_nio_sqlite3_snapshot_open()] interface is only available when the
+** The [sqlite3_snapshot_open()] interface is only available when the
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_open(
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
sqlite3 *db,
const char *zSchema,
sqlite3_snapshot *pSnapshot
@@ -10929,27 +10929,27 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_open(
** CAPI3REF: Destroy a snapshot
** DESTRUCTOR: sqlite3_snapshot
**
-** ^The [sqlite_nio_sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P.
+** ^The [sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P.
** The application must eventually free every [sqlite3_snapshot] object
** using this routine to avoid a memory leak.
**
-** The [sqlite_nio_sqlite3_snapshot_free()] interface is only available when the
+** The [sqlite3_snapshot_free()] interface is only available when the
** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL void sqlite_nio_sqlite3_snapshot_free(sqlite3_snapshot*);
+SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
/*
** CAPI3REF: Compare the ages of two snapshot handles.
** METHOD: sqlite3_snapshot
**
-** The sqlite_nio_sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages
+** The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages
** of two valid snapshot handles.
**
** If the two snapshot handles are not associated with the same database
** file, the result of the comparison is undefined.
**
** Additionally, the result of the comparison is only valid if both of the
-** snapshot handles were obtained by calling sqlite_nio_sqlite3_snapshot_get() since the
+** snapshot handles were obtained by calling sqlite3_snapshot_get() since the
** last time the wal file was deleted. The wal file is deleted when the
** database is changed back to rollback mode or when the number of database
** clients drops to zero. If either snapshot handle was obtained before the
@@ -10963,7 +10963,7 @@ SQLITE_API SQLITE_EXPERIMENTAL void sqlite_nio_sqlite3_snapshot_free(sqlite3_sna
** This interface is only available if SQLite is compiled with the
** [SQLITE_ENABLE_SNAPSHOT] option.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_cmp(
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
sqlite3_snapshot *p1,
sqlite3_snapshot *p2
);
@@ -10976,13 +10976,13 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_cmp(
** (either through the use of the [SQLITE_FCNTL_PERSIST_WAL] [file control]
** or because the last process to have the database opened exited without
** calling [sqlite_nio_sqlite3_close()]) and a new connection is subsequently opened
-** on that database and [WAL file], the [sqlite_nio_sqlite3_snapshot_open()] interface
+** on that database and [WAL file], the [sqlite3_snapshot_open()] interface
** will only be able to open the last transaction added to the WAL file
** even though the WAL file contains other valid transactions.
**
** This function attempts to scan the WAL file associated with database zDb
** of database handle db and make all valid snapshots available to
-** sqlite_nio_sqlite3_snapshot_open(). It is an error if there is already a read
+** sqlite3_snapshot_open(). It is an error if there is already a read
** transaction open on the database, or if the database is not a WAL mode
** database.
**
@@ -10991,12 +10991,12 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_cmp(
** This interface is only available if SQLite is compiled with the
** [SQLITE_ENABLE_SNAPSHOT] option.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);
/*
** CAPI3REF: Serialize a database
**
-** The sqlite_nio_sqlite3_serialize(D,S,P,F) interface returns a pointer to memory
+** The sqlite3_serialize(D,S,P,F) interface returns a pointer to memory
** that is a serialization of the S database on [database connection] D.
** If P is not a NULL pointer, then the size of the database in bytes
** is written into *P.
@@ -11006,17 +11006,17 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_recover(sqlite3 *
** the serialization is the same sequence of bytes which would be written
** to disk if that database where backed up to disk.
**
-** The usual case is that sqlite_nio_sqlite3_serialize() copies the serialization of
+** The usual case is that sqlite3_serialize() copies the serialization of
** the database into memory obtained from [sqlite_nio_sqlite3_malloc64()] and returns
** a pointer to that memory. The caller is responsible for freeing the
** returned value to avoid a memory leak. However, if the F argument
** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
-** are made, and the sqlite_nio_sqlite3_serialize() function will return a pointer
+** are made, and the sqlite3_serialize() function will return a pointer
** to the contiguous memory representation of the database that SQLite
** is currently using for that database, or NULL if the no such contiguous
** memory representation of the database exists. A contiguous memory
** representation of the database will usually only exist if there has
-** been a prior call to [sqlite_nio_sqlite3_deserialize(D,S,...)] with the same
+** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
** values of D and S.
** The size of the database is written into *P even if the
** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
@@ -11029,14 +11029,14 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite_nio_sqlite3_snapshot_recover(sqlite3 *
** buffer. If the bit had been clear, the returned buffer will not
** be accessed by SQLite after the call.
**
-** A call to sqlite_nio_sqlite3_serialize(D,S,P,F) might return NULL even if the
+** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
** allocation error occurs.
**
** This interface is omitted if SQLite is compiled with the
** [SQLITE_OMIT_DESERIALIZE] option.
*/
-SQLITE_API unsigned char *sqlite_nio_sqlite3_serialize(
+SQLITE_API unsigned char *sqlite3_serialize(
sqlite3 *db, /* The database connection */
const char *zSchema, /* Which DB to serialize. ex: "main", "temp", ... */
sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */
@@ -11044,25 +11044,25 @@ SQLITE_API unsigned char *sqlite_nio_sqlite3_serialize(
);
/*
-** CAPI3REF: Flags for sqlite_nio_sqlite3_serialize
+** CAPI3REF: Flags for sqlite3_serialize
**
** Zero or more of the following constants can be OR-ed together for
-** the F argument to [sqlite_nio_sqlite3_serialize(D,S,P,F)].
+** the F argument to [sqlite3_serialize(D,S,P,F)].
**
-** SQLITE_SERIALIZE_NOCOPY means that [sqlite_nio_sqlite3_serialize()] will return
+** SQLITE_SERIALIZE_NOCOPY means that [sqlite3_serialize()] will return
** a pointer to contiguous in-memory database that it is currently using,
** without making a copy of the database. If SQLite is not currently using
** a contiguous in-memory database, then this option causes
-** [sqlite_nio_sqlite3_serialize()] to return a NULL pointer. SQLite will only be
+** [sqlite3_serialize()] to return a NULL pointer. SQLite will only be
** using a contiguous in-memory database if it has been initialized by a
-** prior call to [sqlite_nio_sqlite3_deserialize()].
+** prior call to [sqlite3_deserialize()].
*/
#define SQLITE_SERIALIZE_NOCOPY 0x001 /* Do no memory allocations */
/*
** CAPI3REF: Deserialize a database
**
-** The sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F) interface causes the
+** The sqlite3_deserialize(D,S,P,N,M,F) interface causes the
** [database connection] D to disconnect from database S and then
** reopen S as an in-memory database based on the serialization contained
** in P. The serialized database P is N bytes in size. M is the size of
@@ -11080,29 +11080,29 @@ SQLITE_API unsigned char *sqlite_nio_sqlite3_serialize(
** Applications must not modify the buffer P or invalidate it before
** the database connection D is closed.
**
-** The sqlite_nio_sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
+** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
** database is currently in a read transaction or is involved in a backup
** operation.
**
** It is not possible to deserialized into the TEMP database. If the
-** S argument to sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
+** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
** function returns SQLITE_ERROR.
**
** The deserialized database should not be in [WAL mode]. If the database
** is in WAL mode, then any attempt to use the database file will result
** in an [SQLITE_CANTOPEN] error. The application can set the
** [file format version numbers] (bytes 18 and 19) of the input database P
-** to 0x01 prior to invoking sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F) to force the
+** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the
** database file into rollback mode and work around this limitation.
**
-** If sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
+** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
** [sqlite_nio_sqlite3_free()] is invoked on argument P prior to returning.
**
** This interface is omitted if SQLite is compiled with the
** [SQLITE_OMIT_DESERIALIZE] option.
*/
-SQLITE_API int sqlite_nio_sqlite3_deserialize(
+SQLITE_API int sqlite3_deserialize(
sqlite3 *db, /* The database connection */
const char *zSchema, /* Which DB to reopen with the deserialization */
unsigned char *pData, /* The serialized database content */
@@ -11112,10 +11112,10 @@ SQLITE_API int sqlite_nio_sqlite3_deserialize(
);
/*
-** CAPI3REF: Flags for sqlite_nio_sqlite3_deserialize()
+** CAPI3REF: Flags for sqlite3_deserialize()
**
** The following are allowed values for 6th argument (the F argument) to
-** the [sqlite_nio_sqlite3_deserialize(D,S,P,N,M,F)] interface.
+** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
**
** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
** in the P argument is held in memory obtained from [sqlite_nio_sqlite3_malloc64()]
@@ -15241,7 +15241,7 @@ struct BusyHandler {
** used for backwards compatibility.
**
** 1. Queries can use either the PREFERRED or the LEGACY names
-** 2. The sqlite_nio_sqlite3_set_authorizer() callback uses the LEGACY name
+** 2. The sqlite3_set_authorizer() callback uses the LEGACY name
** 3. The PRAGMA table_list statement uses the PREFERRED name
**
** The LEGACY names are stored in the internal symbol hash table
@@ -17361,15 +17361,15 @@ SQLITE_PRIVATE int sqlite3PCacheIsDirty(PCache *pCache);
#define sqlite_nio_sqlite3_mutex_enter(X)
#define sqlite_nio_sqlite3_mutex_try(X) SQLITE_OK
#define sqlite_nio_sqlite3_mutex_leave(X)
-#define sqlite_nio_sqlite3_mutex_held(X) ((void)(X),1)
-#define sqlite_nio_sqlite3_mutex_notheld(X) ((void)(X),1)
+#define sqlite3_mutex_held(X) ((void)(X),1)
+#define sqlite3_mutex_notheld(X) ((void)(X),1)
#define sqlite3MutexAlloc(X) ((sqlite3_mutex*)8)
#define sqlite3MutexInit() SQLITE_OK
#define sqlite3MutexEnd()
#define MUTEX_LOGIC(X)
#else
#define MUTEX_LOGIC(X) X
-SQLITE_API int sqlite_nio_sqlite3_mutex_held(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
#endif /* defined(SQLITE_MUTEX_OMIT) */
/************** End of mutex.h ***********************************************/
@@ -17618,7 +17618,7 @@ SQLITE_PRIVATE void sqlite3CryptFunc(sqlite3_context*,int,sqlite3_value**);
#ifndef SQLITE_OMIT_DEPRECATED
/* This is an extra SQLITE_TRACE macro that indicates "legacy" tracing
-** in the style of sqlite_nio_sqlite3_trace()
+** in the style of sqlite3_trace()
*/
#define SQLITE_TRACE_LEGACY 0x40 /* Use the legacy xTrace */
#define SQLITE_TRACE_XPROFILE 0x80 /* Use the legacy xProfile */
@@ -19363,7 +19363,7 @@ struct SrcList {
#define WHERE_AGG_DISTINCT 0x0400 /* Query is "SELECT agg(DISTINCT ...)" */
#define WHERE_ORDERBY_LIMIT 0x0800 /* ORDERBY+LIMIT on the inner loop */
#define WHERE_RIGHT_JOIN 0x1000 /* Processing a RIGHT JOIN */
- /* 0x2000 not currently used */
+#define WHERE_KEEP_ALL_JOINS 0x2000 /* Do not do the omit-noop-join opt */
#define WHERE_USE_LIMIT 0x4000 /* Use the LIMIT in cost estimates */
/* 0x8000 not currently used */
@@ -22905,7 +22905,7 @@ SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
/* The default maximum size of an in-memory database created using
-** sqlite_nio_sqlite3_deserialize()
+** sqlite3_deserialize()
*/
#ifndef SQLITE_MEMDB_DEFAULT_MAXSIZE
# define SQLITE_MEMDB_DEFAULT_MAXSIZE 1073741824
@@ -23506,7 +23506,7 @@ struct sqlite3_context {
typedef unsigned bft; /* Bit Field Type */
/* The ScanStatus object holds a single value for the
-** sqlite_nio_sqlite3_stmt_scanstatus() interface.
+** sqlite3_stmt_scanstatus() interface.
**
** aAddrRange[]:
** This array is used by ScanStatus elements associated with EQP
@@ -23615,7 +23615,7 @@ struct Vdbe {
AuxData *pAuxData; /* Linked list of auxdata allocations */
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
int nScan; /* Entries in aScan[] */
- ScanStatus *aScan; /* Scan definitions for sqlite_nio_sqlite3_stmt_scanstatus() */
+ ScanStatus *aScan; /* Scan definitions for sqlite3_stmt_scanstatus() */
#endif
};
@@ -23890,7 +23890,7 @@ SQLITE_PRIVATE sqlite3_int64 sqlite3StatusValue(int op){
wsdStatInit;
assert( op>=0 && op=0 && op=0 && op=0 && opwsdStat.mxValue[op] ){
@@ -23921,7 +23921,7 @@ SQLITE_PRIVATE void sqlite3StatusDown(int op, int N){
wsdStatInit;
assert( N>=0 );
assert( op>=0 && op=0 && op=0 && op=0 && op=1 );
size = mem3.aPool[i-1].u.hdr.size4x/4;
@@ -27651,7 +27651,7 @@ static void memsys3Unlink(u32 i){
** at *pRoot.
*/
static void memsys3LinkIntoList(u32 i, u32 *pRoot){
- assert( sqlite_nio_sqlite3_mutex_held(mem3.mutex) );
+ assert( sqlite3_mutex_held(mem3.mutex) );
mem3.aPool[i].u.list.next = *pRoot;
mem3.aPool[i].u.list.prev = 0;
if( *pRoot ){
@@ -27666,7 +27666,7 @@ static void memsys3LinkIntoList(u32 i, u32 *pRoot){
*/
static void memsys3Link(u32 i){
u32 size, hash;
- assert( sqlite_nio_sqlite3_mutex_held(mem3.mutex) );
+ assert( sqlite3_mutex_held(mem3.mutex) );
assert( i>=1 );
assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );
size = mem3.aPool[i-1].u.hdr.size4x/4;
@@ -27701,7 +27701,7 @@ static void memsys3Leave(void){
static void memsys3OutOfMemory(int nByte){
if( !mem3.alarmBusy ){
mem3.alarmBusy = 1;
- assert( sqlite_nio_sqlite3_mutex_held(mem3.mutex) );
+ assert( sqlite3_mutex_held(mem3.mutex) );
sqlite_nio_sqlite3_mutex_leave(mem3.mutex);
sqlite_nio_sqlite3_release_memory(nByte);
sqlite_nio_sqlite3_mutex_enter(mem3.mutex);
@@ -27717,7 +27717,7 @@ static void memsys3OutOfMemory(int nByte){
*/
static void *memsys3Checkout(u32 i, u32 nBlock){
u32 x;
- assert( sqlite_nio_sqlite3_mutex_held(mem3.mutex) );
+ assert( sqlite3_mutex_held(mem3.mutex) );
assert( i>=1 );
assert( mem3.aPool[i-1].u.hdr.size4x/4==nBlock );
assert( mem3.aPool[i+nBlock-1].u.hdr.prevSize==nBlock );
@@ -27734,7 +27734,7 @@ static void *memsys3Checkout(u32 i, u32 nBlock){
** is not large enough, return 0.
*/
static void *memsys3FromKeyBlk(u32 nBlock){
- assert( sqlite_nio_sqlite3_mutex_held(mem3.mutex) );
+ assert( sqlite3_mutex_held(mem3.mutex) );
assert( mem3.szKeyBlk>=nBlock );
if( nBlock>=mem3.szKeyBlk-1 ){
/* Use the entire key chunk */
@@ -27781,7 +27781,7 @@ static void *memsys3FromKeyBlk(u32 nBlock){
static void memsys3Merge(u32 *pRoot){
u32 iNext, prev, size, i, x;
- assert( sqlite_nio_sqlite3_mutex_held(mem3.mutex) );
+ assert( sqlite3_mutex_held(mem3.mutex) );
for(i=*pRoot; i>0; i=iNext){
iNext = mem3.aPool[i].u.list.next;
size = mem3.aPool[i-1].u.hdr.size4x;
@@ -27822,7 +27822,7 @@ static void *memsys3MallocUnsafe(int nByte){
u32 nBlock;
u32 toFree;
- assert( sqlite_nio_sqlite3_mutex_held(mem3.mutex) );
+ assert( sqlite3_mutex_held(mem3.mutex) );
assert( sizeof(Mem3Block)==8 );
if( nByte<=12 ){
nBlock = 2;
@@ -27903,7 +27903,7 @@ static void memsys3FreeUnsafe(void *pOld){
Mem3Block *p = (Mem3Block*)pOld;
int i;
u32 size, x;
- assert( sqlite_nio_sqlite3_mutex_held(mem3.mutex) );
+ assert( sqlite3_mutex_held(mem3.mutex) );
assert( p>mem3.aPool && p<&mem3.aPool[mem3.nPool] );
i = p - mem3.aPool;
assert( (mem3.aPool[i-1].u.hdr.size4x&1)==1 );
@@ -28326,7 +28326,7 @@ static void memsys5Unlink(int i, int iLogsize){
*/
static void memsys5Link(int i, int iLogsize){
int x;
- assert( sqlite_nio_sqlite3_mutex_held(mem5.mutex) );
+ assert( sqlite3_mutex_held(mem5.mutex) );
assert( i>=0 && i=0 && iLogsize<=LOGMAX );
assert( (mem5.aCtrl[i] & CTRL_LOGSIZE)==iLogsize );
@@ -29089,14 +29089,14 @@ SQLITE_API void sqlite_nio_sqlite3_mutex_leave(sqlite3_mutex *p){
#ifndef NDEBUG
/*
-** The sqlite_nio_sqlite3_mutex_held() and sqlite_nio_sqlite3_mutex_notheld() routine are
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
** intended for use inside assert() statements.
*/
-SQLITE_API int sqlite_nio_sqlite3_mutex_held(sqlite3_mutex *p){
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){
assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
}
-SQLITE_API int sqlite_nio_sqlite3_mutex_notheld(sqlite3_mutex *p){
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){
assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
}
@@ -29191,7 +29191,7 @@ typedef struct sqlite3_debug_mutex {
} sqlite3_debug_mutex;
/*
-** The sqlite_nio_sqlite3_mutex_held() and sqlite_nio_sqlite3_mutex_notheld() routine are
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
** intended for use inside assert() statements.
*/
static int debugMutexHeld(sqlite3_mutex *pX){
@@ -29385,7 +29385,7 @@ struct sqlite3_mutex {
#endif
/*
-** The sqlite_nio_sqlite3_mutex_held() and sqlite_nio_sqlite3_mutex_notheld() routine are
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
** intended for use only inside assert() statements. On some platforms,
** there might be race conditions that can cause these routines to
** deliver incorrect results. In particular, if pthread_equal() is
@@ -29875,7 +29875,7 @@ struct sqlite3_mutex {
#ifdef SQLITE_DEBUG
/*
-** The sqlite_nio_sqlite3_mutex_held() and sqlite_nio_sqlite3_mutex_notheld() routine are
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
** intended for use only inside assert() statements.
*/
static int winMutexHeld(sqlite3_mutex *p){
@@ -30286,7 +30286,7 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MallocMutex(void){
** that was invoked when memory usage grew too large. Now it is a
** no-op.
*/
-SQLITE_API int sqlite_nio_sqlite3_memory_alarm(
+SQLITE_API int sqlite3_memory_alarm(
void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
void *pArg,
sqlite3_int64 iThreshold
@@ -30463,7 +30463,7 @@ static SQLITE_NOINLINE void test_oom_breakpoint(u64 n){
static void mallocWithAlarm(int n, void **pp){
void *p;
int nFull;
- assert( sqlite_nio_sqlite3_mutex_held(mem0.mutex) );
+ assert( sqlite3_mutex_held(mem0.mutex) );
assert( n>0 );
/* In Firefox (circa 2017-02-08), xRoundup() is remapped to an internal
@@ -30605,12 +30605,12 @@ SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, const void *p){
if( ((uptr)p)<(uptr)(db->lookaside.pTrueEnd) ){
#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE
if( ((uptr)p)>=(uptr)(db->lookaside.pMiddle) ){
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
return LOOKASIDE_SMALL;
}
#endif
if( ((uptr)p)>=(uptr)(db->lookaside.pStart) ){
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
return db->lookaside.szTrue;
}
}
@@ -30655,7 +30655,7 @@ static SQLITE_NOINLINE void measureAllocationSize(sqlite3 *db, void *p){
** The sqlite3DbFreeNN(D,X) version requires that X be non-NULL.
*/
SQLITE_PRIVATE void sqlite3DbFreeNN(sqlite3 *db, void *p){
- assert( db==0 || sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( db==0 || sqlite3_mutex_held(db->mutex) );
assert( p!=0 );
if( db ){
if( ((uptr)p)<(uptr)(db->lookaside.pEnd) ){
@@ -30695,7 +30695,7 @@ SQLITE_PRIVATE void sqlite3DbFreeNN(sqlite3 *db, void *p){
}
SQLITE_PRIVATE void sqlite3DbNNFreeNN(sqlite3 *db, void *p){
assert( db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
assert( p!=0 );
if( ((uptr)p)<(uptr)(db->lookaside.pEnd) ){
#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE
@@ -30731,7 +30731,7 @@ SQLITE_PRIVATE void sqlite3DbNNFreeNN(sqlite3 *db, void *p){
sqlite_nio_sqlite3_free(p);
}
SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
- assert( db==0 || sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( db==0 || sqlite3_mutex_held(db->mutex) );
if( p ) sqlite3DbFreeNN(db, p);
}
@@ -30883,7 +30883,7 @@ SQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){
#ifndef SQLITE_OMIT_LOOKASIDE
LookasideSlot *pBuf;
assert( db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
assert( db->pnBytesFreed==0 );
if( n>db->lookaside.sz ){
if( !db->lookaside.bDisable ){
@@ -30919,7 +30919,7 @@ SQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){
}
#else
assert( db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
assert( db->pnBytesFreed==0 );
if( db->mallocFailed ){
return 0;
@@ -30938,7 +30938,7 @@ static SQLITE_NOINLINE void *dbReallocFinish(sqlite3 *db, void *p, u64 n);
SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, u64 n){
assert( db!=0 );
if( p==0 ) return sqlite3DbMallocRawNN(db, n);
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
if( ((uptr)p)<(uptr)db->lookaside.pEnd ){
#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE
if( ((uptr)p)>=(uptr)db->lookaside.pMiddle ){
@@ -31129,7 +31129,7 @@ SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
** is unsafe, as is the call to sqlite3Error().
*/
assert( db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
if( db->mallocFailed || rc ){
return apiHandleError(db, rc);
}
@@ -34560,7 +34560,7 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desired
unsigned char *z; /* Output iterator */
unsigned int c;
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( pMem->flags&MEM_Str );
assert( pMem->enc!=desiredEnc );
assert( pMem->enc!=0 );
@@ -39143,16 +39143,16 @@ static int robust_open(const char *z, int f, mode_t m){
*/
static sqlite3_mutex *unixBigLock = 0;
static void unixEnterMutex(void){
- assert( sqlite_nio_sqlite3_mutex_notheld(unixBigLock) ); /* Not a recursive mutex */
+ assert( sqlite3_mutex_notheld(unixBigLock) ); /* Not a recursive mutex */
sqlite_nio_sqlite3_mutex_enter(unixBigLock);
}
static void unixLeaveMutex(void){
- assert( sqlite_nio_sqlite3_mutex_held(unixBigLock) );
+ assert( sqlite3_mutex_held(unixBigLock) );
sqlite_nio_sqlite3_mutex_leave(unixBigLock);
}
#ifdef SQLITE_DEBUG
static int unixMutexHeld(void) {
- return sqlite_nio_sqlite3_mutex_held(unixBigLock);
+ return sqlite3_mutex_held(unixBigLock);
}
#endif
@@ -39601,11 +39601,11 @@ static unixInodeInfo *inodeList = 0; /* All unixInodeInfo objects */
*/
int unixFileMutexHeld(unixFile *pFile){
assert( pFile->pInode );
- return sqlite_nio_sqlite3_mutex_held(pFile->pInode->pLockMutex);
+ return sqlite3_mutex_held(pFile->pInode->pLockMutex);
}
int unixFileMutexNotheld(unixFile *pFile){
assert( pFile->pInode );
- return sqlite_nio_sqlite3_mutex_notheld(pFile->pInode->pLockMutex);
+ return sqlite3_mutex_notheld(pFile->pInode->pLockMutex);
}
#endif
@@ -40020,7 +40020,7 @@ static int unixFileLock(unixFile *pFile, struct flock *pLock){
int rc;
unixInodeInfo *pInode = pFile->pInode;
assert( pInode!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(pInode->pLockMutex) );
+ assert( sqlite3_mutex_held(pInode->pLockMutex) );
if( (pFile->ctrlFlags & (UNIXFILE_EXCL|UNIXFILE_RDONLY))==UNIXFILE_EXCL ){
if( pInode->bProcessLock==0 ){
struct flock lock;
@@ -42806,15 +42806,15 @@ static int unixShmSystemLock(
);
if( ofst==UNIX_SHM_DMS ){
assert( pShmNode->nRef>0 || unixMutexHeld() );
- assert( pShmNode->nRef==0 || sqlite_nio_sqlite3_mutex_held(pShmNode->pShmMutex) );
+ assert( pShmNode->nRef==0 || sqlite3_mutex_held(pShmNode->pShmMutex) );
}else{
#ifdef SQLITE_ENABLE_SETLK_TIMEOUT
int ii;
for(ii=ofst-UNIX_SHM_BASE; iiaMutex[ii]) );
+ assert( sqlite3_mutex_held(pShmNode->aMutex[ii]) );
}
#else
- assert( sqlite_nio_sqlite3_mutex_held(pShmNode->pShmMutex) );
+ assert( sqlite3_mutex_held(pShmNode->pShmMutex) );
assert( pShmNode->nRef>0 );
#endif
}
@@ -44473,7 +44473,7 @@ static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
}
if( pInode ){
UnixUnusedFd **pp;
- assert( sqlite_nio_sqlite3_mutex_notheld(pInode->pLockMutex) );
+ assert( sqlite3_mutex_notheld(pInode->pLockMutex) );
sqlite_nio_sqlite3_mutex_enter(pInode->pLockMutex);
flags &= (SQLITE_OPEN_READONLY|SQLITE_OPEN_READWRITE);
for(pp=&pInode->pUnused; *pp && (*pp)->flags!=flags; pp=&((*pp)->pNext));
@@ -48563,10 +48563,10 @@ SQLITE_API char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
}
/*
-** This function is the same as sqlite_nio_sqlite3_win32_set_directory (below); however,
+** This function is the same as sqlite3_win32_set_directory (below); however,
** it accepts a UTF-8 string.
*/
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory8(
+SQLITE_API int sqlite3_win32_set_directory8(
unsigned long type, /* Identifier for directory being set or reset */
const char *zValue /* New value for directory being set or reset */
){
@@ -48607,10 +48607,10 @@ SQLITE_API int sqlite_nio_sqlite3_win32_set_directory8(
}
/*
-** This function is the same as sqlite_nio_sqlite3_win32_set_directory (below); however,
+** This function is the same as sqlite3_win32_set_directory (below); however,
** it accepts a UTF-16 string.
*/
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory16(
+SQLITE_API int sqlite3_win32_set_directory16(
unsigned long type, /* Identifier for directory being set or reset */
const void *zValue /* New value for directory being set or reset */
){
@@ -48620,7 +48620,7 @@ SQLITE_API int sqlite_nio_sqlite3_win32_set_directory16(
zUtf8 = sqlite3_win32_unicode_to_utf8(zValue);
if( zUtf8==0 ) return SQLITE_NOMEM_BKPT;
}
- rc = sqlite_nio_sqlite3_win32_set_directory8(type, zUtf8);
+ rc = sqlite3_win32_set_directory8(type, zUtf8);
if( zUtf8 ) sqlite_nio_sqlite3_free(zUtf8);
return rc;
}
@@ -48632,11 +48632,11 @@ SQLITE_API int sqlite_nio_sqlite3_win32_set_directory16(
** argument is the name of the directory to use. The return value will be
** SQLITE_OK if successful.
*/
-SQLITE_API int sqlite_nio_sqlite3_win32_set_directory(
+SQLITE_API int sqlite3_win32_set_directory(
unsigned long type, /* Identifier for directory being set or reset */
void *zValue /* New value for directory being set or reset */
){
- return sqlite_nio_sqlite3_win32_set_directory16(type, zValue);
+ return sqlite3_win32_set_directory16(type, zValue);
}
/*
@@ -50349,7 +50349,7 @@ static void winShmLeaveMutex(void){
}
#ifndef NDEBUG
static int winShmMutexHeld(void) {
- return sqlite_nio_sqlite3_mutex_held(winBigLock);
+ return sqlite3_mutex_held(winBigLock);
}
#endif
@@ -50452,7 +50452,7 @@ static int winShmSystemLock(
int rc = 0; /* Result code form Lock/UnlockFileEx() */
/* Access to the winShmNode object is serialized by the caller */
- assert( pFile->nRef==0 || sqlite_nio_sqlite3_mutex_held(pFile->mutex) );
+ assert( pFile->nRef==0 || sqlite3_mutex_held(pFile->mutex) );
OSTRACE(("SHM-LOCK file=%p, lock=%d, offset=%d, size=%d\n",
pFile->hFile.h, lockType, ofst, nByte));
@@ -52880,8 +52880,8 @@ SQLITE_API int sqlite_nio_sqlite3_os_end(void){
** This file implements an in-memory VFS. A database is held as a contiguous
** block of memory.
**
-** This file also implements interface sqlite_nio_sqlite3_serialize() and
-** sqlite_nio_sqlite3_deserialize().
+** This file also implements interface sqlite3_serialize() and
+** sqlite3_deserialize().
*/
/* #include "sqliteInt.h" */
#ifndef SQLITE_OMIT_DESERIALIZE
@@ -52912,7 +52912,7 @@ typedef struct MemStore MemStore;
** memdb objects are stored in memdb_g.apMemStore[] in an arbitrary order.
**
** Separate memdb objects are created using a name that does not begin
-** with "/" or using sqlite_nio_sqlite3_deserialize().
+** with "/" or using sqlite3_deserialize().
**
** Access rules for shared MemStore objects:
**
@@ -53614,7 +53614,7 @@ static MemFile *memdbFromDbSchema(sqlite3 *db, const char *zSchema){
/*
** Return the serialization of a database
*/
-SQLITE_API unsigned char *sqlite_nio_sqlite3_serialize(
+SQLITE_API unsigned char *sqlite3_serialize(
sqlite3 *db, /* The database connection */
const char *zSchema, /* Which database within the connection */
sqlite3_int64 *piSize, /* Write size here, if not NULL */
@@ -53703,7 +53703,7 @@ SQLITE_API unsigned char *sqlite_nio_sqlite3_serialize(
/* Convert zSchema to a MemDB and initialize its content.
*/
-SQLITE_API int sqlite_nio_sqlite3_deserialize(
+SQLITE_API int sqlite3_deserialize(
sqlite3 *db, /* The database connection */
const char *zSchema, /* Which DB to reopen with the deserialization */
unsigned char *pData, /* The serialized database content */
@@ -55501,7 +55501,7 @@ static int pcache1InitBulk(PCache1 *pCache){
*/
static void *pcache1Alloc(int nByte){
void *p = 0;
- assert( sqlite_nio_sqlite3_mutex_notheld(pcache1.grp.mutex) );
+ assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );
if( nByte<=pcache1.szSlot ){
sqlite_nio_sqlite3_mutex_enter(pcache1.mutex);
p = (PgHdr1 *)pcache1.pFree;
@@ -55591,7 +55591,7 @@ static PgHdr1 *pcache1AllocPage(PCache1 *pCache, int benignMalloc){
PgHdr1 *p = 0;
void *pPg;
- assert( sqlite_nio_sqlite3_mutex_held(pCache->pGroup->mutex) );
+ assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
if( pCache->pFree || (pCache->nPage==0 && pcache1InitBulk(pCache)) ){
assert( pCache->pFree!=0 );
p = pCache->pFree;
@@ -55631,7 +55631,7 @@ static void pcache1FreePage(PgHdr1 *p){
PCache1 *pCache;
assert( p!=0 );
pCache = p->pCache;
- assert( sqlite_nio_sqlite3_mutex_held(p->pCache->pGroup->mutex) );
+ assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
if( p->isBulkLocal ){
p->pNext = pCache->pFree;
pCache->pFree = p;
@@ -55697,7 +55697,7 @@ static void pcache1ResizeHash(PCache1 *p){
unsigned int nNew;
unsigned int i;
- assert( sqlite_nio_sqlite3_mutex_held(p->pGroup->mutex) );
+ assert( sqlite3_mutex_held(p->pGroup->mutex) );
nNew = p->nHash*2;
if( nNew<256 ){
@@ -55738,7 +55738,7 @@ static PgHdr1 *pcache1PinPage(PgHdr1 *pPage){
assert( PAGE_IS_UNPINNED(pPage) );
assert( pPage->pLruNext );
assert( pPage->pLruPrev );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pCache->pGroup->mutex) );
+ assert( sqlite3_mutex_held(pPage->pCache->pGroup->mutex) );
pPage->pLruPrev->pLruNext = pPage->pLruNext;
pPage->pLruNext->pLruPrev = pPage->pLruPrev;
pPage->pLruNext = 0;
@@ -55763,7 +55763,7 @@ static void pcache1RemoveFromHash(PgHdr1 *pPage, int freeFlag){
PCache1 *pCache = pPage->pCache;
PgHdr1 **pp;
- assert( sqlite_nio_sqlite3_mutex_held(pCache->pGroup->mutex) );
+ assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
h = pPage->iKey % pCache->nHash;
for(pp=&pCache->apHash[h]; (*pp)!=pPage; pp=&(*pp)->pNext);
*pp = (*pp)->pNext;
@@ -55779,7 +55779,7 @@ static void pcache1RemoveFromHash(PgHdr1 *pPage, int freeFlag){
static void pcache1EnforceMaxPage(PCache1 *pCache){
PGroup *pGroup = pCache->pGroup;
PgHdr1 *p;
- assert( sqlite_nio_sqlite3_mutex_held(pGroup->mutex) );
+ assert( sqlite3_mutex_held(pGroup->mutex) );
while( pGroup->nPurgeable>pGroup->nMaxPage
&& (p=pGroup->lru.pLruPrev)->isAnchor==0
){
@@ -55807,7 +55807,7 @@ static void pcache1TruncateUnsafe(
){
TESTONLY( int nPage = 0; ) /* To assert pCache->nPage is correct */
unsigned int h, iStop;
- assert( sqlite_nio_sqlite3_mutex_held(pCache->pGroup->mutex) );
+ assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
assert( pCache->iMaxKey >= iLimit );
assert( pCache->nHash > 0 );
if( pCache->iMaxKey - iLimit < pCache->nHash ){
@@ -56393,8 +56393,8 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3Pcache1Mutex(void){
*/
SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int nReq){
int nFree = 0;
- assert( sqlite_nio_sqlite3_mutex_notheld(pcache1.grp.mutex) );
- assert( sqlite_nio_sqlite3_mutex_notheld(pcache1.mutex) );
+ assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );
+ assert( sqlite3_mutex_notheld(pcache1.mutex) );
if( sqlite3GlobalConfig.pPage==0 ){
PgHdr1 *p;
pcache1EnterMutex(&pcache1.grp);
@@ -69417,7 +69417,7 @@ SQLITE_PRIVATE void sqlite3WalSnapshotOpen(
** Return a +ve value if snapshot p1 is newer than p2. A -ve value if
** p1 is older than p2 and zero if p1 and p2 are the same snapshot.
*/
-SQLITE_API int sqlite_nio_sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
+SQLITE_API int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;
WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;
@@ -70259,8 +70259,8 @@ struct IntegrityCk {
*/
static void lockBtreeMutex(Btree *p){
assert( p->locked==0 );
- assert( sqlite_nio_sqlite3_mutex_notheld(p->pBt->mutex) );
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_notheld(p->pBt->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
sqlite_nio_sqlite3_mutex_enter(p->pBt->mutex);
p->pBt->db = p->db;
@@ -70274,8 +70274,8 @@ static void lockBtreeMutex(Btree *p){
static void SQLITE_NOINLINE unlockBtreeMutex(Btree *p){
BtShared *pBt = p->pBt;
assert( p->locked==1 );
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
assert( p->db==pBt->db );
sqlite_nio_sqlite3_mutex_leave(pBt->mutex);
@@ -70317,7 +70317,7 @@ SQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){
assert( p->sharable || p->wantToLock==0 );
/* We should already hold a lock on the database connection */
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
/* Unless the database is sharable and unlocked, then BtShared.db
** should already be set correctly. */
@@ -70374,7 +70374,7 @@ static void SQLITE_NOINLINE btreeLockCarefully(Btree *p){
** Exit the recursive mutex on a Btree.
*/
SQLITE_PRIVATE void sqlite3BtreeLeave(Btree *p){
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
if( p->sharable ){
assert( p->wantToLock>0 );
p->wantToLock--;
@@ -70394,8 +70394,8 @@ SQLITE_PRIVATE void sqlite3BtreeLeave(Btree *p){
SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree *p){
assert( p->sharable==0 || p->locked==0 || p->wantToLock>0 );
assert( p->sharable==0 || p->locked==0 || p->db==p->pBt->db );
- assert( p->sharable==0 || p->locked==0 || sqlite_nio_sqlite3_mutex_held(p->pBt->mutex) );
- assert( p->sharable==0 || p->locked==0 || sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->pBt->mutex) );
+ assert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->db->mutex) );
return (p->sharable==0 || p->locked);
}
@@ -70420,7 +70420,7 @@ static void SQLITE_NOINLINE btreeEnterAll(sqlite3 *db){
int i;
int skipOk = 1;
Btree *p;
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
for(i=0; inDb; i++){
p = db->aDb[i].pBt;
if( p && p->sharable ){
@@ -70436,7 +70436,7 @@ SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
static void SQLITE_NOINLINE btreeLeaveAll(sqlite3 *db){
int i;
Btree *p;
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
for(i=0; inDb; i++){
p = db->aDb[i].pBt;
if( p ) sqlite3BtreeLeave(p);
@@ -70455,14 +70455,14 @@ SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
*/
SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3 *db){
int i;
- if( !sqlite_nio_sqlite3_mutex_held(db->mutex) ){
+ if( !sqlite3_mutex_held(db->mutex) ){
return 0;
}
for(i=0; inDb; i++){
Btree *p;
p = db->aDb[i].pBt;
if( p && p->sharable &&
- (p->wantToLock==0 || !sqlite_nio_sqlite3_mutex_held(p->pBt->mutex)) ){
+ (p->wantToLock==0 || !sqlite3_mutex_held(p->pBt->mutex)) ){
return 0;
}
}
@@ -70488,7 +70488,7 @@ SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3 *db, int iDb, Schema *pSchema)
if( db->pVfs==0 && db->nDb==0 ) return 1;
if( pSchema ) iDb = sqlite3SchemaToIndex(db, pSchema);
assert( iDb>=0 && iDbnDb );
- if( !sqlite_nio_sqlite3_mutex_held(db->mutex) ) return 0;
+ if( !sqlite3_mutex_held(db->mutex) ) return 0;
if( iDb==1 ) return 1;
p = db->aDb[iDb].pBt;
assert( p!=0 );
@@ -70631,7 +70631,7 @@ static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
** The shared cache setting effects only future calls to
** sqlite_nio_sqlite3_open(), sqlite_nio_sqlite3_open16(), or sqlite_nio_sqlite3_open_v2().
*/
-SQLITE_API int sqlite_nio_sqlite3_enable_shared_cache(int enable){
+SQLITE_API int sqlite3_enable_shared_cache(int enable){
sqlite3GlobalConfig.sharedCacheEnabled = enable;
return SQLITE_OK;
}
@@ -71084,7 +71084,7 @@ static void releasePageNotNull(MemPage *pPage); /* Forward reference */
*/
#ifdef SQLITE_DEBUG
static int cursorHoldsMutex(BtCursor *p){
- return sqlite_nio_sqlite3_mutex_held(p->pBt->mutex);
+ return sqlite3_mutex_held(p->pBt->mutex);
}
/* Verify that the cursor and the BtShared agree about what is the current
@@ -71113,7 +71113,7 @@ static int cursorOwnsBtShared(BtCursor *p){
*/
static void invalidateAllOverflowCache(BtShared *pBt){
BtCursor *p;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
for(p=pBt->pCursor; p; p=p->pNext){
invalidateOverflowCache(p);
}
@@ -71350,7 +71350,7 @@ static int SQLITE_NOINLINE saveCursorsOnList(BtCursor*,Pgno,BtCursor*);
*/
static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
BtCursor *p;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert( pExcept==0 || pExcept->pBt==pBt );
for(p=pBt->pCursor; p; p=p->pNext){
if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) ) break;
@@ -71581,7 +71581,7 @@ SQLITE_PRIVATE void sqlite3BtreeCursorHintFlags(BtCursor *pCur, unsigned x){
static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
int nPagesPerMapPage;
Pgno iPtrMap, ret;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
if( pgno<2 ) return 0;
nPagesPerMapPage = (pBt->usableSize/5)+1;
iPtrMap = (pgno-2)/nPagesPerMapPage;
@@ -71611,7 +71611,7 @@ static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
if( *pRC ) return;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
/* The super-journal page number must never be used as a pointer map page */
assert( 0==PTRMAP_ISPAGE(pBt, PENDING_BYTE_PAGE(pBt)) );
@@ -71668,7 +71668,7 @@ static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
int offset; /* Offset of entry in pointer map */
int rc;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
iPtrmap = PTRMAP_PAGENO(pBt, key);
rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);
@@ -71788,7 +71788,7 @@ static void btreeParseCellPtrNoPayload(
u8 *pCell, /* Pointer to the cell text. */
CellInfo *pInfo /* Fill in this structure */
){
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->leaf==0 );
assert( pPage->childPtrSize==4 );
#ifndef SQLITE_DEBUG
@@ -71809,7 +71809,7 @@ static void btreeParseCellPtr(
u32 nPayload; /* Number of bytes of cell payload */
u64 iKey; /* Extracted Key value */
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->leaf==0 || pPage->leaf==1 );
assert( pPage->intKeyLeaf );
assert( pPage->childPtrSize==0 );
@@ -71894,7 +71894,7 @@ static void btreeParseCellPtrIndex(
u8 *pIter; /* For scanning through pCell */
u32 nPayload; /* Number of bytes of cell payload */
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->leaf==0 || pPage->leaf==1 );
assert( pPage->intKeyLeaf==0 );
pIter = pCell + pPage->childPtrSize;
@@ -72170,7 +72170,7 @@ static int defragmentPage(MemPage *pPage, int nMaxFrag){
assert( pPage->pBt!=0 );
assert( pPage->pBt->usableSize <= SQLITE_MAX_PAGE_SIZE );
assert( pPage->nOverflow==0 );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
data = pPage->aData;
hdr = pPage->hdrOffset;
cellOffset = pPage->cellOffset;
@@ -72366,7 +72366,7 @@ static SQLITE_INLINE int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
assert( pPage->pBt );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( nByte>=0 ); /* Minimum cell size is 4 */
assert( pPage->nFree>=nByte );
assert( pPage->nOverflow==0 );
@@ -72470,7 +72470,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
assert( CORRUPT_DB || iStart>=pPage->hdrOffset+6+pPage->childPtrSize );
assert( CORRUPT_DB || iEnd <= pPage->pBt->usableSize );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( iSize>=4 ); /* Minimum cell size is 4 */
assert( CORRUPT_DB || iStart<=pPage->pBt->usableSize-4 );
@@ -72568,7 +72568,7 @@ static int decodeFlags(MemPage *pPage, int flagByte){
BtShared *pBt; /* A copy of pPage->pBt */
assert( pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0) );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
pBt = pPage->pBt;
pPage->max1bytePayload = pBt->max1bytePayload;
if( flagByte>=(PTF_ZERODATA | PTF_LEAF) ){
@@ -72639,7 +72639,7 @@ static int btreeComputeFreeSpace(MemPage *pPage){
assert( pPage->pBt!=0 );
assert( pPage->pBt->db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
@@ -72756,7 +72756,7 @@ static int btreeInitPage(MemPage *pPage){
assert( pPage->pBt!=0 );
assert( pPage->pBt->db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
@@ -72813,7 +72813,7 @@ static void zeroPage(MemPage *pPage, int flags){
assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
assert( sqlite3PagerGetData(pPage->pDbPage) == data );
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
if( pBt->btsFlags & BTS_FAST_SECURE ){
memset(&data[hdr], 0, pBt->usableSize - hdr);
}
@@ -72874,7 +72874,7 @@ static int btreeGetPage(
DbPage *pDbPage;
assert( flags==0 || flags==PAGER_GET_NOCONTENT || flags==PAGER_GET_READONLY );
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, flags);
if( rc ) return rc;
*ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);
@@ -72888,7 +72888,7 @@ static int btreeGetPage(
*/
static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
DbPage *pDbPage;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
pDbPage = sqlite3PagerLookup(pBt->pPager, pgno);
if( pDbPage ){
return btreePageFromDbPage(pDbPage, pgno, pBt);
@@ -72920,7 +72920,7 @@ static int getAndInitPage(
int rc;
DbPage *pDbPage;
MemPage *pPage;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
if( pgno>btreePagecount(pBt) ){
*ppPage = 0;
@@ -72959,7 +72959,7 @@ static void releasePageNotNull(MemPage *pPage){
assert( pPage->pDbPage!=0 );
assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
sqlite3PagerUnrefNotNull(pPage->pDbPage);
}
static void releasePage(MemPage *pPage){
@@ -72972,7 +72972,7 @@ static void releasePageOne(MemPage *pPage){
assert( pPage->pDbPage!=0 );
assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
sqlite3PagerUnrefPageOne(pPage->pDbPage);
}
@@ -73019,7 +73019,7 @@ static void pageReinit(DbPage *pData){
pPage = (MemPage *)sqlite3PagerGetExtra(pData);
assert( sqlite3PagerPageRefcount(pData)>0 );
if( pPage->isInit ){
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
pPage->isInit = 0;
if( sqlite3PagerPageRefcount(pData)>1 ){
/* pPage might not be a btree page; it might be an overflow page
@@ -73039,7 +73039,7 @@ static void pageReinit(DbPage *pData){
static int btreeInvokeBusyHandler(void *pArg){
BtShared *pBt = (BtShared*)pArg;
assert( pBt->db );
- assert( sqlite_nio_sqlite3_mutex_held(pBt->db->mutex) );
+ assert( sqlite3_mutex_held(pBt->db->mutex) );
return sqlite3InvokeBusyHandler(&pBt->db->busyHandler);
}
@@ -73095,7 +73095,7 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
assert( db!=0 );
assert( pVfs!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
assert( (flags&0xff)==flags ); /* flags fit in 8 bits */
/* Only a BTREE_SINGLE database can be BTREE_UNORDERED */
@@ -73186,7 +73186,7 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
else{
/* In debug mode, we mark all persistent databases as sharable
** even when they are not. This exercises the locking code and
- ** gives more opportunity for asserts(sqlite_nio_sqlite3_mutex_held())
+ ** gives more opportunity for asserts(sqlite3_mutex_held())
** statements to find locking problems.
*/
p->sharable = 1;
@@ -73352,7 +73352,7 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
}
}
if( mutexOpen ){
- assert( sqlite_nio_sqlite3_mutex_held(mutexOpen) );
+ assert( sqlite3_mutex_held(mutexOpen) );
sqlite_nio_sqlite3_mutex_leave(mutexOpen);
}
assert( rc!=SQLITE_OK || sqlite3BtreeConnectionCount(*ppBtree)>0 );
@@ -73371,7 +73371,7 @@ static int removeFromSharingList(BtShared *pBt){
BtShared *pList;
int removed = 0;
- assert( sqlite_nio_sqlite3_mutex_notheld(pBt->mutex) );
+ assert( sqlite3_mutex_notheld(pBt->mutex) );
MUTEX_LOGIC( pMainMtx = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN); )
sqlite_nio_sqlite3_mutex_enter(pMainMtx);
pBt->nRef--;
@@ -73456,7 +73456,7 @@ SQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){
BtShared *pBt = p->pBt;
/* Close all cursors opened via this handle. */
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
/* Verify that no other cursors have this Btree open */
@@ -73520,7 +73520,7 @@ SQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){
*/
SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){
BtShared *pBt = p->pBt;
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
sqlite3PagerSetCachesize(pBt->pPager, mxPage);
sqlite3BtreeLeave(p);
@@ -73540,7 +73540,7 @@ SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){
SQLITE_PRIVATE int sqlite3BtreeSetSpillSize(Btree *p, int mxPage){
BtShared *pBt = p->pBt;
int res;
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
res = sqlite3PagerSetSpillsize(pBt->pPager, mxPage);
sqlite3BtreeLeave(p);
@@ -73554,7 +73554,7 @@ SQLITE_PRIVATE int sqlite3BtreeSetSpillSize(Btree *p, int mxPage){
*/
SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
BtShared *pBt = p->pBt;
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
sqlite3PagerSetMmapLimit(pBt->pPager, szMmap);
sqlite3BtreeLeave(p);
@@ -73576,7 +73576,7 @@ SQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(
unsigned pgFlags /* Various PAGER_* flags */
){
BtShared *pBt = p->pBt;
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
sqlite3PagerSetFlags(pBt->pPager, pgFlags);
sqlite3BtreeLeave(p);
@@ -73653,7 +73653,7 @@ SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree *p){
*/
SQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p){
int n;
- assert( sqlite_nio_sqlite3_mutex_held(p->pBt->mutex) );
+ assert( sqlite3_mutex_held(p->pBt->mutex) );
n = p->pBt->pageSize - p->pBt->usableSize;
return n;
}
@@ -73815,7 +73815,7 @@ static int lockBtree(BtShared *pBt){
u32 nPage; /* Number of pages in the database */
u32 nPageFile = 0; /* Number of pages in the database file */
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert( pBt->pPage1==0 );
rc = sqlite3PagerSharedLock(pBt->pPager);
if( rc!=SQLITE_OK ) return rc;
@@ -74021,7 +74021,7 @@ static int countValidCursors(BtShared *pBt, int wrOnly){
** If there is a transaction in progress, this routine is a no-op.
*/
static void unlockBtreeIfUnused(BtShared *pBt){
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert( countValidCursors(pBt,0)==0 || pBt->inTransaction>TRANS_NONE );
if( pBt->inTransaction==TRANS_NONE && pBt->pPage1!=0 ){
MemPage *pPage1 = pBt->pPage1;
@@ -74042,7 +74042,7 @@ static int newDatabase(BtShared *pBt){
unsigned char *data;
int rc;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
if( pBt->nPage>0 ){
return SQLITE_OK;
}
@@ -74338,7 +74338,7 @@ static int setChildPtrmaps(MemPage *pPage){
BtShared *pBt = pPage->pBt;
Pgno pgno = pPage->pgno;
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
rc = pPage->isInit ? SQLITE_OK : btreeInitPage(pPage);
if( rc!=SQLITE_OK ) return rc;
nCell = pPage->nCell;
@@ -74377,7 +74377,7 @@ static int setChildPtrmaps(MemPage *pPage){
** overflow page in the list.
*/
static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
if( eType==PTRMAP_OVERFLOW2 ){
/* The pointer is always the first 4 bytes of the page in this case. */
@@ -74455,7 +74455,7 @@ static int relocatePage(
assert( eType==PTRMAP_OVERFLOW2 || eType==PTRMAP_OVERFLOW1 ||
eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE );
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert( pDbPage->pBt==pBt );
if( iDbPage<3 ) return SQLITE_CORRUPT_BKPT;
@@ -74538,7 +74538,7 @@ static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg, int bCommit){
Pgno nFreeList; /* Number of pages still on the free-list */
int rc;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert( iLastPg>nFin );
if( !PTRMAP_ISPAGE(pBt, iLastPg) && iLastPg!=PENDING_BYTE_PAGE(pBt) ){
@@ -74710,7 +74710,7 @@ static int autoVacuumCommit(Btree *p){
pPager = pBt->pPager;
VVA_ONLY( nRef = sqlite3PagerRefcount(pPager); )
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
invalidateAllOverflowCache(pBt);
assert(pBt->autoVacuum);
if( !pBt->incrVacuum ){
@@ -75494,7 +75494,7 @@ static int getOverflowPage(
MemPage *pPage = 0;
int rc = SQLITE_OK;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert(pPgnoNext);
#ifndef SQLITE_OMIT_AUTOVACUUM
@@ -75877,7 +75877,7 @@ static const void *fetchPayload(
int amt;
assert( pCur!=0 && pCur->iPage>=0 && pCur->pPage);
assert( pCur->eState==CURSOR_VALID );
- assert( sqlite_nio_sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( cursorOwnsBtShared(pCur) );
assert( pCur->ixpPage->nCell || CORRUPT_DB );
assert( pCur->info.nSize>0 );
@@ -76161,7 +76161,7 @@ SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){
int rc;
assert( cursorOwnsBtShared(pCur) );
- assert( sqlite_nio_sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
rc = moveToRoot(pCur);
if( rc==SQLITE_OK ){
assert( pCur->pPage->nCell>0 );
@@ -76216,7 +76216,7 @@ static SQLITE_NOINLINE int btreeLast(BtCursor *pCur, int *pRes){
}
SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor *pCur, int *pRes){
assert( cursorOwnsBtShared(pCur) );
- assert( sqlite_nio_sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
/* If the cursor already points to the last entry, this is a no-op. */
if( CURSOR_VALID==pCur->eState && (pCur->curFlags & BTCF_AtLast)!=0 ){
@@ -76259,7 +76259,7 @@ SQLITE_PRIVATE int sqlite3BtreeTableMoveto(
int rc;
assert( cursorOwnsBtShared(pCur) );
- assert( sqlite_nio_sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( pRes );
assert( pCur->pKeyInfo==0 );
assert( pCur->eState!=CURSOR_VALID || pCur->curIntKey!=0 );
@@ -76491,7 +76491,7 @@ SQLITE_PRIVATE int sqlite3BtreeIndexMoveto(
RecordCompare xRecordCompare;
assert( cursorOwnsBtShared(pCur) );
- assert( sqlite_nio_sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( pRes );
assert( pCur->pKeyInfo!=0 );
@@ -76738,7 +76738,7 @@ SQLITE_PRIVATE i64 sqlite3BtreeRowCountEst(BtCursor *pCur){
u8 i;
assert( cursorOwnsBtShared(pCur) );
- assert( sqlite_nio_sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
/* Currently this interface is only called by the OP_IfSizeBetween
** opcode and the OP_Count opcode with P3=1. In either case,
@@ -76972,7 +76972,7 @@ static int allocateBtreePage(
MemPage *pPrevTrunk = 0;
Pgno mxPage; /* Total size of the database file */
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert( eMode==BTALLOC_ANY || (nearby>0 && IfNotOmitAV(pBt->autoVacuum)) );
pPage1 = pBt->pPage1;
mxPage = btreePagecount(pBt);
@@ -77287,7 +77287,7 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
int rc; /* Return Code */
u32 nFree; /* Initial number of pages on free-list */
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert( CORRUPT_DB || iPage>1 );
assert( !pMemPage || pMemPage->pgno==iPage );
@@ -77433,7 +77433,7 @@ static SQLITE_NOINLINE int clearCellOverflow(
int nOvfl;
u32 ovflPageSize;
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pInfo->nLocal!=pInfo->nPayload );
testcase( pCell + pInfo->nSize == pPage->aDataEnd );
testcase( pCell + (pInfo->nSize-1) == pPage->aDataEnd );
@@ -77534,7 +77534,7 @@ static int fillInCell(
Pgno pgnoOvfl;
int nHeader;
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
/* pPage is not necessarily writeable since pCell might be auxiliary
** buffer space that is separate from the pPage buffer area */
@@ -77722,7 +77722,7 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
assert( idxnCell );
assert( CORRUPT_DB || sz==cellSize(pPage, idx) );
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->nFree>=0 );
data = pPage->aData;
ptr = &pPage->aCellIdx[2*idx];
@@ -77792,7 +77792,7 @@ static int insertCell(
assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) );
assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( sz==pPage->xCellSize(pPage, pCell) || CORRUPT_DB );
assert( pPage->nFree>=0 );
assert( iChild>0 );
@@ -77887,7 +77887,7 @@ static int insertCellFast(
assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) );
assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) );
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( sz==pPage->xCellSize(pPage, pCell) || CORRUPT_DB );
assert( pPage->nFree>=0 );
assert( pPage->nOverflow==0 );
@@ -78449,7 +78449,7 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
int rc; /* Return Code */
Pgno pgnoNew; /* Page number of pNew */
- assert( sqlite_nio_sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( sqlite3PagerIswriteable(pParent->pDbPage) );
assert( pPage->nOverflow==1 );
@@ -78717,7 +78717,7 @@ static int balance_nonroot(
memset(abDone, 0, sizeof(abDone));
memset(&b, 0, sizeof(b));
pBt = pParent->pBt;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
assert( sqlite3PagerIswriteable(pParent->pDbPage) );
/* At this point pParent may have at most one overflow cell. And if
@@ -79483,7 +79483,7 @@ static int balance_deeper(MemPage *pRoot, MemPage **ppChild){
BtShared *pBt = pRoot->pBt; /* The BTree */
assert( pRoot->nOverflow>0 );
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
/* Make pRoot, the root page of the b-tree, writable. Allocate a new
** page that will become the new right-child of pPage. Copy the contents
@@ -80651,7 +80651,7 @@ static int clearDatabasePage(
int hdr;
CellInfo info;
- assert( sqlite_nio_sqlite3_mutex_held(pBt->mutex) );
+ assert( sqlite3_mutex_held(pBt->mutex) );
if( pgno>btreePagecount(pBt) ){
return SQLITE_CORRUPT_PGNO(pgno);
}
@@ -81749,7 +81749,7 @@ SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *p){
** to describe the current transaction state of Btree p.
*/
SQLITE_PRIVATE int sqlite3BtreeTxnState(Btree *p){
- assert( p==0 || sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( p==0 || sqlite3_mutex_held(p->db->mutex) );
return p ? p->inTrans : 0;
}
@@ -81783,7 +81783,7 @@ SQLITE_PRIVATE int sqlite3BtreeCheckpoint(Btree *p, int eMode, int *pnLog, int *
*/
SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree *p){
assert( p );
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
return p->nBackup!=0;
}
@@ -81825,7 +81825,7 @@ SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *p, int nBytes, void(*xFree)(void
*/
SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *p){
int rc;
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
rc = querySharedCacheTableLock(p, SCHEMA_ROOT, READ_LOCK);
assert( rc==SQLITE_OK || rc==SQLITE_LOCKED_SHAREDCACHE );
@@ -81873,7 +81873,7 @@ SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
int rc;
assert( cursorOwnsBtShared(pCsr) );
- assert( sqlite_nio_sqlite3_mutex_held(pCsr->pBtree->db->mutex) );
+ assert( sqlite3_mutex_held(pCsr->pBtree->db->mutex) );
assert( pCsr->curFlags & BTCF_Incrblob );
rc = restoreCursorPosition(pCsr);
@@ -82679,7 +82679,7 @@ static SQLITE_NOINLINE void backupUpdate(
){
assert( p!=0 );
do{
- assert( sqlite_nio_sqlite3_mutex_held(p->pSrc->pBt->mutex) );
+ assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
if( !isFatalError(p->rc) && iPageiNext ){
/* The backup process p has already copied page iPage. But now it
** has been modified by a transaction on the source pager. Copy
@@ -82715,7 +82715,7 @@ SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, con
SQLITE_PRIVATE void sqlite3BackupRestart(sqlite3_backup *pBackup){
sqlite3_backup *p; /* Iterator variable */
for(p=pBackup; p; p=p->pNext){
- assert( sqlite_nio_sqlite3_mutex_held(p->pSrc->pBt->mutex) );
+ assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
p->iNext = 1;
}
}
@@ -82999,7 +82999,7 @@ SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){
if( pMem->enc==desiredEnc ){
return SQLITE_OK;
}
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
#ifdef SQLITE_OMIT_UTF16
return SQLITE_ERROR;
#else
@@ -83160,7 +83160,7 @@ static SQLITE_NOINLINE int vdbeMemAddTerminator(Mem *pMem){
*/
SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){
assert( pMem!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( !sqlite3VdbeMemIsRowSet(pMem) );
if( (pMem->flags & (MEM_Str|MEM_Blob))!=0 ){
if( ExpandBlob(pMem) ) return SQLITE_NOMEM;
@@ -83189,7 +83189,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
assert( (pMem->flags&MEM_Blob)!=0 || MemNullNochng(pMem) );
testcase( sqlite_nio_sqlite3_value_nochange(pMem) );
assert( !sqlite3VdbeMemIsRowSet(pMem) );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
/* Set nByte to the number of bytes required to store the expanded blob. */
nByte = pMem->n + pMem->u.nZero;
@@ -83215,7 +83215,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
*/
SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem *pMem){
assert( pMem!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
testcase( (pMem->flags & (MEM_Term|MEM_Str))==(MEM_Term|MEM_Str) );
testcase( (pMem->flags & (MEM_Term|MEM_Str))==0 );
if( (pMem->flags & (MEM_Term|MEM_Str))!=MEM_Str ){
@@ -83243,7 +83243,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, u8 enc, u8 bForce){
const int nByte = 32;
assert( pMem!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( !(pMem->flags&MEM_Zero) );
assert( !(pMem->flags&(MEM_Str|MEM_Blob)) );
assert( pMem->flags&(MEM_Int|MEM_Real|MEM_IntReal) );
@@ -83282,7 +83282,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){
assert( pMem->db!=0 );
assert( pFunc->xFinalize!=0 );
assert( (pMem->flags & MEM_Null)!=0 || pFunc==pMem->u.pDef );
- assert( sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( sqlite3_mutex_held(pMem->db->mutex) );
memset(&ctx, 0, sizeof(ctx));
memset(&t, 0, sizeof(t));
t.flags = MEM_Null;
@@ -83313,7 +83313,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemAggValue(Mem *pAccum, Mem *pOut, FuncDef *pFunc
assert( pFunc->xValue!=0 );
assert( (pAccum->flags & MEM_Null)!=0 || pFunc==pAccum->u.pDef );
assert( pAccum->db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(pAccum->db->mutex) );
+ assert( sqlite3_mutex_held(pAccum->db->mutex) );
memset(&ctx, 0, sizeof(ctx));
sqlite3VdbeMemSetNull(pOut);
ctx.pOut = pOut;
@@ -83335,7 +83335,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemAggValue(Mem *pAccum, Mem *pOut, FuncDef *pFunc
** entry point for releasing Mem resources.
*/
static SQLITE_NOINLINE void vdbeMemClearExternAndSetNull(Mem *p){
- assert( p->db==0 || sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( p->db==0 || sqlite3_mutex_held(p->db->mutex) );
assert( VdbeMemDynamic(p) );
if( p->flags&MEM_Agg ){
sqlite3VdbeMemFinalize(p, p->u.pDef);
@@ -83412,7 +83412,7 @@ static SQLITE_NOINLINE i64 memIntValue(const Mem *pMem){
SQLITE_PRIVATE i64 sqlite3VdbeIntValue(const Mem *pMem){
int flags;
assert( pMem!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( EIGHT_BYTE_ALIGNMENT(pMem) );
flags = pMem->flags;
if( flags & (MEM_Int|MEM_IntReal) ){
@@ -83441,7 +83441,7 @@ static SQLITE_NOINLINE double memRealValue(Mem *pMem){
}
SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem *pMem){
assert( pMem!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( EIGHT_BYTE_ALIGNMENT(pMem) );
if( pMem->flags & MEM_Real ){
return pMem->u.r;
@@ -83475,7 +83475,7 @@ SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){
assert( pMem!=0 );
assert( pMem->flags & (MEM_Real|MEM_IntReal) );
assert( !sqlite3VdbeMemIsRowSet(pMem) );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( EIGHT_BYTE_ALIGNMENT(pMem) );
if( pMem->flags & MEM_IntReal ){
@@ -83505,7 +83505,7 @@ SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){
*/
SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem *pMem){
assert( pMem!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( !sqlite3VdbeMemIsRowSet(pMem) );
assert( EIGHT_BYTE_ALIGNMENT(pMem) );
@@ -83520,7 +83520,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem *pMem){
*/
SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){
assert( pMem!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( EIGHT_BYTE_ALIGNMENT(pMem) );
pMem->u.r = sqlite3VdbeRealValue(pMem);
@@ -83572,7 +83572,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){
int rc;
sqlite3_int64 ix;
assert( (pMem->flags & (MEM_Blob|MEM_Str))!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
rc = sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);
if( ((rc==0 || rc==1) && sqlite3Atoi64(pMem->z, &ix, pMem->n, pMem->enc)<=1)
|| sqlite3RealSameAsInt(pMem->u.r, (ix = sqlite3RealToI64(pMem->u.r)))
@@ -83907,8 +83907,8 @@ SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
** pFrom contains an SQL NULL when this routine returns.
*/
SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
- assert( pFrom->db==0 || sqlite_nio_sqlite3_mutex_held(pFrom->db->mutex) );
- assert( pTo->db==0 || sqlite_nio_sqlite3_mutex_held(pTo->db->mutex) );
+ assert( pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex) );
+ assert( pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex) );
assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );
sqlite3VdbeMemRelease(pTo);
@@ -83951,7 +83951,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemSetStr(
u16 flags; /* New value for pMem->flags */
assert( pMem!=0 );
- assert( pMem->db==0 || sqlite_nio_sqlite3_mutex_held(pMem->db->mutex) );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( !sqlite3VdbeMemIsRowSet(pMem) );
assert( enc!=0 || n>=0 );
@@ -84106,7 +84106,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemFromBtreeZeroOffset(
*/
static SQLITE_NOINLINE const void *valueToText(sqlite3_value* pVal, u8 enc){
assert( pVal!=0 );
- assert( pVal->db==0 || sqlite_nio_sqlite3_mutex_held(pVal->db->mutex) );
+ assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );
assert( !sqlite3VdbeMemIsRowSet(pVal) );
assert( (pVal->flags & (MEM_Null))==0 );
@@ -84149,7 +84149,7 @@ static SQLITE_NOINLINE const void *valueToText(sqlite3_value* pVal, u8 enc){
*/
SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
if( !pVal ) return 0;
- assert( pVal->db==0 || sqlite_nio_sqlite3_mutex_held(pVal->db->mutex) );
+ assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );
assert( !sqlite3VdbeMemIsRowSet(pVal) );
if( (pVal->flags&(MEM_Str|MEM_Term))==(MEM_Str|MEM_Term) && pVal->enc==enc ){
@@ -86022,7 +86022,7 @@ SQLITE_PRIVATE VdbeOp *sqlite3VdbeAddOpList(
#if defined(SQLITE_ENABLE_STMT_SCANSTATUS)
/*
-** Add an entry to the array of counters managed by sqlite_nio_sqlite3_stmt_scanstatus().
+** Add an entry to the array of counters managed by sqlite3_stmt_scanstatus().
*/
SQLITE_PRIVATE void sqlite3VdbeScanStatus(
Vdbe *p, /* VM to add scanstatus() to */
@@ -86051,7 +86051,7 @@ SQLITE_PRIVATE void sqlite3VdbeScanStatus(
/*
** Add the range of instructions from addrStart to addrEnd (inclusive) to
-** the set of those corresponding to the sqlite_nio_sqlite3_stmt_scanstatus() counters
+** the set of those corresponding to the sqlite3_stmt_scanstatus() counters
** associated with the OP_Explain instruction at addrExplain. The
** sum of the sqlite3Hwtime() values for each of these instructions
** will be returned for SQLITE_SCANSTAT_NCYCLE requests.
@@ -88586,7 +88586,7 @@ SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe *p){
assert( p!=0 );
db = p->db;
assert( db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
sqlite3VdbeClearObject(db, p);
if( db->pnBytesFreed==0 ){
assert( p->ppVPrev!=0 );
@@ -90111,7 +90111,7 @@ SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(
** sqlite_nio_sqlite3_changes() on the database handle 'db'.
*/
SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *db, i64 nChange){
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
db->nChange = nChange;
db->nTotalChange += nChange;
}
@@ -90175,7 +90175,8 @@ SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff
assert( iVar>0 );
if( v ){
Mem *pMem = &v->aVar[iVar-1];
- assert( (v->db->flags & SQLITE_EnableQPSG)==0 );
+ assert( (v->db->flags & SQLITE_EnableQPSG)==0
+ || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 );
if( 0==(pMem->flags & MEM_Null) ){
sqlite3_value *pRet = sqlite3ValueNew(v->db);
if( pRet ){
@@ -90195,7 +90196,8 @@ SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff
*/
SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){
assert( iVar>0 );
- assert( (v->db->flags & SQLITE_EnableQPSG)==0 );
+ assert( (v->db->flags & SQLITE_EnableQPSG)==0
+ || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 );
if( iVar>=32 ){
v->expmask |= 0x80000000;
}else{
@@ -90402,7 +90404,7 @@ SQLITE_PRIVATE void sqlite3VdbePreUpdateHook(
** collating sequences are registered or if an authorizer function is
** added or changed.
*/
-SQLITE_API int sqlite_nio_sqlite3_expired(sqlite3_stmt *pStmt){
+SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){
Vdbe *p = (Vdbe*)pStmt;
return p==0 || p->expired;
}
@@ -90822,7 +90824,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_blob(
}
#endif
assert( n>=0 );
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
setResultStrOrError(pCtx, z, n, 0, xDel);
}
SQLITE_API void sqlite_nio_sqlite3_result_blob64(
@@ -90838,7 +90840,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_blob64(
return;
}
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
if( n>0x7fffffff ){
(void)invokeValueDestructor(z, xDel, pCtx);
}else{
@@ -90849,14 +90851,14 @@ SQLITE_API void sqlite_nio_sqlite3_result_double(sqlite3_context *pCtx, double r
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
sqlite3VdbeMemSetDouble(pCtx->pOut, rVal);
}
SQLITE_API void sqlite_nio_sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
pCtx->isError = SQLITE_ERROR;
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
}
@@ -90865,7 +90867,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_error16(sqlite3_context *pCtx, const v
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
pCtx->isError = SQLITE_ERROR;
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
}
@@ -90874,21 +90876,21 @@ SQLITE_API void sqlite_nio_sqlite3_result_int(sqlite3_context *pCtx, int iVal){
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal);
}
SQLITE_API void sqlite_nio_sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
sqlite3VdbeMemSetInt64(pCtx->pOut, iVal);
}
SQLITE_API void sqlite_nio_sqlite3_result_null(sqlite3_context *pCtx){
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
sqlite3VdbeMemSetNull(pCtx->pOut);
}
SQLITE_API void sqlite_nio_sqlite3_result_pointer(
@@ -90905,7 +90907,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_pointer(
}
#endif
pOut = pCtx->pOut;
- assert( sqlite_nio_sqlite3_mutex_held(pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pOut->db->mutex) );
sqlite3VdbeMemRelease(pOut);
pOut->flags = MEM_Null;
sqlite3VdbeMemSetPointer(pOut, pPtr, zPType, xDestructor);
@@ -90928,7 +90930,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_subtype(sqlite3_context *pCtx, unsigne
}
#endif /* SQLITE_STRICT_SUBTYPE */
pOut = pCtx->pOut;
- assert( sqlite_nio_sqlite3_mutex_held(pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pOut->db->mutex) );
pOut->eSubtype = eSubtype & 0xff;
pOut->flags |= MEM_Subtype;
}
@@ -90944,7 +90946,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_text(
return;
}
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
}
SQLITE_API void sqlite_nio_sqlite3_result_text64(
@@ -90960,7 +90962,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_text64(
return;
}
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
assert( xDel!=SQLITE_DYNAMIC );
if( enc!=SQLITE_UTF8 ){
if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
@@ -90980,7 +90982,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_text16(
int n,
void (*xDel)(void *)
){
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16NATIVE, xDel);
}
SQLITE_API void sqlite_nio_sqlite3_result_text16be(
@@ -90989,7 +90991,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_text16be(
int n,
void (*xDel)(void *)
){
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16BE, xDel);
}
SQLITE_API void sqlite_nio_sqlite3_result_text16le(
@@ -90998,7 +91000,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_text16le(
int n,
void (*xDel)(void *)
){
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16LE, xDel);
}
#endif /* SQLITE_OMIT_UTF16 */
@@ -91013,7 +91015,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_value(sqlite3_context *pCtx, sqlite3_v
}
#endif
pOut = pCtx->pOut;
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
sqlite3VdbeMemCopy(pOut, pValue);
sqlite3VdbeChangeEncoding(pOut, pCtx->enc);
if( sqlite3VdbeMemTooBig(pOut) ){
@@ -91030,7 +91032,7 @@ SQLITE_API int sqlite_nio_sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n
if( pCtx==0 ) return SQLITE_MISUSE_BKPT;
#endif
pOut = pCtx->pOut;
- assert( sqlite_nio_sqlite3_mutex_held(pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pOut->db->mutex) );
if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
sqlite_nio_sqlite3_result_error_toobig(pCtx);
return SQLITE_TOOBIG;
@@ -91061,7 +91063,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_error_toobig(sqlite3_context *pCtx){
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
pCtx->isError = SQLITE_TOOBIG;
sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
SQLITE_UTF8, SQLITE_STATIC);
@@ -91072,7 +91074,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_error_nomem(sqlite3_context *pCtx){
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
sqlite3VdbeMemSetNull(pCtx->pOut);
pCtx->isError = SQLITE_NOMEM_BKPT;
sqlite3OomFault(pCtx->pOut->db);
@@ -91084,7 +91086,7 @@ SQLITE_API void sqlite_nio_sqlite3_result_error_nomem(sqlite3_context *pCtx){
** test-control.
*/
SQLITE_PRIVATE void sqlite3ResultIntReal(sqlite3_context *pCtx){
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
if( pCtx->pOut->flags & MEM_Int ){
pCtx->pOut->flags &= ~MEM_Int;
pCtx->pOut->flags |= MEM_IntReal;
@@ -91506,7 +91508,7 @@ static SQLITE_NOINLINE void *createAggContext(sqlite3_context *p, int nByte){
*/
SQLITE_API void *sqlite_nio_sqlite3_aggregate_context(sqlite3_context *p, int nByte){
assert( p && p->pFunc && p->pFunc->xFinalize );
- assert( sqlite_nio_sqlite3_mutex_held(p->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(p->pOut->db->mutex) );
testcase( nByte<0 );
if( (p->pMem->flags & MEM_Agg)==0 ){
return createAggContext(p, nByte);
@@ -91531,7 +91533,7 @@ SQLITE_API void *sqlite_nio_sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg)
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx==0 ) return 0;
#endif
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
#if SQLITE_ENABLE_STAT4
if( pCtx->pVdbe==0 ) return 0;
#else
@@ -91569,7 +91571,7 @@ SQLITE_API void sqlite_nio_sqlite3_set_auxdata(
if( pCtx==0 ) return;
#endif
pVdbe= pCtx->pVdbe;
- assert( sqlite_nio_sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
#ifdef SQLITE_ENABLE_STAT4
if( pVdbe==0 ) goto failed;
#else
@@ -91613,7 +91615,7 @@ SQLITE_API void sqlite_nio_sqlite3_set_auxdata(
** implementations should keep their own counts within their aggregate
** context.
*/
-SQLITE_API int sqlite_nio_sqlite3_aggregate_count(sqlite3_context *p){
+SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){
assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize );
return p->pMem->n;
}
@@ -91726,7 +91728,7 @@ static void columnMallocFailure(sqlite3_stmt *pStmt)
Vdbe *p = (Vdbe *)pStmt;
if( p ){
assert( p->db!=0 );
- assert( sqlite_nio_sqlite3_mutex_held(p->db->mutex) );
+ assert( sqlite3_mutex_held(p->db->mutex) );
p->rc = sqlite3ApiExit(p->db, p->rc);
sqlite_nio_sqlite3_mutex_leave(p->db->mutex);
}
@@ -92313,7 +92315,7 @@ SQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *pFromStmt, sqlite3_stmt
** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
** SQLITE_OK is returned.
*/
-SQLITE_API int sqlite_nio_sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
+SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
Vdbe *pFrom = (Vdbe*)pFromStmt;
Vdbe *pTo = (Vdbe*)pToStmt;
if( pFrom->nVar!=pTo->nVar ){
@@ -92737,7 +92739,7 @@ SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppVa
/*
** Return status data for a single loop within query pStmt.
*/
-SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus_v2(
+SQLITE_API int sqlite3_stmt_scanstatus_v2(
sqlite3_stmt *pStmt, /* Prepared statement being queried */
int iScan, /* Index of loop to report on */
int iScanStatusOp, /* Which metric to return */
@@ -92891,19 +92893,19 @@ SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus_v2(
/*
** Return status data for a single loop within query pStmt.
*/
-SQLITE_API int sqlite_nio_sqlite3_stmt_scanstatus(
+SQLITE_API int sqlite3_stmt_scanstatus(
sqlite3_stmt *pStmt, /* Prepared statement being queried */
int iScan, /* Index of loop to report on */
int iScanStatusOp, /* Which metric to return */
void *pOut /* OUT: Write the answer here */
){
- return sqlite_nio_sqlite3_stmt_scanstatus_v2(pStmt, iScan, iScanStatusOp, 0, pOut);
+ return sqlite3_stmt_scanstatus_v2(pStmt, iScan, iScanStatusOp, 0, pOut);
}
/*
-** Zero all counters associated with the sqlite_nio_sqlite3_stmt_scanstatus() data.
+** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
*/
-SQLITE_API void sqlite_nio_sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
Vdbe *p = (Vdbe*)pStmt;
int ii;
for(ii=0; p!=0 && iinOp; ii++){
@@ -92929,7 +92931,7 @@ SQLITE_API void sqlite_nio_sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
*************************************************************************
**
** This file contains code used to insert the values of host parameters
-** (aka "wildcards") into the SQL text output by sqlite_nio_sqlite3_trace().
+** (aka "wildcards") into the SQL text output by sqlite3_trace().
**
** The Vdbe parse-tree explainer is also found here.
*/
@@ -101942,7 +101944,7 @@ case OP_Filter: { /* jump */
** Programs contain a single instance of this opcode as the very first
** opcode.
**
-** If tracing is enabled (by the sqlite_nio_sqlite3_trace()) interface, then
+** If tracing is enabled (by the sqlite3_trace()) interface, then
** the UTF-8 string contained in P4 is emitted on the trace callback.
** Or if P4 is blank, use the string returned by sqlite_nio_sqlite3_sql().
**
@@ -101966,7 +101968,7 @@ case OP_Init: { /* jump0 */
**
** This assert() provides evidence for:
** EVIDENCE-OF: R-50676-09860 The callback can compute the same text that
- ** would have been returned by the legacy sqlite_nio_sqlite3_trace() interface by
+ ** would have been returned by the legacy sqlite3_trace() interface by
** using the X argument when X begins with "--" and invoking
** sqlite_nio_sqlite3_expanded_sql(P) otherwise.
*/
@@ -106952,7 +106954,7 @@ static void extendFJMatch(
static SQLITE_NOINLINE int isValidSchemaTableName(
const char *zTab, /* Name as it appears in the SQL */
Table *pTab, /* The schema table we are trying to match */
- Schema *pSchema /* non-NULL if a database qualifier is present */
+ const char *zDb /* non-NULL if a database qualifier is present */
){
const char *zLegacy;
assert( pTab!=0 );
@@ -106963,7 +106965,7 @@ static SQLITE_NOINLINE int isValidSchemaTableName(
if( sqlite3StrICmp(zTab+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0 ){
return 1;
}
- if( pSchema==0 ) return 0;
+ if( zDb==0 ) return 0;
if( sqlite3StrICmp(zTab+7, &LEGACY_SCHEMA_TABLE[7])==0 ) return 1;
if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;
}else{
@@ -107146,7 +107148,7 @@ static int lookupName(
}
}else if( sqlite3StrICmp(zTab, pTab->zName)!=0 ){
if( pTab->tnum!=1 ) continue;
- if( !isValidSchemaTableName(zTab, pTab, pSchema) ) continue;
+ if( !isValidSchemaTableName(zTab, pTab, zDb) ) continue;
}
assert( ExprUseYTab(pExpr) );
if( IN_RENAME_OBJECT && pItem->zAlias ){
@@ -108878,6 +108880,9 @@ SQLITE_PRIVATE int sqlite3ResolveExprNames(
** Resolve all names for all expression in an expression list. This is
** just like sqlite3ResolveExprNames() except that it works for an expression
** list rather than a single expression.
+**
+** The return value is SQLITE_OK (0) for success or SQLITE_ERROR (1) for a
+** failure.
*/
SQLITE_PRIVATE int sqlite3ResolveExprListNames(
NameContext *pNC, /* Namespace to resolve expressions in. */
@@ -108886,7 +108891,7 @@ SQLITE_PRIVATE int sqlite3ResolveExprListNames(
int i;
int savedHasAgg = 0;
Walker w;
- if( pList==0 ) return WRC_Continue;
+ if( pList==0 ) return SQLITE_OK;
w.pParse = pNC->pParse;
w.xExprCallback = resolveExprStep;
w.xSelectCallback = resolveSelectStep;
@@ -108900,7 +108905,7 @@ SQLITE_PRIVATE int sqlite3ResolveExprListNames(
#if SQLITE_MAX_EXPR_DEPTH>0
w.pParse->nHeight += pExpr->nHeight;
if( sqlite3ExprCheckHeight(w.pParse, w.pParse->nHeight) ){
- return WRC_Abort;
+ return SQLITE_ERROR;
}
#endif
sqlite3WalkExprNN(&w, pExpr);
@@ -108917,10 +108922,10 @@ SQLITE_PRIVATE int sqlite3ResolveExprListNames(
(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg);
pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg);
}
- if( w.pParse->nErr>0 ) return WRC_Abort;
+ if( w.pParse->nErr>0 ) return SQLITE_ERROR;
}
pNC->ncFlags |= savedHasAgg;
- return WRC_Continue;
+ return SQLITE_OK;
}
/*
@@ -117459,7 +117464,7 @@ static int renameResolveTrigger(Parse *pParse){
/* ALWAYS() because if the table of the trigger does not exist, the
** error would have been hit before this point */
if( ALWAYS(pParse->pTriggerTab) ){
- rc = sqlite3ViewGetColumnNames(pParse, pParse->pTriggerTab);
+ rc = sqlite3ViewGetColumnNames(pParse, pParse->pTriggerTab)!=0;
}
/* Resolve symbols in WHEN clause */
@@ -120576,7 +120581,7 @@ static void attachFunc(
if( REOPEN_AS_MEMDB(db) ){
/* This is not a real ATTACH. Instead, this routine is being called
- ** from sqlite_nio_sqlite3_deserialize() to close database db->init.iDb and
+ ** from sqlite3_deserialize() to close database db->init.iDb and
** reopen it as a MemDB */
Btree *pNewBt = 0;
pVfs = sqlite_nio_sqlite3_vfs_find("memdb");
@@ -121102,7 +121107,7 @@ SQLITE_PRIVATE int sqlite3FixTriggerStep(
** May you share freely, never taking more than you give.
**
*************************************************************************
-** This file contains code used to implement the sqlite_nio_sqlite3_set_authorizer()
+** This file contains code used to implement the sqlite3_set_authorizer()
** API. This facility is an optional feature of the library. Embedded
** systems that do not need this facility may omit it by recompiling
** the library with -DSQLITE_OMIT_AUTHORIZATION=1
@@ -121160,7 +121165,7 @@ SQLITE_PRIVATE int sqlite3FixTriggerStep(
** Setting the auth function to NULL disables this hook. The default
** setting of the auth function is NULL.
*/
-SQLITE_API int sqlite_nio_sqlite3_set_authorizer(
+SQLITE_API int sqlite3_set_authorizer(
sqlite3 *db,
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
void *pArg
@@ -124428,8 +124433,9 @@ SQLITE_PRIVATE void sqlite3CreateView(
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
/*
** The Table structure pTable is really a VIEW. Fill in the names of
-** the columns of the view in the pTable structure. Return the number
-** of errors. If an error is seen leave an error message in pParse->zErrMsg.
+** the columns of the view in the pTable structure. Return non-zero if
+** there are errors. If an error is seen an error message is left
+** in pParse->zErrMsg.
*/
static SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){
Table *pSelTab; /* A fake table from which we get the result set */
@@ -124552,7 +124558,7 @@ static SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){
sqlite3DeleteColumnNames(db, pTable);
}
#endif /* SQLITE_OMIT_VIEW */
- return nErr;
+ return nErr + pParse->nErr;
}
SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
assert( pTable!=0 );
@@ -130365,7 +130371,7 @@ static void loadExt(sqlite3_context *context, int argc, sqlite3_value **argv){
char *zErrMsg = 0;
/* Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc
- ** flag is set. See the sqlite_nio_sqlite3_enable_load_extension() API.
+ ** flag is set. See the sqlite3_enable_load_extension() API.
*/
if( (db->flags & SQLITE_LoadExtFunc)==0 ){
sqlite_nio_sqlite3_result_error(context, "not authorized", -1);
@@ -130377,7 +130383,7 @@ static void loadExt(sqlite3_context *context, int argc, sqlite3_value **argv){
}else{
zProc = 0;
}
- if( zFile && sqlite_nio_sqlite3_load_extension(db, zFile, zProc, &zErrMsg) ){
+ if( zFile && sqlite3_load_extension(db, zFile, zProc, &zErrMsg) ){
sqlite_nio_sqlite3_result_error(context, zErrMsg, -1);
sqlite_nio_sqlite3_free(zErrMsg);
}
@@ -130598,12 +130604,12 @@ static void countStep(sqlite3_context *context, int argc, sqlite3_value **argv){
}
#ifndef SQLITE_OMIT_DEPRECATED
- /* The sqlite_nio_sqlite3_aggregate_count() function is deprecated. But just to make
+ /* The sqlite3_aggregate_count() function is deprecated. But just to make
** sure it still operates correctly, verify that its count agrees with our
** internal count when using count(*) and when the total count can be
** expressed as a 32-bit integer. */
assert( argc==1 || p==0 || p->n>0x7fffffff || p->bInverse
- || p->n==sqlite_nio_sqlite3_aggregate_count(context) );
+ || p->n==sqlite3_aggregate_count(context) );
#endif
}
static void countFinalize(sqlite3_context *context){
@@ -130850,6 +130856,8 @@ static void groupConcatValue(sqlite3_context *context){
sqlite_nio_sqlite3_result_error_toobig(context);
}else if( pAccum->accError==SQLITE_NOMEM ){
sqlite_nio_sqlite3_result_error_nomem(context);
+ }else if( pGCC->nAccum>0 && pAccum->nChar==0 ){
+ sqlite_nio_sqlite3_result_text(context, "", 1, SQLITE_STATIC);
}else{
const char *zText = sqlite_nio_sqlite3_str_value(pAccum);
sqlite_nio_sqlite3_result_text(context, zText, pAccum->nChar, SQLITE_TRANSIENT);
@@ -133604,6 +133612,7 @@ SQLITE_PRIVATE Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList
pRet->pSrc->nSrc = 1;
pRet->pPrior = pLeft->pPrior;
pRet->op = pLeft->op;
+ if( pRet->pPrior ) pRet->selFlags |= SF_Values;
pLeft->pPrior = 0;
pLeft->op = TK_SELECT;
assert( pLeft->pNext==0 );
@@ -136818,7 +136827,7 @@ typedef int (*sqlite3_loadext_entry)(
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
#define sqlite_nio_sqlite3_aggregate_context sqlite3_api->aggregate_context
#ifndef SQLITE_OMIT_DEPRECATED
-#define sqlite_nio_sqlite3_aggregate_count sqlite3_api->aggregate_count
+#define sqlite3_aggregate_count sqlite3_api->aggregate_count
#endif
#define sqlite_nio_sqlite3_bind_blob sqlite3_api->bind_blob
#define sqlite_nio_sqlite3_bind_double sqlite3_api->bind_double
@@ -136859,8 +136868,8 @@ typedef int (*sqlite3_loadext_entry)(
#define sqlite_nio_sqlite3_column_type sqlite3_api->column_type
#define sqlite_nio_sqlite3_column_value sqlite3_api->column_value
#define sqlite_nio_sqlite3_commit_hook sqlite3_api->commit_hook
-#define sqlite_nio_sqlite3_complete sqlite3_api->complete
-#define sqlite_nio_sqlite3_complete16 sqlite3_api->complete16
+#define sqlite3_complete sqlite3_api->complete
+#define sqlite3_complete16 sqlite3_api->complete16
#define sqlite_nio_sqlite3_create_collation sqlite3_api->create_collation
#define sqlite_nio_sqlite3_create_collation16 sqlite3_api->create_collation16
#define sqlite_nio_sqlite3_create_function sqlite3_api->create_function
@@ -136870,22 +136879,22 @@ typedef int (*sqlite3_loadext_entry)(
#define sqlite_nio_sqlite3_data_count sqlite3_api->data_count
#define sqlite_nio_sqlite3_db_handle sqlite3_api->db_handle
#define sqlite_nio_sqlite3_declare_vtab sqlite3_api->declare_vtab
-#define sqlite_nio_sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
+#define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
#define sqlite_nio_sqlite3_errcode sqlite3_api->errcode
#define sqlite_nio_sqlite3_errmsg sqlite3_api->errmsg
#define sqlite_nio_sqlite3_errmsg16 sqlite3_api->errmsg16
#define sqlite_nio_sqlite3_exec sqlite3_api->exec
#ifndef SQLITE_OMIT_DEPRECATED
-#define sqlite_nio_sqlite3_expired sqlite3_api->expired
+#define sqlite3_expired sqlite3_api->expired
#endif
#define sqlite_nio_sqlite3_finalize sqlite3_api->finalize
#define sqlite_nio_sqlite3_free sqlite3_api->free
#define sqlite_nio_sqlite3_free_table sqlite3_api->free_table
#define sqlite_nio_sqlite3_get_autocommit sqlite3_api->get_autocommit
#define sqlite_nio_sqlite3_get_auxdata sqlite3_api->get_auxdata
-#define sqlite_nio_sqlite3_get_table sqlite3_api->get_table
+#define sqlite3_get_table sqlite3_api->get_table
#ifndef SQLITE_OMIT_DEPRECATED
-#define sqlite_nio_sqlite3_global_recover sqlite3_api->global_recover
+#define sqlite3_global_recover sqlite3_api->global_recover
#endif
#define sqlite_nio_sqlite3_interrupt sqlite3_api->interruptx
#define sqlite_nio_sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
@@ -136899,8 +136908,8 @@ typedef int (*sqlite3_loadext_entry)(
#define sqlite_nio_sqlite3_prepare16 sqlite3_api->prepare16
#define sqlite_nio_sqlite3_prepare_v2 sqlite3_api->prepare_v2
#define sqlite_nio_sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
-#define sqlite_nio_sqlite3_profile sqlite3_api->profile
-#define sqlite_nio_sqlite3_progress_handler sqlite3_api->progress_handler
+#define sqlite3_profile sqlite3_api->profile
+#define sqlite3_progress_handler sqlite3_api->progress_handler
#define sqlite_nio_sqlite3_realloc sqlite3_api->realloc
#define sqlite_nio_sqlite3_reset sqlite3_api->reset
#define sqlite_nio_sqlite3_result_blob sqlite3_api->result_blob
@@ -136916,16 +136925,16 @@ typedef int (*sqlite3_loadext_entry)(
#define sqlite_nio_sqlite3_result_text16le sqlite3_api->result_text16le
#define sqlite_nio_sqlite3_result_value sqlite3_api->result_value
#define sqlite_nio_sqlite3_rollback_hook sqlite3_api->rollback_hook
-#define sqlite_nio_sqlite3_set_authorizer sqlite3_api->set_authorizer
+#define sqlite3_set_authorizer sqlite3_api->set_authorizer
#define sqlite_nio_sqlite3_set_auxdata sqlite3_api->set_auxdata
#define sqlite_nio_sqlite3_snprintf sqlite3_api->xsnprintf
#define sqlite_nio_sqlite3_step sqlite3_api->step
#define sqlite_nio_sqlite3_table_column_metadata sqlite3_api->table_column_metadata
-#define sqlite_nio_sqlite3_thread_cleanup sqlite3_api->thread_cleanup
+#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
#define sqlite_nio_sqlite3_total_changes sqlite3_api->total_changes
-#define sqlite_nio_sqlite3_trace sqlite3_api->trace
+#define sqlite3_trace sqlite3_api->trace
#ifndef SQLITE_OMIT_DEPRECATED
-#define sqlite_nio_sqlite3_transfer_bindings sqlite3_api->transfer_bindings
+#define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
#endif
#define sqlite_nio_sqlite3_update_hook sqlite3_api->update_hook
#define sqlite_nio_sqlite3_user_data sqlite3_api->user_data
@@ -137025,7 +137034,7 @@ typedef int (*sqlite3_loadext_entry)(
#define sqlite_nio_sqlite3_bind_blob64 sqlite3_api->bind_blob64
#define sqlite_nio_sqlite3_bind_text64 sqlite3_api->bind_text64
#define sqlite_nio_sqlite3_cancel_auto_extension sqlite3_api->cancel_auto_extension
-#define sqlite_nio_sqlite3_load_extension sqlite3_api->load_extension
+#define sqlite3_load_extension sqlite3_api->load_extension
#define sqlite_nio_sqlite3_malloc64 sqlite3_api->malloc64
#define sqlite_nio_sqlite3_msize sqlite3_api->msize
#define sqlite_nio_sqlite3_realloc64 sqlite3_api->realloc64
@@ -137048,7 +137057,7 @@ typedef int (*sqlite3_loadext_entry)(
/* Version 3.12.0 and later */
#define sqlite_nio_sqlite3_system_errno sqlite3_api->system_errno
/* Version 3.14.0 and later */
-#define sqlite_nio_sqlite3_trace_v2 sqlite3_api->trace_v2
+#define sqlite3_trace_v2 sqlite3_api->trace_v2
#define sqlite_nio_sqlite3_expanded_sql sqlite3_api->expanded_sql
/* Version 3.18.0 and later */
#define sqlite_nio_sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid
@@ -137112,8 +137121,8 @@ typedef int (*sqlite3_loadext_entry)(
#define sqlite_nio_sqlite3_vtab_in_next sqlite3_api->vtab_in_next
/* Version 3.39.0 and later */
#ifndef SQLITE_OMIT_DESERIALIZE
-#define sqlite_nio_sqlite3_deserialize sqlite3_api->deserialize
-#define sqlite_nio_sqlite3_serialize sqlite3_api->serialize
+#define sqlite3_deserialize sqlite3_api->deserialize
+#define sqlite3_serialize sqlite3_api->serialize
#endif
#define sqlite_nio_sqlite3_db_name sqlite3_api->db_name
/* Version 3.40.0 and later */
@@ -137164,7 +137173,7 @@ typedef int (*sqlite3_loadext_entry)(
#endif
#ifdef SQLITE_OMIT_AUTHORIZATION
-# define sqlite_nio_sqlite3_set_authorizer 0
+# define sqlite3_set_authorizer 0
#endif
#ifdef SQLITE_OMIT_UTF16
@@ -137173,7 +137182,7 @@ typedef int (*sqlite3_loadext_entry)(
# define sqlite_nio_sqlite3_column_decltype16 0
# define sqlite_nio_sqlite3_column_name16 0
# define sqlite_nio_sqlite3_column_text16 0
-# define sqlite_nio_sqlite3_complete16 0
+# define sqlite3_complete16 0
# define sqlite_nio_sqlite3_create_collation16 0
# define sqlite_nio_sqlite3_create_function16 0
# define sqlite_nio_sqlite3_errmsg16 0
@@ -137194,8 +137203,8 @@ typedef int (*sqlite3_loadext_entry)(
#endif
#ifdef SQLITE_OMIT_COMPLETE
-# define sqlite_nio_sqlite3_complete 0
-# define sqlite_nio_sqlite3_complete16 0
+# define sqlite3_complete 0
+# define sqlite3_complete16 0
#endif
#ifdef SQLITE_OMIT_DECLTYPE
@@ -137204,7 +137213,7 @@ typedef int (*sqlite3_loadext_entry)(
#endif
#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
-# define sqlite_nio_sqlite3_progress_handler 0
+# define sqlite3_progress_handler 0
#endif
#ifdef SQLITE_OMIT_VIRTUALTABLE
@@ -137217,17 +137226,17 @@ typedef int (*sqlite3_loadext_entry)(
#endif
#ifdef SQLITE_OMIT_SHARED_CACHE
-# define sqlite_nio_sqlite3_enable_shared_cache 0
+# define sqlite3_enable_shared_cache 0
#endif
#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)
-# define sqlite_nio_sqlite3_profile 0
-# define sqlite_nio_sqlite3_trace 0
+# define sqlite3_profile 0
+# define sqlite3_trace 0
#endif
#ifdef SQLITE_OMIT_GET_TABLE
# define sqlite_nio_sqlite3_free_table 0
-# define sqlite_nio_sqlite3_get_table 0
+# define sqlite3_get_table 0
#endif
#ifdef SQLITE_OMIT_INCRBLOB
@@ -137241,7 +137250,7 @@ typedef int (*sqlite3_loadext_entry)(
#endif
#if defined(SQLITE_OMIT_TRACE)
-# define sqlite_nio_sqlite3_trace_v2 0
+# define sqlite3_trace_v2 0
#endif
/*
@@ -137262,7 +137271,7 @@ typedef int (*sqlite3_loadext_entry)(
static const sqlite3_api_routines sqlite3Apis = {
sqlite_nio_sqlite3_aggregate_context,
#ifndef SQLITE_OMIT_DEPRECATED
- sqlite_nio_sqlite3_aggregate_count,
+ sqlite3_aggregate_count,
#else
0,
#endif
@@ -137305,8 +137314,8 @@ static const sqlite3_api_routines sqlite3Apis = {
sqlite_nio_sqlite3_column_type,
sqlite_nio_sqlite3_column_value,
sqlite_nio_sqlite3_commit_hook,
- sqlite_nio_sqlite3_complete,
- sqlite_nio_sqlite3_complete16,
+ sqlite3_complete,
+ sqlite3_complete16,
sqlite_nio_sqlite3_create_collation,
sqlite_nio_sqlite3_create_collation16,
sqlite_nio_sqlite3_create_function,
@@ -137315,13 +137324,13 @@ static const sqlite3_api_routines sqlite3Apis = {
sqlite_nio_sqlite3_data_count,
sqlite_nio_sqlite3_db_handle,
sqlite_nio_sqlite3_declare_vtab,
- sqlite_nio_sqlite3_enable_shared_cache,
+ sqlite3_enable_shared_cache,
sqlite_nio_sqlite3_errcode,
sqlite_nio_sqlite3_errmsg,
sqlite_nio_sqlite3_errmsg16,
sqlite_nio_sqlite3_exec,
#ifndef SQLITE_OMIT_DEPRECATED
- sqlite_nio_sqlite3_expired,
+ sqlite3_expired,
#else
0,
#endif
@@ -137330,8 +137339,8 @@ static const sqlite3_api_routines sqlite3Apis = {
sqlite_nio_sqlite3_free_table,
sqlite_nio_sqlite3_get_autocommit,
sqlite_nio_sqlite3_get_auxdata,
- sqlite_nio_sqlite3_get_table,
- 0, /* Was sqlite_nio_sqlite3_global_recover(), but that function is deprecated */
+ sqlite3_get_table,
+ 0, /* Was sqlite3_global_recover(), but that function is deprecated */
sqlite_nio_sqlite3_interrupt,
sqlite_nio_sqlite3_last_insert_rowid,
sqlite_nio_sqlite3_libversion,
@@ -137342,8 +137351,8 @@ static const sqlite3_api_routines sqlite3Apis = {
sqlite_nio_sqlite3_open16,
sqlite_nio_sqlite3_prepare,
sqlite_nio_sqlite3_prepare16,
- sqlite_nio_sqlite3_profile,
- sqlite_nio_sqlite3_progress_handler,
+ sqlite3_profile,
+ sqlite3_progress_handler,
sqlite_nio_sqlite3_realloc,
sqlite_nio_sqlite3_reset,
sqlite_nio_sqlite3_result_blob,
@@ -137359,20 +137368,20 @@ static const sqlite3_api_routines sqlite3Apis = {
sqlite_nio_sqlite3_result_text16le,
sqlite_nio_sqlite3_result_value,
sqlite_nio_sqlite3_rollback_hook,
- sqlite_nio_sqlite3_set_authorizer,
+ sqlite3_set_authorizer,
sqlite_nio_sqlite3_set_auxdata,
sqlite_nio_sqlite3_snprintf,
sqlite_nio_sqlite3_step,
sqlite_nio_sqlite3_table_column_metadata,
#ifndef SQLITE_OMIT_DEPRECATED
- sqlite_nio_sqlite3_thread_cleanup,
+ sqlite3_thread_cleanup,
#else
0,
#endif
sqlite_nio_sqlite3_total_changes,
- sqlite_nio_sqlite3_trace,
+ sqlite3_trace,
#ifndef SQLITE_OMIT_DEPRECATED
- sqlite_nio_sqlite3_transfer_bindings,
+ sqlite3_transfer_bindings,
#else
0,
#endif
@@ -137528,7 +137537,7 @@ static const sqlite3_api_routines sqlite3Apis = {
sqlite_nio_sqlite3_bind_blob64,
sqlite_nio_sqlite3_bind_text64,
sqlite_nio_sqlite3_cancel_auto_extension,
- sqlite_nio_sqlite3_load_extension,
+ sqlite3_load_extension,
sqlite_nio_sqlite3_malloc64,
sqlite_nio_sqlite3_msize,
sqlite_nio_sqlite3_realloc64,
@@ -137551,7 +137560,7 @@ static const sqlite3_api_routines sqlite3Apis = {
/* Version 3.12.0 and later */
sqlite_nio_sqlite3_system_errno,
/* Version 3.14.0 and later */
- sqlite_nio_sqlite3_trace_v2,
+ sqlite3_trace_v2,
sqlite_nio_sqlite3_expanded_sql,
/* Version 3.18.0 and later */
sqlite_nio_sqlite3_set_last_insert_rowid,
@@ -137631,8 +137640,8 @@ static const sqlite3_api_routines sqlite3Apis = {
#endif
/* Version 3.39.0 and later */
#ifndef SQLITE_OMIT_DESERIALIZE
- sqlite_nio_sqlite3_deserialize,
- sqlite_nio_sqlite3_serialize,
+ sqlite3_deserialize,
+ sqlite3_serialize,
#else
0,
0,
@@ -137703,7 +137712,7 @@ static int sqlite3LoadExtension(
/* Ticket #1863. To avoid a creating security problems for older
** applications that relink against newer versions of SQLite, the
** ability to run load_extension is turned off by default. One
- ** must call either sqlite_nio_sqlite3_enable_load_extension(db) or
+ ** must call either sqlite3_enable_load_extension(db) or
** sqlite_nio_sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, 0)
** to turn on extension loading.
*/
@@ -137726,7 +137735,7 @@ static int sqlite3LoadExtension(
*/
if( nMsg>SQLITE_MAX_PATHLEN ) goto extension_not_found;
- /* Do not allow sqlite_nio_sqlite3_load_extension() to link to a copy of the
+ /* Do not allow sqlite3_load_extension() to link to a copy of the
** running application, by passing in an empty filename. */
if( nMsg==0 ) goto extension_not_found;
@@ -137830,7 +137839,7 @@ static int sqlite3LoadExtension(
}
return SQLITE_ERROR;
}
-SQLITE_API int sqlite_nio_sqlite3_load_extension(
+SQLITE_API int sqlite3_load_extension(
sqlite3 *db, /* Load the extension into this database connection */
const char *zFile, /* Name of the shared library containing extension */
const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
@@ -137850,7 +137859,7 @@ SQLITE_API int sqlite_nio_sqlite3_load_extension(
*/
SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){
int i;
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
for(i=0; inExtension; i++){
sqlite3OsDlClose(db->pVfs, db->aExtension[i]);
}
@@ -137861,7 +137870,7 @@ SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){
** Enable or disable extension loading. Extension loading is disabled by
** default so as not to open security holes in older applications.
*/
-SQLITE_API int sqlite_nio_sqlite3_enable_load_extension(sqlite3 *db, int onoff){
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
#ifdef SQLITE_ENABLE_API_ARMOR
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
#endif
@@ -141895,7 +141904,7 @@ SQLITE_PRIVATE int sqlite3InitCallback(void *pInit, int argc, char **argv, char
assert( argc==5 );
UNUSED_PARAMETER2(NotUsed, argc);
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
db->mDbFlags |= DBFLAG_EncodingFixed;
if( argv==0 ) return 0; /* Might happen if EMPTY_RESULT_CALLBACKS are on */
pData->nInitRow++;
@@ -142008,7 +142017,7 @@ SQLITE_PRIVATE int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFl
assert( (db->mDbFlags & DBFLAG_SchemaKnownOk)==0 );
assert( iDb>=0 && iDbnDb );
assert( db->aDb[iDb].pSchema );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
assert( iDb==1 || sqlite3BtreeHoldsMutex(db->aDb[iDb].pBt) );
db->init.busy = 1;
@@ -142241,7 +142250,7 @@ SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
int i, rc;
int commit_internal = !(db->mDbFlags&DBFLAG_SchemaChange);
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
assert( sqlite3BtreeHoldsMutex(db->aDb[0].pBt) );
assert( db->init.busy==0 );
ENC(db) = SCHEMA_ENC(db);
@@ -142272,7 +142281,7 @@ SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
SQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse){
int rc = SQLITE_OK;
sqlite3 *db = pParse->db;
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
if( !db->init.busy ){
rc = sqlite3Init(db, &pParse->zErrMsg);
if( rc!=SQLITE_OK ){
@@ -142298,7 +142307,7 @@ static void schemaIsValid(Parse *pParse){
int cookie;
assert( pParse->checkSchema );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
for(iDb=0; iDbnDb; iDb++){
int openedTransaction = 0; /* True if a transaction is opened */
Btree *pBt = db->aDb[iDb].pBt; /* Btree database to read cookie from */
@@ -142355,7 +142364,7 @@ SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
** statements too, but it never hurts to play the odds) and
** -32768 will still fit into a 16-bit signed integer.
*/
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
if( pSchema ){
for(i=0; 1; i++){
assert( inDb );
@@ -142512,7 +142521,7 @@ static int sqlite3Prepare(
db->errCode = rc = SQLITE_NOMEM;
goto end_prepare;
}
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
/* For a long-term use prepared statement avoid the use of
** lookaside memory.
@@ -142690,11 +142699,11 @@ SQLITE_PRIVATE int sqlite3Reprepare(Vdbe *p){
sqlite3 *db;
u8 prepFlags;
- assert( sqlite_nio_sqlite3_mutex_held(sqlite3VdbeDb(p)->mutex) );
+ assert( sqlite3_mutex_held(sqlite3VdbeDb(p)->mutex) );
zSql = sqlite_nio_sqlite3_sql((sqlite3_stmt *)p);
assert( zSql!=0 ); /* Reprepare only called for prepare_v2() statements */
db = sqlite3VdbeDb(p);
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
prepFlags = sqlite3VdbePrepareFlags(p);
rc = sqlite3LockAndPrepare(db, zSql, -1, prepFlags, p, &pNew, 0);
if( rc ){
@@ -151513,7 +151522,7 @@ SQLITE_PRIVATE int sqlite3Select(
** May you share freely, never taking more than you give.
**
*************************************************************************
-** This file contains the sqlite_nio_sqlite3_get_table() and sqlite_nio_sqlite3_free_table()
+** This file contains the sqlite3_get_table() and sqlite_nio_sqlite3_free_table()
** interface routines. These are just wrappers around the main
** interface routine of sqlite_nio_sqlite3_exec().
**
@@ -151525,7 +151534,7 @@ SQLITE_PRIVATE int sqlite3Select(
#ifndef SQLITE_OMIT_GET_TABLE
/*
-** This structure is used to pass data from sqlite_nio_sqlite3_get_table() through
+** This structure is used to pass data from sqlite3_get_table() through
** to the callback function is uses to build the result.
*/
typedef struct TabResult {
@@ -151543,7 +151552,7 @@ typedef struct TabResult {
** is to fill in the TabResult structure appropriately, allocating new
** memory as necessary.
*/
-static int sqlite_nio_sqlite3_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
+static int sqlite3_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
TabResult *p = (TabResult*)pArg; /* Result accumulator */
int need; /* Slots needed in p->azResult[] */
int i; /* Loop counter */
@@ -151578,7 +151587,7 @@ static int sqlite_nio_sqlite3_get_table_cb(void *pArg, int nCol, char **argv, ch
}else if( (int)p->nColumn!=nCol ){
sqlite_nio_sqlite3_free(p->zErrMsg);
p->zErrMsg = sqlite_nio_sqlite3_mprintf(
- "sqlite_nio_sqlite3_get_table() called with two or more incompatible queries"
+ "sqlite3_get_table() called with two or more incompatible queries"
);
p->rc = SQLITE_ERROR;
return 1;
@@ -151617,7 +151626,7 @@ static int sqlite_nio_sqlite3_get_table_cb(void *pArg, int nCol, char **argv, ch
** Instead, the entire table should be passed to sqlite_nio_sqlite3_free_table() when
** the calling procedure is finished using it.
*/
-SQLITE_API int sqlite_nio_sqlite3_get_table(
+SQLITE_API int sqlite3_get_table(
sqlite3 *db, /* The database on which the SQL executes */
const char *zSql, /* The SQL to be executed */
char ***pazResult, /* Write the result table here */
@@ -151647,7 +151656,7 @@ SQLITE_API int sqlite_nio_sqlite3_get_table(
return SQLITE_NOMEM_BKPT;
}
res.azResult[0] = 0;
- rc = sqlite_nio_sqlite3_exec(db, zSql, sqlite_nio_sqlite3_get_table_cb, &res, pzErrMsg);
+ rc = sqlite_nio_sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
res.azResult[0] = SQLITE_INT_TO_PTR(res.nData);
if( (rc&0xff)==SQLITE_ABORT ){
@@ -151684,10 +151693,10 @@ SQLITE_API int sqlite_nio_sqlite3_get_table(
}
/*
-** This routine frees the space the sqlite_nio_sqlite3_get_table() malloced.
+** This routine frees the space the sqlite3_get_table() malloced.
*/
SQLITE_API void sqlite_nio_sqlite3_free_table(
- char **azResult /* Result returned from sqlite_nio_sqlite3_get_table() */
+ char **azResult /* Result returned from sqlite3_get_table() */
){
if( azResult ){
int i, n;
@@ -155659,7 +155668,7 @@ SQLITE_PRIVATE void sqlite3VtabDisconnect(sqlite3 *db, Table *p){
assert( IsVirtual(p) );
assert( sqlite3BtreeHoldsAllMutexes(db) );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
for(ppVTab=&p->u.vtab.p; *ppVTab; ppVTab=&(*ppVTab)->pNext){
if( (*ppVTab)->db==db ){
@@ -155696,7 +155705,7 @@ SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3 *db){
VTable *p = db->pDisconnect;
assert( sqlite3BtreeHoldsAllMutexes(db) );
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
if( p ){
db->pDisconnect = 0;
@@ -157683,7 +157692,7 @@ SQLITE_PRIVATE int sqlite3WhereExplainBloomFilter(
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
/*
** Configure the VM passed as the first argument with an
-** sqlite_nio_sqlite3_stmt_scanstatus() entry corresponding to the scan used to
+** sqlite3_stmt_scanstatus() entry corresponding to the scan used to
** implement level pLvl. Argument pSrclist is a pointer to the FROM
** clause that the scan reads data from.
**
@@ -162992,7 +163001,7 @@ static int termCanDriveIndex(
**
** CREATE AUTOMATIC INDEX ON () [WHERE ]
**
-** This is only required if sqlite_nio_sqlite3_stmt_scanstatus() is enabled, to
+** This is only required if sqlite3_stmt_scanstatus() is enabled, to
** associate an SQLITE_SCANSTAT_NCYCLE and SQLITE_SCANSTAT_NLOOP
** values with. In order to avoid breaking legacy code and test cases,
** the OP_Explain is not added if this is an EXPLAIN QUERY PLAN command.
@@ -166069,7 +166078,9 @@ static int whereLoopAddBtree(
" according to whereIsCoveringIndex()\n", pProbe->zName));
}
}
- }else if( m==0 ){
+ }else if( m==0
+ && (HasRowid(pTab) || pWInfo->pSelect!=0 || sqlite3FaultSim(700))
+ ){
WHERETRACE(0x200,
("-> %s a covering index according to bitmasks\n",
pProbe->zName, m==0 ? "is" : "is not"));
@@ -167958,6 +167969,10 @@ static void showAllWhereLoops(WhereInfo *pWInfo, WhereClause *pWC){
** the right-most table of a subquery that was flattened into the
** main query and that subquery was the right-hand operand of an
** inner join that held an ON or USING clause.
+** 6) The ORDER BY clause has 63 or fewer terms
+** 7) The omit-noop-join optimization is enabled.
+**
+** Items (1), (6), and (7) are checked by the caller.
**
** For example, given:
**
@@ -168371,6 +168386,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
if( pOrderBy && pOrderBy->nExpr>=BMS ){
pOrderBy = 0;
wctrlFlags &= ~WHERE_WANT_DISTINCT;
+ wctrlFlags |= WHERE_KEEP_ALL_JOINS; /* Disable omit-noop-join opt */
}
/* The number of tables in the FROM clause is limited by the number of
@@ -168671,10 +168687,10 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
** in-line sqlite3WhereCodeOneLoopStart() for performance reasons.
*/
notReady = ~(Bitmask)0;
- if( pWInfo->nLevel>=2
- && pResultSet!=0 /* these two combine to guarantee */
- && 0==(wctrlFlags & WHERE_AGG_DISTINCT) /* condition (1) above */
- && OptimizationEnabled(db, SQLITE_OmitNoopJoin)
+ if( pWInfo->nLevel>=2 /* Must be a join, or this opt8n is pointless */
+ && pResultSet!=0 /* Condition (1) */
+ && 0==(wctrlFlags & (WHERE_AGG_DISTINCT|WHERE_KEEP_ALL_JOINS)) /* (1),(6) */
+ && OptimizationEnabled(db, SQLITE_OmitNoopJoin) /* (7) */
){
notReady = whereOmitNoopJoin(pWInfo, notReady);
nTabList = pWInfo->nLevel;
@@ -168994,26 +169010,6 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
}
#endif
-#ifdef SQLITE_DEBUG
-/*
-** Return true if cursor iCur is opened by instruction k of the
-** bytecode. Used inside of assert() only.
-*/
-static int cursorIsOpen(Vdbe *v, int iCur, int k){
- while( k>=0 ){
- VdbeOp *pOp = sqlite3VdbeGetOp(v,k--);
- if( pOp->p1!=iCur ) continue;
- if( pOp->opcode==OP_Close ) return 0;
- if( pOp->opcode==OP_OpenRead ) return 1;
- if( pOp->opcode==OP_OpenWrite ) return 1;
- if( pOp->opcode==OP_OpenDup ) return 1;
- if( pOp->opcode==OP_OpenAutoindex ) return 1;
- if( pOp->opcode==OP_OpenEphemeral ) return 1;
- }
- return 0;
-}
-#endif /* SQLITE_DEBUG */
-
/*
** Generate the end of the WHERE loop. See comments on
** sqlite3WhereBegin() for additional information.
@@ -169313,16 +169309,10 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
** reference. Verify that this is harmless - that the
** table being referenced really is open.
*/
-#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC
- assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0
- || cursorIsOpen(v,pOp->p1,k)
- || pOp->opcode==OP_Offset
- );
-#else
- assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0
- || cursorIsOpen(v,pOp->p1,k)
- );
-#endif
+ if( pLoop->wsFlags & WHERE_IDX_ONLY ){
+ sqlite3ErrorMsg(pParse, "internal query planner error");
+ pParse->rc = SQLITE_INTERNAL;
+ }
}
}else if( pOp->opcode==OP_Rowid ){
pOp->p1 = pLevel->iIdxCur;
@@ -172593,9 +172583,9 @@ static void updateDeleteLimitError(
break;
}
}
- if( (p->selFlags & SF_MultiValue)==0 &&
- (mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0 &&
- cnt>mxSelect
+ if( (p->selFlags & (SF_MultiValue|SF_Values))==0
+ && (mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0
+ && cnt>mxSelect
){
sqlite3ErrorMsg(pParse, "too many terms in compound SELECT");
}
@@ -179391,7 +179381,7 @@ SQLITE_PRIVATE char *sqlite3Normalize(
*************************************************************************
** An tokenizer for SQL
**
-** This file contains C code that implements the sqlite_nio_sqlite3_complete() API.
+** This file contains C code that implements the sqlite3_complete() API.
** This code used to be part of the tokenizer.c source file. But by
** separating it out, the code will be automatically omitted from
** static links that do not use it.
@@ -179414,7 +179404,7 @@ SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[];
/*
-** Token types used by the sqlite_nio_sqlite3_complete() routine. See the header
+** Token types used by the sqlite3_complete() routine. See the header
** comments on that procedure for additional information.
*/
#define tkSEMI 0
@@ -179481,7 +179471,7 @@ SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[];
** to recognize the end of a trigger can be omitted. All we have to do
** is look for a semicolon that is not part of an string or comment.
*/
-SQLITE_API int sqlite_nio_sqlite3_complete(const char *zSql){
+SQLITE_API int sqlite3_complete(const char *zSql){
u8 state = 0; /* Current state, using numbers defined in header comment */
u8 token; /* Value of the next token */
@@ -179642,11 +179632,11 @@ SQLITE_API int sqlite_nio_sqlite3_complete(const char *zSql){
#ifndef SQLITE_OMIT_UTF16
/*
-** This routine is the same as the sqlite_nio_sqlite3_complete() routine described
+** This routine is the same as the sqlite3_complete() routine described
** above, except that the parameter is required to be UTF-16 encoded, not
** UTF-8.
*/
-SQLITE_API int sqlite_nio_sqlite3_complete16(const void *zSql){
+SQLITE_API int sqlite3_complete16(const void *zSql){
sqlite3_value *pVal;
char const *zSql8;
int rc;
@@ -179659,7 +179649,7 @@ SQLITE_API int sqlite_nio_sqlite3_complete16(const void *zSql){
sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);
if( zSql8 ){
- rc = sqlite_nio_sqlite3_complete(zSql8);
+ rc = sqlite3_complete(zSql8);
}else{
rc = SQLITE_NOMEM_BKPT;
}
@@ -181016,7 +181006,7 @@ static void disconnectAllVtab(sqlite3 *db){
*/
static int connectionIsBusy(sqlite3 *db){
int j;
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
if( db->pVdbe ) return 1;
for(j=0; jnDb; j++){
Btree *pBt = db->aDb[j].pBt;
@@ -181264,7 +181254,7 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
int i;
int inTrans = 0;
int schemaChange;
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
sqlite3BeginBenignMalloc();
/* Obtain all b-tree mutexes before making any calls to BtreeRollback().
@@ -181583,7 +181573,7 @@ SQLITE_API int sqlite_nio_sqlite3_busy_handler(
** given callback function with the given argument. The progress callback will
** be invoked every nOps opcodes.
*/
-SQLITE_API void sqlite_nio_sqlite3_progress_handler(
+SQLITE_API void sqlite3_progress_handler(
sqlite3 *db,
int nOps,
int (*xProgress)(void*),
@@ -181681,7 +181671,7 @@ SQLITE_PRIVATE int sqlite3CreateFunc(
FuncDef *p;
int extraFlags;
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
assert( xValue==0 || xSFunc==0 );
if( zFunctionName==0 /* Must have a valid name */
|| (xSFunc!=0 && xFinal!=0) /* Not both xSFunc and xFinal */
@@ -181989,7 +181979,7 @@ SQLITE_API int sqlite_nio_sqlite3_overload_function(
** SQL statement.
*/
#ifndef SQLITE_OMIT_DEPRECATED
-SQLITE_API void *sqlite_nio_sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
+SQLITE_API void *sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
void *pOld;
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -182010,7 +182000,7 @@ SQLITE_API void *sqlite_nio_sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const
/* Register a trace callback using the version-2 interface.
*/
-SQLITE_API int sqlite_nio_sqlite3_trace_v2(
+SQLITE_API int sqlite3_trace_v2(
sqlite3 *db, /* Trace this connection */
unsigned mTrace, /* Mask of events to be traced */
int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */
@@ -182040,7 +182030,7 @@ SQLITE_API int sqlite_nio_sqlite3_trace_v2(
** profile is a pointer to a function that is invoked at the conclusion of
** each SQL statement that is run.
*/
-SQLITE_API void *sqlite_nio_sqlite3_profile(
+SQLITE_API void *sqlite3_profile(
sqlite3 *db,
void (*xProfile)(void*,const char*,sqlite_uint64),
void *pArg
@@ -182373,7 +182363,7 @@ SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3 *db, int iDb, int eMode, int *pnLog
int i; /* Used to iterate through attached dbs */
int bBusy = 0; /* True if SQLITE_BUSY has been encountered */
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
assert( !pnLog || *pnLog==-1 );
assert( !pnCkpt || *pnCkpt==-1 );
testcase( iDb==SQLITE_MAX_ATTACHED ); /* See forum post a006d86f72 */
@@ -182564,7 +182554,7 @@ static int createCollation(
CollSeq *pColl;
int enc2;
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
/* If SQLITE_UTF16 is specified as the encoding type, transform this
** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the
@@ -183610,7 +183600,7 @@ SQLITE_API int sqlite_nio_sqlite3_set_clientdata(
** This function is now an anachronism. It used to be used to recover from a
** malloc() failure, but SQLite now does this automatically.
*/
-SQLITE_API int sqlite_nio_sqlite3_global_recover(void){
+SQLITE_API int sqlite3_global_recover(void){
return SQLITE_OK;
}
#endif
@@ -183686,7 +183676,7 @@ SQLITE_PRIVATE int sqlite3IoerrnomemError(int lineno){
** SQLite no longer uses thread-specific data so this routine is now a
** no-op. It is retained for historical compatibility.
*/
-SQLITE_API void sqlite_nio_sqlite3_thread_cleanup(void){
+SQLITE_API void sqlite3_thread_cleanup(void){
}
#endif
@@ -184699,7 +184689,7 @@ SQLITE_API int sqlite_nio_sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
** Obtain a snapshot handle for the snapshot of database zDb currently
** being read by handle db.
*/
-SQLITE_API int sqlite_nio_sqlite3_snapshot_get(
+SQLITE_API int sqlite3_snapshot_get(
sqlite3 *db,
const char *zDb,
sqlite3_snapshot **ppSnapshot
@@ -184735,7 +184725,7 @@ SQLITE_API int sqlite_nio_sqlite3_snapshot_get(
/*
** Open a read-transaction on the snapshot identified by pSnapshot.
*/
-SQLITE_API int sqlite_nio_sqlite3_snapshot_open(
+SQLITE_API int sqlite3_snapshot_open(
sqlite3 *db,
const char *zDb,
sqlite3_snapshot *pSnapshot
@@ -184791,7 +184781,7 @@ SQLITE_API int sqlite_nio_sqlite3_snapshot_open(
** Recover as many snapshots as possible from the wal file associated with
** schema zDb of database db.
*/
-SQLITE_API int sqlite_nio_sqlite3_snapshot_recover(sqlite3 *db, const char *zDb){
+SQLITE_API int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb){
int rc = SQLITE_ERROR;
#ifndef SQLITE_OMIT_WAL
int iDb;
@@ -184820,9 +184810,9 @@ SQLITE_API int sqlite_nio_sqlite3_snapshot_recover(sqlite3 *db, const char *zDb)
}
/*
-** Free a snapshot handle obtained from sqlite_nio_sqlite3_snapshot_get().
+** Free a snapshot handle obtained from sqlite3_snapshot_get().
*/
-SQLITE_API void sqlite_nio_sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
+SQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
sqlite_nio_sqlite3_free(pSnapshot);
}
#endif /* SQLITE_ENABLE_SNAPSHOT */
@@ -184912,7 +184902,7 @@ SQLITE_API const char *sqlite_nio_sqlite3_compileoption_get(int N){
*/
#define assertMutexHeld() \
- assert( sqlite_nio_sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN)) )
+ assert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN)) )
/*
** Head of a linked list of all sqlite3 objects created by this process
@@ -226792,7 +226782,7 @@ static void xPreUpdate(
sqlite3_session *pSession;
int nDb = sqlite3Strlen30(zDb);
- assert( sqlite_nio_sqlite3_mutex_held(db->mutex) );
+ assert( sqlite3_mutex_held(db->mutex) );
(void)iKey1;
(void)iKey2;
@@ -237009,7 +236999,11 @@ static int sqlite3Fts5ExprNew(
}
sqlite_nio_sqlite3_free(sParse.apPhrase);
- *pzErr = sParse.zErr;
+ if( 0==*pzErr ){
+ *pzErr = sParse.zErr;
+ }else{
+ sqlite_nio_sqlite3_free(sParse.zErr);
+ }
return sParse.rc;
}
@@ -239137,6 +239131,7 @@ static Fts5ExprNode *sqlite3Fts5ParseImplicitAnd(
assert( pRight->eType==FTS5_STRING
|| pRight->eType==FTS5_TERM
|| pRight->eType==FTS5_EOF
+ || (pRight->eType==FTS5_AND && pParse->bPhraseToAnd)
);
if( pLeft->eType==FTS5_AND ){
@@ -251304,6 +251299,7 @@ static int fts5UpdateMethod(
rc = SQLITE_ERROR;
}else{
rc = fts5SpecialDelete(pTab, apVal);
+ bUpdateOrDelete = 1;
}
}else{
rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]);
@@ -252478,14 +252474,16 @@ static int sqlite3Fts5GetTokenizer(
if( pMod==0 ){
assert( nArg>0 );
rc = SQLITE_ERROR;
- *pzErr = sqlite_nio_sqlite3_mprintf("no such tokenizer: %s", azArg[0]);
+ if( pzErr ) *pzErr = sqlite_nio_sqlite3_mprintf("no such tokenizer: %s", azArg[0]);
}else{
rc = pMod->x.xCreate(
pMod->pUserData, (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->pTok
);
pConfig->pTokApi = &pMod->x;
if( rc!=SQLITE_OK ){
- if( pzErr ) *pzErr = sqlite_nio_sqlite3_mprintf("error in tokenizer constructor");
+ if( pzErr && rc!=SQLITE_NOMEM ){
+ *pzErr = sqlite_nio_sqlite3_mprintf("error in tokenizer constructor");
+ }
}else{
pConfig->ePattern = sqlite3Fts5TokenizerPattern(
pMod->x.xCreate, pConfig->pTok
@@ -252544,7 +252542,7 @@ static void fts5SourceIdFunc(
){
assert( nArg==0 );
UNUSED_PARAM2(nArg, apUnused);
- sqlite_nio_sqlite3_result_text(pCtx, "fts5: 2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e", -1, SQLITE_TRANSIENT);
+ sqlite_nio_sqlite3_result_text(pCtx, "fts5: 2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33", -1, SQLITE_TRANSIENT);
}
/*
@@ -252579,17 +252577,23 @@ static int fts5IntegrityMethod(
assert( pzErr!=0 && *pzErr==0 );
UNUSED_PARAM(isQuick);
+ assert( pTab->p.pConfig->pzErrmsg==0 );
+ pTab->p.pConfig->pzErrmsg = pzErr;
rc = sqlite3Fts5StorageIntegrity(pTab->pStorage, 0);
- if( (rc&0xff)==SQLITE_CORRUPT ){
- *pzErr = sqlite_nio_sqlite3_mprintf("malformed inverted index for FTS5 table %s.%s",
- zSchema, zTabname);
- rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM;
- }else if( rc!=SQLITE_OK ){
- *pzErr = sqlite_nio_sqlite3_mprintf("unable to validate the inverted index for"
- " FTS5 table %s.%s: %s",
- zSchema, zTabname, sqlite_nio_sqlite3_errstr(rc));
+ if( *pzErr==0 && rc!=SQLITE_OK ){
+ if( (rc&0xff)==SQLITE_CORRUPT ){
+ *pzErr = sqlite_nio_sqlite3_mprintf("malformed inverted index for FTS5 table %s.%s",
+ zSchema, zTabname);
+ rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM;
+ }else{
+ *pzErr = sqlite_nio_sqlite3_mprintf("unable to validate the inverted index for"
+ " FTS5 table %s.%s: %s",
+ zSchema, zTabname, sqlite_nio_sqlite3_errstr(rc));
+ }
}
+
sqlite3Fts5IndexCloseReader(pTab->p.pIndex);
+ pTab->p.pConfig->pzErrmsg = 0;
return rc;
}
@@ -254023,7 +254027,7 @@ static int fts5AsciiCreate(
int i;
memset(p, 0, sizeof(AsciiTokenizer));
memcpy(p->aTokenChar, aAsciiTokenChar, sizeof(aAsciiTokenChar));
- for(i=0; rc==SQLITE_OK && ibFold = 1;
pNew->iFoldParam = 0;
- for(i=0; rc==SQLITE_OK && iiFoldParam!=0 && pNew->bFold==0 ){
rc = SQLITE_ERROR;
diff --git a/Sources/CSQLite/version.txt b/Sources/CSQLite/version.txt
index bb8839b..8f17d77 100644
--- a/Sources/CSQLite/version.txt
+++ b/Sources/CSQLite/version.txt
@@ -1,2 +1,2 @@
-// This directory is generated from SQLite sources downloaded from https://sqlite.org/2024/sqlite-amalgamation-3460000.zip
-3.46.0
+// This directory is generated from SQLite sources downloaded from https://sqlite.org/2024/sqlite-amalgamation-3460100.zip
+3.46.1