Fossil SCM

Update the built-in SQLite to 3.18.0

jan.nijtmans 2017-03-30 15:25 trunk
Commit 32b0065c58b5f3c3d9429aece0e5a074d5f65ac983257d53d7987cfa3a7a2f44
--- src/shell.c
+++ src/shell.c
@@ -2083,10 +2083,11 @@
20832083
** output onto the end of a ShellText object.
20842084
*/
20852085
static int captureOutputCallback(void *pArg, int nArg, char **azArg, char **az){
20862086
ShellText *p = (ShellText*)pArg;
20872087
int i;
2088
+ UNUSED_PARAMETER(az);
20882089
if( p->n ) appendText(p, "|", 0);
20892090
for(i=0; i<nArg; i++){
20902091
if( i ) appendText(p, ",", 0);
20912092
if( azArg[i] ) appendText(p, azArg[i], 0);
20922093
}
@@ -4683,11 +4684,18 @@
46834684
for(i=1; i<nArg; i++){
46844685
if( azArg[i][0]=='-' ){
46854686
const char *z = azArg[i]+1;
46864687
if( z[0]=='-' ) z++;
46874688
if( strcmp(z,"preserve-rowids")==0 ){
4689
+#ifdef SQLITE_OMIT_VIRTUALTABLE
4690
+ raw_printf(stderr, "The --preserve-rowids option is not compatible"
4691
+ " with SQLITE_OMIT_VIRTUALTABLE\n");
4692
+ rc = 1;
4693
+ goto meta_command_exit;
4694
+#else
46884695
ShellSetFlag(p, SHFLG_PreserveRowid);
4696
+#endif
46894697
}else
46904698
{
46914699
raw_printf(stderr, "Unknown option \"%s\" on \".dump\"\n", azArg[i]);
46924700
rc = 1;
46934701
goto meta_command_exit;
46944702
--- src/shell.c
+++ src/shell.c
@@ -2083,10 +2083,11 @@
2083 ** output onto the end of a ShellText object.
2084 */
2085 static int captureOutputCallback(void *pArg, int nArg, char **azArg, char **az){
2086 ShellText *p = (ShellText*)pArg;
2087 int i;
 
2088 if( p->n ) appendText(p, "|", 0);
2089 for(i=0; i<nArg; i++){
2090 if( i ) appendText(p, ",", 0);
2091 if( azArg[i] ) appendText(p, azArg[i], 0);
2092 }
@@ -4683,11 +4684,18 @@
4683 for(i=1; i<nArg; i++){
4684 if( azArg[i][0]=='-' ){
4685 const char *z = azArg[i]+1;
4686 if( z[0]=='-' ) z++;
4687 if( strcmp(z,"preserve-rowids")==0 ){
 
 
 
 
 
 
4688 ShellSetFlag(p, SHFLG_PreserveRowid);
 
4689 }else
4690 {
4691 raw_printf(stderr, "Unknown option \"%s\" on \".dump\"\n", azArg[i]);
4692 rc = 1;
4693 goto meta_command_exit;
4694
--- src/shell.c
+++ src/shell.c
@@ -2083,10 +2083,11 @@
2083 ** output onto the end of a ShellText object.
2084 */
2085 static int captureOutputCallback(void *pArg, int nArg, char **azArg, char **az){
2086 ShellText *p = (ShellText*)pArg;
2087 int i;
2088 UNUSED_PARAMETER(az);
2089 if( p->n ) appendText(p, "|", 0);
2090 for(i=0; i<nArg; i++){
2091 if( i ) appendText(p, ",", 0);
2092 if( azArg[i] ) appendText(p, azArg[i], 0);
2093 }
@@ -4683,11 +4684,18 @@
4684 for(i=1; i<nArg; i++){
4685 if( azArg[i][0]=='-' ){
4686 const char *z = azArg[i]+1;
4687 if( z[0]=='-' ) z++;
4688 if( strcmp(z,"preserve-rowids")==0 ){
4689 #ifdef SQLITE_OMIT_VIRTUALTABLE
4690 raw_printf(stderr, "The --preserve-rowids option is not compatible"
4691 " with SQLITE_OMIT_VIRTUALTABLE\n");
4692 rc = 1;
4693 goto meta_command_exit;
4694 #else
4695 ShellSetFlag(p, SHFLG_PreserveRowid);
4696 #endif
4697 }else
4698 {
4699 raw_printf(stderr, "Unknown option \"%s\" on \".dump\"\n", azArg[i]);
4700 rc = 1;
4701 goto meta_command_exit;
4702
+11 -4
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -398,11 +398,11 @@
398398
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
399399
** [sqlite_version()] and [sqlite_source_id()].
400400
*/
401401
#define SQLITE_VERSION "3.18.0"
402402
#define SQLITE_VERSION_NUMBER 3018000
403
-#define SQLITE_SOURCE_ID "2017-03-24 19:45:05 c2c3dd84534bb5ea81c974847b74a166c9cba1545fc749ce625929f303bf22e4"
403
+#define SQLITE_SOURCE_ID "2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37"
404404
405405
/*
406406
** CAPI3REF: Run-Time Library Version Numbers
407407
** KEYWORDS: sqlite3_version sqlite3_sourceid
408408
**
@@ -13893,11 +13893,11 @@
1389313893
** The "PRAGMA synchronous" statement also uses the zero-based numbers.
1389413894
** In other words, the zero-based numbers are used for all external interfaces
1389513895
** and the one-based values are used internally.
1389613896
*/
1389713897
#ifndef SQLITE_DEFAULT_SYNCHRONOUS
13898
-# define SQLITE_DEFAULT_SYNCHRONOUS (PAGER_SYNCHRONOUS_FULL-1)
13898
+# define SQLITE_DEFAULT_SYNCHRONOUS 2
1389913899
#endif
1390013900
#ifndef SQLITE_DEFAULT_WAL_SYNCHRONOUS
1390113901
# define SQLITE_DEFAULT_WAL_SYNCHRONOUS SQLITE_DEFAULT_SYNCHRONOUS
1390213902
#endif
1390313903
@@ -111279,10 +111279,12 @@
111279111279
/* Version 3.12.0 and later */
111280111280
int (*system_errno)(sqlite3*);
111281111281
/* Version 3.14.0 and later */
111282111282
int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
111283111283
char *(*expanded_sql)(sqlite3_stmt*);
111284
+ /* Version 3.18.0 and later */
111285
+ void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);
111284111286
};
111285111287
111286111288
/*
111287111289
** This is the function signature used for all extension entry points. It
111288111290
** is also defined in the file "loadext.c".
@@ -111537,10 +111539,12 @@
111537111539
/* Version 3.12.0 and later */
111538111540
#define sqlite3_system_errno sqlite3_api->system_errno
111539111541
/* Version 3.14.0 and later */
111540111542
#define sqlite3_trace_v2 sqlite3_api->trace_v2
111541111543
#define sqlite3_expanded_sql sqlite3_api->expanded_sql
111544
+/* Version 3.18.0 and later */
111545
+#define sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid
111542111546
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
111543111547
111544111548
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
111545111549
/* This case when the file really is being compiled as a loadable
111546111550
** extension */
@@ -111962,11 +111966,13 @@
111962111966
sqlite3_db_cacheflush,
111963111967
/* Version 3.12.0 and later */
111964111968
sqlite3_system_errno,
111965111969
/* Version 3.14.0 and later */
111966111970
sqlite3_trace_v2,
111967
- sqlite3_expanded_sql
111971
+ sqlite3_expanded_sql,
111972
+ /* Version 3.18.0 and later */
111973
+ sqlite3_set_last_insert_rowid
111968111974
};
111969111975
111970111976
/*
111971111977
** Attempt to load an SQLite extension library contained in the file
111972111978
** zFile. The entry point is zProc. zProc may be 0 in which case a
@@ -180265,10 +180271,11 @@
180265180271
){
180266180272
JsonParse x; /* The JSON that is being patched */
180267180273
JsonParse y; /* The patch */
180268180274
JsonNode *pResult; /* The result of the merge */
180269180275
180276
+ UNUSED_PARAM(argc);
180270180277
if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
180271180278
if( jsonParse(&y, ctx, (const char*)sqlite3_value_text(argv[1])) ){
180272180279
jsonParseReset(&x);
180273180280
return;
180274180281
}
@@ -198248,11 +198255,11 @@
198248198255
int nArg, /* Number of args */
198249198256
sqlite3_value **apUnused /* Function arguments */
198250198257
){
198251198258
assert( nArg==0 );
198252198259
UNUSED_PARAM2(nArg, apUnused);
198253
- sqlite3_result_text(pCtx, "fts5: 2017-03-24 19:45:05 c2c3dd84534bb5ea81c974847b74a166c9cba1545fc749ce625929f303bf22e4", -1, SQLITE_TRANSIENT);
198260
+ sqlite3_result_text(pCtx, "fts5: 2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37", -1, SQLITE_TRANSIENT);
198254198261
}
198255198262
198256198263
static int fts5Init(sqlite3 *db){
198257198264
static const sqlite3_module fts5Mod = {
198258198265
/* iVersion */ 2,
198259198266
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -398,11 +398,11 @@
398 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
399 ** [sqlite_version()] and [sqlite_source_id()].
400 */
401 #define SQLITE_VERSION "3.18.0"
402 #define SQLITE_VERSION_NUMBER 3018000
403 #define SQLITE_SOURCE_ID "2017-03-24 19:45:05 c2c3dd84534bb5ea81c974847b74a166c9cba1545fc749ce625929f303bf22e4"
404
405 /*
406 ** CAPI3REF: Run-Time Library Version Numbers
407 ** KEYWORDS: sqlite3_version sqlite3_sourceid
408 **
@@ -13893,11 +13893,11 @@
13893 ** The "PRAGMA synchronous" statement also uses the zero-based numbers.
13894 ** In other words, the zero-based numbers are used for all external interfaces
13895 ** and the one-based values are used internally.
13896 */
13897 #ifndef SQLITE_DEFAULT_SYNCHRONOUS
13898 # define SQLITE_DEFAULT_SYNCHRONOUS (PAGER_SYNCHRONOUS_FULL-1)
13899 #endif
13900 #ifndef SQLITE_DEFAULT_WAL_SYNCHRONOUS
13901 # define SQLITE_DEFAULT_WAL_SYNCHRONOUS SQLITE_DEFAULT_SYNCHRONOUS
13902 #endif
13903
@@ -111279,10 +111279,12 @@
111279 /* Version 3.12.0 and later */
111280 int (*system_errno)(sqlite3*);
111281 /* Version 3.14.0 and later */
111282 int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
111283 char *(*expanded_sql)(sqlite3_stmt*);
 
 
111284 };
111285
111286 /*
111287 ** This is the function signature used for all extension entry points. It
111288 ** is also defined in the file "loadext.c".
@@ -111537,10 +111539,12 @@
111537 /* Version 3.12.0 and later */
111538 #define sqlite3_system_errno sqlite3_api->system_errno
111539 /* Version 3.14.0 and later */
111540 #define sqlite3_trace_v2 sqlite3_api->trace_v2
111541 #define sqlite3_expanded_sql sqlite3_api->expanded_sql
 
 
111542 #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
111543
111544 #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
111545 /* This case when the file really is being compiled as a loadable
111546 ** extension */
@@ -111962,11 +111966,13 @@
111962 sqlite3_db_cacheflush,
111963 /* Version 3.12.0 and later */
111964 sqlite3_system_errno,
111965 /* Version 3.14.0 and later */
111966 sqlite3_trace_v2,
111967 sqlite3_expanded_sql
 
 
111968 };
111969
111970 /*
111971 ** Attempt to load an SQLite extension library contained in the file
111972 ** zFile. The entry point is zProc. zProc may be 0 in which case a
@@ -180265,10 +180271,11 @@
180265 ){
180266 JsonParse x; /* The JSON that is being patched */
180267 JsonParse y; /* The patch */
180268 JsonNode *pResult; /* The result of the merge */
180269
 
180270 if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
180271 if( jsonParse(&y, ctx, (const char*)sqlite3_value_text(argv[1])) ){
180272 jsonParseReset(&x);
180273 return;
180274 }
@@ -198248,11 +198255,11 @@
198248 int nArg, /* Number of args */
198249 sqlite3_value **apUnused /* Function arguments */
198250 ){
198251 assert( nArg==0 );
198252 UNUSED_PARAM2(nArg, apUnused);
198253 sqlite3_result_text(pCtx, "fts5: 2017-03-24 19:45:05 c2c3dd84534bb5ea81c974847b74a166c9cba1545fc749ce625929f303bf22e4", -1, SQLITE_TRANSIENT);
198254 }
198255
198256 static int fts5Init(sqlite3 *db){
198257 static const sqlite3_module fts5Mod = {
198258 /* iVersion */ 2,
198259
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -398,11 +398,11 @@
398 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
399 ** [sqlite_version()] and [sqlite_source_id()].
400 */
401 #define SQLITE_VERSION "3.18.0"
402 #define SQLITE_VERSION_NUMBER 3018000
403 #define SQLITE_SOURCE_ID "2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37"
404
405 /*
406 ** CAPI3REF: Run-Time Library Version Numbers
407 ** KEYWORDS: sqlite3_version sqlite3_sourceid
408 **
@@ -13893,11 +13893,11 @@
13893 ** The "PRAGMA synchronous" statement also uses the zero-based numbers.
13894 ** In other words, the zero-based numbers are used for all external interfaces
13895 ** and the one-based values are used internally.
13896 */
13897 #ifndef SQLITE_DEFAULT_SYNCHRONOUS
13898 # define SQLITE_DEFAULT_SYNCHRONOUS 2
13899 #endif
13900 #ifndef SQLITE_DEFAULT_WAL_SYNCHRONOUS
13901 # define SQLITE_DEFAULT_WAL_SYNCHRONOUS SQLITE_DEFAULT_SYNCHRONOUS
13902 #endif
13903
@@ -111279,10 +111279,12 @@
111279 /* Version 3.12.0 and later */
111280 int (*system_errno)(sqlite3*);
111281 /* Version 3.14.0 and later */
111282 int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
111283 char *(*expanded_sql)(sqlite3_stmt*);
111284 /* Version 3.18.0 and later */
111285 void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);
111286 };
111287
111288 /*
111289 ** This is the function signature used for all extension entry points. It
111290 ** is also defined in the file "loadext.c".
@@ -111537,10 +111539,12 @@
111539 /* Version 3.12.0 and later */
111540 #define sqlite3_system_errno sqlite3_api->system_errno
111541 /* Version 3.14.0 and later */
111542 #define sqlite3_trace_v2 sqlite3_api->trace_v2
111543 #define sqlite3_expanded_sql sqlite3_api->expanded_sql
111544 /* Version 3.18.0 and later */
111545 #define sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid
111546 #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
111547
111548 #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
111549 /* This case when the file really is being compiled as a loadable
111550 ** extension */
@@ -111962,11 +111966,13 @@
111966 sqlite3_db_cacheflush,
111967 /* Version 3.12.0 and later */
111968 sqlite3_system_errno,
111969 /* Version 3.14.0 and later */
111970 sqlite3_trace_v2,
111971 sqlite3_expanded_sql,
111972 /* Version 3.18.0 and later */
111973 sqlite3_set_last_insert_rowid
111974 };
111975
111976 /*
111977 ** Attempt to load an SQLite extension library contained in the file
111978 ** zFile. The entry point is zProc. zProc may be 0 in which case a
@@ -180265,10 +180271,11 @@
180271 ){
180272 JsonParse x; /* The JSON that is being patched */
180273 JsonParse y; /* The patch */
180274 JsonNode *pResult; /* The result of the merge */
180275
180276 UNUSED_PARAM(argc);
180277 if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
180278 if( jsonParse(&y, ctx, (const char*)sqlite3_value_text(argv[1])) ){
180279 jsonParseReset(&x);
180280 return;
180281 }
@@ -198248,11 +198255,11 @@
198255 int nArg, /* Number of args */
198256 sqlite3_value **apUnused /* Function arguments */
198257 ){
198258 assert( nArg==0 );
198259 UNUSED_PARAM2(nArg, apUnused);
198260 sqlite3_result_text(pCtx, "fts5: 2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37", -1, SQLITE_TRANSIENT);
198261 }
198262
198263 static int fts5Init(sqlite3 *db){
198264 static const sqlite3_module fts5Mod = {
198265 /* iVersion */ 2,
198266
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -121,11 +121,11 @@
121121
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122122
** [sqlite_version()] and [sqlite_source_id()].
123123
*/
124124
#define SQLITE_VERSION "3.18.0"
125125
#define SQLITE_VERSION_NUMBER 3018000
126
-#define SQLITE_SOURCE_ID "2017-03-24 19:45:05 c2c3dd84534bb5ea81c974847b74a166c9cba1545fc749ce625929f303bf22e4"
126
+#define SQLITE_SOURCE_ID "2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37"
127127
128128
/*
129129
** CAPI3REF: Run-Time Library Version Numbers
130130
** KEYWORDS: sqlite3_version sqlite3_sourceid
131131
**
132132
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -121,11 +121,11 @@
121 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122 ** [sqlite_version()] and [sqlite_source_id()].
123 */
124 #define SQLITE_VERSION "3.18.0"
125 #define SQLITE_VERSION_NUMBER 3018000
126 #define SQLITE_SOURCE_ID "2017-03-24 19:45:05 c2c3dd84534bb5ea81c974847b74a166c9cba1545fc749ce625929f303bf22e4"
127
128 /*
129 ** CAPI3REF: Run-Time Library Version Numbers
130 ** KEYWORDS: sqlite3_version sqlite3_sourceid
131 **
132
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -121,11 +121,11 @@
121 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122 ** [sqlite_version()] and [sqlite_source_id()].
123 */
124 #define SQLITE_VERSION "3.18.0"
125 #define SQLITE_VERSION_NUMBER 3018000
126 #define SQLITE_SOURCE_ID "2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37"
127
128 /*
129 ** CAPI3REF: Run-Time Library Version Numbers
130 ** KEYWORDS: sqlite3_version sqlite3_sourceid
131 **
132

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button