Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 35be1d1

Browse files
committed
[[ SQLite ]] Updated to 3.8.3.1
[[ SQLite ]] Added ENABLE_FTS4 option (didn't seem to previously be needed...) [[ SQLite ]] Added missing RTREE option to windows vcproj.
1 parent 34b009b commit 35be1d1

7 files changed

Lines changed: 5228 additions & 4730 deletions

File tree

libsqlite/Android.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LOCAL_SRC_FILES := \
1414
LOCAL_C_INCLUDES := \
1515
$(LOCAL_PATH)/include
1616

17-
LOCAL_CFLAGS := -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARANTHESIS -DSQLITE_ENABLE_RTREE -Dfdatasync=fsync
17+
LOCAL_CFLAGS := -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARANTHESIS -DSQLITE_ENABLE_RTREE -Dfdatasync=fsync
1818

1919
include $(BUILD_STATIC_LIBRARY)
2020

libsqlite/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include ../../rules/environment.linux.makefile
55

66
SOURCES=dataset.cpp qry_dat.cpp sqlite3.c sqlitedataset.cpp sqlitedecode.cpp
77

8-
CUSTOM_DEFINES=SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS3_PARANTHESIS SQLITE_ENABLE_RTREE
8+
CUSTOM_DEFINES=SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS4 SQLITE_ENABLE_FTS3_PARANTHESIS SQLITE_ENABLE_RTREE
99

1010
CUSTOM_INCLUDES=
1111

libsqlite/include/sqlite3.h

Lines changed: 72 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ extern "C" {
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110-
#define SQLITE_VERSION "3.8.2"
111-
#define SQLITE_VERSION_NUMBER 3008002
112-
#define SQLITE_SOURCE_ID "2013-12-06 14:53:30 27392118af4c38c5203a04b8013e1afdb1cebd0d"
110+
#define SQLITE_VERSION "3.8.3.1"
111+
#define SQLITE_VERSION_NUMBER 3008003
112+
#define SQLITE_SOURCE_ID "2014-02-11 14:52:19 ea3317a4803d71d88183b29f1d3086f46d68a00e"
113113

114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
@@ -491,6 +491,7 @@ SQLITE_API int sqlite3_exec(
491491
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
492492
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
493493
#define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3<<8))
494+
#define SQLITE_READONLY_DBMOVED (SQLITE_READONLY | (4<<8))
494495
#define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8))
495496
#define SQLITE_CONSTRAINT_CHECK (SQLITE_CONSTRAINT | (1<<8))
496497
#define SQLITE_CONSTRAINT_COMMITHOOK (SQLITE_CONSTRAINT | (2<<8))
@@ -558,7 +559,8 @@ SQLITE_API int sqlite3_exec(
558559
** after reboot following a crash or power loss, the only bytes in a
559560
** file that were written at the application level might have changed
560561
** and that adjacent bytes, even bytes within the same sector are
561-
** guaranteed to be unchanged.
562+
** guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
563+
** flag indicate that a file cannot be deleted when open.
562564
*/
563565
#define SQLITE_IOCAP_ATOMIC 0x00000001
564566
#define SQLITE_IOCAP_ATOMIC512 0x00000002
@@ -789,15 +791,29 @@ struct sqlite3_io_methods {
789791
** additional information.
790792
**
791793
** <li>[[SQLITE_FCNTL_SYNC_OMITTED]]
792-
** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by
793-
** SQLite and sent to all VFSes in place of a call to the xSync method
794-
** when the database connection has [PRAGMA synchronous] set to OFF.)^
795-
** Some specialized VFSes need this signal in order to operate correctly
796-
** when [PRAGMA synchronous | PRAGMA synchronous=OFF] is set, but most
797-
** VFSes do not need this signal and should silently ignore this opcode.
798-
** Applications should not call [sqlite3_file_control()] with this
799-
** opcode as doing so may disrupt the operation of the specialized VFSes
800-
** that do require it.
794+
** No longer in use.
795+
**
796+
** <li>[[SQLITE_FCNTL_SYNC]]
797+
** The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and
798+
** sent to the VFS immediately before the xSync method is invoked on a
799+
** database file descriptor. Or, if the xSync method is not invoked
800+
** because the user has configured SQLite with
801+
** [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place
802+
** of the xSync method. In most cases, the pointer argument passed with
803+
** this file-control is NULL. However, if the database file is being synced
804+
** as part of a multi-database commit, the argument points to a nul-terminated
805+
** string containing the transactions master-journal file name. VFSes that
806+
** do not need this signal should silently ignore this opcode. Applications
807+
** should not call [sqlite3_file_control()] with this opcode as doing so may
808+
** disrupt the operation of the specialized VFSes that do require it.
809+
**
810+
** <li>[[SQLITE_FCNTL_COMMIT_PHASETWO]]
811+
** The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite
812+
** and sent to the VFS after a transaction has been committed immediately
813+
** but before the database is unlocked. VFSes that do not need this signal
814+
** should silently ignore this opcode. Applications should not call
815+
** [sqlite3_file_control()] with this opcode as doing so may disrupt the
816+
** operation of the specialized VFSes that do require it.
801817
**
802818
** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]]
803819
** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic
@@ -921,6 +937,12 @@ struct sqlite3_io_methods {
921937
** SQLite stack may generate instances of this file control if
922938
** the [SQLITE_USE_FCNTL_TRACE] compile-time option is enabled.
923939
**
940+
** <li>[[SQLITE_FCNTL_HAS_MOVED]]
941+
** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
942+
** pointer to an integer and it writes a boolean into that integer depending
943+
** on whether or not the file has been renamed, moved, or deleted since it
944+
** was first opened.
945+
**
924946
** </ul>
925947
*/
926948
#define SQLITE_FCNTL_LOCKSTATE 1
@@ -941,6 +963,9 @@ struct sqlite3_io_methods {
941963
#define SQLITE_FCNTL_TEMPFILENAME 16
942964
#define SQLITE_FCNTL_MMAP_SIZE 18
943965
#define SQLITE_FCNTL_TRACE 19
966+
#define SQLITE_FCNTL_HAS_MOVED 20
967+
#define SQLITE_FCNTL_SYNC 21
968+
#define SQLITE_FCNTL_COMMIT_PHASETWO 22
944969

945970
/*
946971
** CAPI3REF: Mutex Handle
@@ -2375,11 +2400,13 @@ SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
23752400
** applications to access the same PRNG for other purposes.
23762401
**
23772402
** ^A call to this routine stores N bytes of randomness into buffer P.
2403+
** ^If N is less than one, then P can be a NULL pointer.
23782404
**
2379-
** ^The first time this routine is invoked (either internally or by
2380-
** the application) the PRNG is seeded using randomness obtained
2381-
** from the xRandomness method of the default [sqlite3_vfs] object.
2382-
** ^On all subsequent invocations, the pseudo-randomness is generated
2405+
** ^If this routine has not been previously called or if the previous
2406+
** call had N less than one, then the PRNG is seeded using randomness
2407+
** obtained from the xRandomness method of the default [sqlite3_vfs] object.
2408+
** ^If the previous call to this routine had an N of 1 or more then
2409+
** the pseudo-randomness is generated
23832410
** internally and without recourse to the [sqlite3_vfs] xRandomness
23842411
** method.
23852412
*/
@@ -2539,6 +2566,7 @@ SQLITE_API int sqlite3_set_authorizer(
25392566
#define SQLITE_FUNCTION 31 /* NULL Function Name */
25402567
#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */
25412568
#define SQLITE_COPY 0 /* No longer used */
2569+
#define SQLITE_RECURSIVE 33 /* NULL NULL */
25422570

25432571
/*
25442572
** CAPI3REF: Tracing And Profiling Functions
@@ -3957,15 +3985,24 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
39573985
**
39583986
** ^The fourth parameter, eTextRep, specifies what
39593987
** [SQLITE_UTF8 | text encoding] this SQL function prefers for
3960-
** its parameters. Every SQL function implementation must be able to work
3961-
** with UTF-8, UTF-16le, or UTF-16be. But some implementations may be
3962-
** more efficient with one encoding than another. ^An application may
3963-
** invoke sqlite3_create_function() or sqlite3_create_function16() multiple
3964-
** times with the same function but with different values of eTextRep.
3988+
** its parameters. The application should set this parameter to
3989+
** [SQLITE_UTF16LE] if the function implementation invokes
3990+
** [sqlite3_value_text16le()] on an input, or [SQLITE_UTF16BE] if the
3991+
** implementation invokes [sqlite3_value_text16be()] on an input, or
3992+
** [SQLITE_UTF16] if [sqlite3_value_text16()] is used, or [SQLITE_UTF8]
3993+
** otherwise. ^The same SQL function may be registered multiple times using
3994+
** different preferred text encodings, with different implementations for
3995+
** each encoding.
39653996
** ^When multiple implementations of the same function are available, SQLite
39663997
** will pick the one that involves the least amount of data conversion.
3967-
** If there is only a single implementation which does not care what text
3968-
** encoding is used, then the fourth argument should be [SQLITE_ANY].
3998+
**
3999+
** ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC]
4000+
** to signal that the function will always return the same result given
4001+
** the same inputs within a single SQL statement. Most SQL functions are
4002+
** deterministic. The built-in [random()] SQL function is an example of a
4003+
** function that is not deterministic. The SQLite query planner is able to
4004+
** perform additional optimizations on deterministic functions, so use
4005+
** of the [SQLITE_DETERMINISTIC] flag is recommended where possible.
39694006
**
39704007
** ^(The fifth parameter is an arbitrary pointer. The implementation of the
39714008
** function can gain access to this pointer using [sqlite3_user_data()].)^
@@ -4051,9 +4088,19 @@ SQLITE_API int sqlite3_create_function_v2(
40514088
#define SQLITE_UTF16LE 2
40524089
#define SQLITE_UTF16BE 3
40534090
#define SQLITE_UTF16 4 /* Use native byte order */
4054-
#define SQLITE_ANY 5 /* sqlite3_create_function only */
4091+
#define SQLITE_ANY 5 /* Deprecated */
40554092
#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */
40564093

4094+
/*
4095+
** CAPI3REF: Function Flags
4096+
**
4097+
** These constants may be ORed together with the
4098+
** [SQLITE_UTF8 | preferred text encoding] as the fourth argument
4099+
** to [sqlite3_create_function()], [sqlite3_create_function16()], or
4100+
** [sqlite3_create_function_v2()].
4101+
*/
4102+
#define SQLITE_DETERMINISTIC 0x800
4103+
40574104
/*
40584105
** CAPI3REF: Deprecated Functions
40594106
** DEPRECATED

libsqlite/libsqlite-mobile.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@
184184
buildSettings = {
185185
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
186186
SQLITE_ENABLE_FTS3,
187+
SQLITE_ENABLE_FTS4,
187188
SQLITE_ENABLE_FTS3_PARANTHESIS,
188189
SQLITE_ENABLE_RTREE,
189190
);
@@ -196,6 +197,7 @@
196197
buildSettings = {
197198
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
198199
SQLITE_ENABLE_FTS3,
200+
SQLITE_ENABLE_FTS4,
199201
SQLITE_ENABLE_FTS3_PARANTHESIS,
200202
SQLITE_ENABLE_RTREE,
201203
);

libsqlite/libsqlite.vcproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
/>
4040
<Tool
4141
Name="VCCLCompilerTool"
42-
PreprocessorDefinitions="SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARANTHESIS;SQLITE_ENABLE_RTREE"
42+
PreprocessorDefinitions="SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS4;SQLITE_ENABLE_FTS3_PARANTHESIS;SQLITE_ENABLE_RTREE"
4343
MinimalRebuild="true"
4444
BasicRuntimeChecks="3"
4545
UsePrecompiledHeader="0"
@@ -98,7 +98,7 @@
9898
/>
9999
<Tool
100100
Name="VCCLCompilerTool"
101-
PreprocessorDefinitions="SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARANTHESIS"
101+
PreprocessorDefinitions="SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS4;SQLITE_ENABLE_FTS3_PARANTHESIS;SQLITE_ENABLE_RTREE"
102102
UsePrecompiledHeader="0"
103103
DebugInformationFormat="3"
104104
/>

libsqlite/libsqlite.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
buildSettings = {
164164
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
165165
SQLITE_ENABLE_FTS3,
166+
SQLITE_ENABLE_FTS4,
166167
SQLITE_ENABLE_FTS3_PARANTHESIS,
167168
SQLITE_ENABLE_RTREE,
168169
);
@@ -175,6 +176,7 @@
175176
buildSettings = {
176177
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
177178
SQLITE_ENABLE_FTS3,
179+
SQLITE_ENABLE_FTS4,
178180
SQLITE_ENABLE_FTS3_PARANTHESIS,
179181
SQLITE_ENABLE_RTREE,
180182
);

0 commit comments

Comments
 (0)