Skip to content

Commit 846fea6

Browse files
committedSep 4, 2024·
Update amalgamation code to 3.46.1
1 parent 3c0390b commit 846fea6

File tree

2 files changed

+5630
-3561
lines changed

2 files changed

+5630
-3561
lines changed
 

‎sqlite3-binding.c

+5,537-3,538
Large diffs are not rendered by default.

‎sqlite3-binding.h

+93-23
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ extern "C" {
147147
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
148148
** [sqlite_version()] and [sqlite_source_id()].
149149
*/
150-
#define SQLITE_VERSION "3.45.1"
151-
#define SQLITE_VERSION_NUMBER 3045001
152-
#define SQLITE_SOURCE_ID "2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257cc467a"
150+
#define SQLITE_VERSION "3.46.1"
151+
#define SQLITE_VERSION_NUMBER 3046001
152+
#define SQLITE_SOURCE_ID "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33"
153153

154154
/*
155155
** CAPI3REF: Run-Time Library Version Numbers
@@ -421,6 +421,8 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
421421
** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
422422
** <li> The application must not modify the SQL statement text passed into
423423
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
424+
** <li> The application must not dereference the arrays or string pointers
425+
** passed as the 3rd and 4th callback parameters after it returns.
424426
** </ul>
425427
*/
426428
SQLITE_API int sqlite3_exec(
@@ -763,11 +765,11 @@ struct sqlite3_file {
763765
** </ul>
764766
** xLock() upgrades the database file lock. In other words, xLock() moves the
765767
** database file lock in the direction NONE toward EXCLUSIVE. The argument to
766-
** xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never
768+
** xLock() is always one of SHARED, RESERVED, PENDING, or EXCLUSIVE, never
767769
** SQLITE_LOCK_NONE. If the database file lock is already at or above the
768770
** requested lock, then the call to xLock() is a no-op.
769771
** xUnlock() downgrades the database file lock to either SHARED or NONE.
770-
* If the lock is already at or below the requested lock state, then the call
772+
** If the lock is already at or below the requested lock state, then the call
771773
** to xUnlock() is a no-op.
772774
** The xCheckReservedLock() method checks whether any database connection,
773775
** either in this process or in some other process, is holding a RESERVED,
@@ -2142,6 +2144,22 @@ struct sqlite3_mem_methods {
21422144
** configuration setting is never used, then the default maximum is determined
21432145
** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that
21442146
** compile-time option is not set, then the default maximum is 1073741824.
2147+
**
2148+
** [[SQLITE_CONFIG_ROWID_IN_VIEW]]
2149+
** <dt>SQLITE_CONFIG_ROWID_IN_VIEW
2150+
** <dd>The SQLITE_CONFIG_ROWID_IN_VIEW option enables or disables the ability
2151+
** for VIEWs to have a ROWID. The capability can only be enabled if SQLite is
2152+
** compiled with -DSQLITE_ALLOW_ROWID_IN_VIEW, in which case the capability
2153+
** defaults to on. This configuration option queries the current setting or
2154+
** changes the setting to off or on. The argument is a pointer to an integer.
2155+
** If that integer initially holds a value of 1, then the ability for VIEWs to
2156+
** have ROWIDs is activated. If the integer initially holds zero, then the
2157+
** ability is deactivated. Any other initial value for the integer leaves the
2158+
** setting unchanged. After changes, if any, the integer is written with
2159+
** a 1 or 0, if the ability for VIEWs to have ROWIDs is on or off. If SQLite
2160+
** is compiled without -DSQLITE_ALLOW_ROWID_IN_VIEW (which is the usual and
2161+
** recommended case) then the integer is always filled with zero, regardless
2162+
** if its initial value.
21452163
** </dl>
21462164
*/
21472165
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
@@ -2173,6 +2191,7 @@ struct sqlite3_mem_methods {
21732191
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
21742192
#define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
21752193
#define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */
2194+
#define SQLITE_CONFIG_ROWID_IN_VIEW 30 /* int* */
21762195

21772196
/*
21782197
** CAPI3REF: Database Connection Configuration Options
@@ -3287,8 +3306,8 @@ SQLITE_API int sqlite3_set_authorizer(
32873306
#define SQLITE_RECURSIVE 33 /* NULL NULL */
32883307

32893308
/*
3290-
** CAPI3REF: Tracing And Profiling Functions
3291-
** METHOD: sqlite3
3309+
** CAPI3REF: Deprecated Tracing And Profiling Functions
3310+
** DEPRECATED
32923311
**
32933312
** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
32943313
** instead of the routines described here.
@@ -6869,6 +6888,12 @@ SQLITE_API int sqlite3_autovacuum_pages(
68696888
** The exceptions defined in this paragraph might change in a future
68706889
** release of SQLite.
68716890
**
6891+
** Whether the update hook is invoked before or after the
6892+
** corresponding change is currently unspecified and may differ
6893+
** depending on the type of change. Do not rely on the order of the
6894+
** hook call with regards to the final result of the operation which
6895+
** triggers the hook.
6896+
**
68726897
** The update hook implementation must not do anything that will modify
68736898
** the database connection that invoked the update hook. Any actions
68746899
** to modify the database connection must be deferred until after the
@@ -8339,7 +8364,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
83398364
** The sqlite3_keyword_count() interface returns the number of distinct
83408365
** keywords understood by SQLite.
83418366
**
8342-
** The sqlite3_keyword_name(N,Z,L) interface finds the N-th keyword and
8367+
** The sqlite3_keyword_name(N,Z,L) interface finds the 0-based N-th keyword and
83438368
** makes *Z point to that keyword expressed as UTF8 and writes the number
83448369
** of bytes in the keyword into *L. The string that *Z points to is not
83458370
** zero-terminated. The sqlite3_keyword_name(N,Z,L) routine returns
@@ -9918,24 +9943,45 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
99189943
** <li value="2"><p>
99199944
** ^(If the sqlite3_vtab_distinct() interface returns 2, that means
99209945
** that the query planner does not need the rows returned in any particular
9921-
** order, as long as rows with the same values in all "aOrderBy" columns
9922-
** are adjacent.)^ ^(Furthermore, only a single row for each particular
9923-
** combination of values in the columns identified by the "aOrderBy" field
9924-
** needs to be returned.)^ ^It is always ok for two or more rows with the same
9925-
** values in all "aOrderBy" columns to be returned, as long as all such rows
9926-
** are adjacent. ^The virtual table may, if it chooses, omit extra rows
9927-
** that have the same value for all columns identified by "aOrderBy".
9928-
** ^However omitting the extra rows is optional.
9946+
** order, as long as rows with the same values in all columns identified
9947+
** by "aOrderBy" are adjacent.)^ ^(Furthermore, when two or more rows
9948+
** contain the same values for all columns identified by "colUsed", all but
9949+
** one such row may optionally be omitted from the result.)^
9950+
** The virtual table is not required to omit rows that are duplicates
9951+
** over the "colUsed" columns, but if the virtual table can do that without
9952+
** too much extra effort, it could potentially help the query to run faster.
99299953
** This mode is used for a DISTINCT query.
99309954
** <li value="3"><p>
9931-
** ^(If the sqlite3_vtab_distinct() interface returns 3, that means
9932-
** that the query planner needs only distinct rows but it does need the
9933-
** rows to be sorted.)^ ^The virtual table implementation is free to omit
9934-
** rows that are identical in all aOrderBy columns, if it wants to, but
9935-
** it is not required to omit any rows. This mode is used for queries
9955+
** ^(If the sqlite3_vtab_distinct() interface returns 3, that means the
9956+
** virtual table must return rows in the order defined by "aOrderBy" as
9957+
** if the sqlite3_vtab_distinct() interface had returned 0. However if
9958+
** two or more rows in the result have the same values for all columns
9959+
** identified by "colUsed", then all but one such row may optionally be
9960+
** omitted.)^ Like when the return value is 2, the virtual table
9961+
** is not required to omit rows that are duplicates over the "colUsed"
9962+
** columns, but if the virtual table can do that without
9963+
** too much extra effort, it could potentially help the query to run faster.
9964+
** This mode is used for queries
99369965
** that have both DISTINCT and ORDER BY clauses.
99379966
** </ol>
99389967
**
9968+
** <p>The following table summarizes the conditions under which the
9969+
** virtual table is allowed to set the "orderByConsumed" flag based on
9970+
** the value returned by sqlite3_vtab_distinct(). This table is a
9971+
** restatement of the previous four paragraphs:
9972+
**
9973+
** <table border=1 cellspacing=0 cellpadding=10 width="90%">
9974+
** <tr>
9975+
** <td valign="top">sqlite3_vtab_distinct() return value
9976+
** <td valign="top">Rows are returned in aOrderBy order
9977+
** <td valign="top">Rows with the same value in all aOrderBy columns are adjacent
9978+
** <td valign="top">Duplicates over all colUsed columns may be omitted
9979+
** <tr><td>0<td>yes<td>yes<td>no
9980+
** <tr><td>1<td>no<td>yes<td>no
9981+
** <tr><td>2<td>no<td>yes<td>yes
9982+
** <tr><td>3<td>yes<td>yes<td>yes
9983+
** </table>
9984+
**
99399985
** ^For the purposes of comparing virtual table output values to see if the
99409986
** values are same value for sorting purposes, two NULL values are considered
99419987
** to be the same. In other words, the comparison operator is "IS"
@@ -11980,6 +12026,30 @@ SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const c
1198012026
*/
1198112027
SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);
1198212028

12029+
/*
12030+
** CAPI3REF: Add A Single Change To A Changegroup
12031+
** METHOD: sqlite3_changegroup
12032+
**
12033+
** This function adds the single change currently indicated by the iterator
12034+
** passed as the second argument to the changegroup object. The rules for
12035+
** adding the change are just as described for [sqlite3changegroup_add()].
12036+
**
12037+
** If the change is successfully added to the changegroup, SQLITE_OK is
12038+
** returned. Otherwise, an SQLite error code is returned.
12039+
**
12040+
** The iterator must point to a valid entry when this function is called.
12041+
** If it does not, SQLITE_ERROR is returned and no change is added to the
12042+
** changegroup. Additionally, the iterator must not have been opened with
12043+
** the SQLITE_CHANGESETAPPLY_INVERT flag. In this case SQLITE_ERROR is also
12044+
** returned.
12045+
*/
12046+
SQLITE_API int sqlite3changegroup_add_change(
12047+
sqlite3_changegroup*,
12048+
sqlite3_changeset_iter*
12049+
);
12050+
12051+
12052+
1198312053
/*
1198412054
** CAPI3REF: Obtain A Composite Changeset From A Changegroup
1198512055
** METHOD: sqlite3_changegroup
@@ -12784,8 +12854,8 @@ struct Fts5PhraseIter {
1278412854
** EXTENSION API FUNCTIONS
1278512855
**
1278612856
** xUserData(pFts):
12787-
** Return a copy of the context pointer the extension function was
12788-
** registered with.
12857+
** Return a copy of the pUserData pointer passed to the xCreateFunction()
12858+
** API when the extension function was registered.
1278912859
**
1279012860
** xColumnTotalSize(pFts, iCol, pnToken):
1279112861
** If parameter iCol is less than zero, set output variable *pnToken

0 commit comments

Comments
 (0)
Please sign in to comment.