Fossil SCM

Update the built-in SQLite to version 3.32.0.

drh 2020-05-22 17:54 trunk
Commit f82e054fd6a38fd5a2dbc8caea259c154164e4eebe5e3e472ffb9325d57e1ecb
3 files changed +4 -2 +25 -8 +1 -1
+4 -2
--- src/shell.c
+++ src/shell.c
@@ -8006,13 +8006,15 @@
80068006
if( !zDetail ) continue;
80078007
nDetail = STRLEN(zDetail);
80088008
80098009
for(i=0; i<nDetail; i++){
80108010
const char *zIdx = 0;
8011
- if( memcmp(&zDetail[i], " USING INDEX ", 13)==0 ){
8011
+ if( i+13<nDetail && memcmp(&zDetail[i], " USING INDEX ", 13)==0 ){
80128012
zIdx = &zDetail[i+13];
8013
- }else if( memcmp(&zDetail[i], " USING COVERING INDEX ", 22)==0 ){
8013
+ }else if( i+22<nDetail
8014
+ && memcmp(&zDetail[i], " USING COVERING INDEX ", 22)==0
8015
+ ){
80148016
zIdx = &zDetail[i+22];
80158017
}
80168018
if( zIdx ){
80178019
const char *zSql;
80188020
int nIdx = 0;
80198021
--- src/shell.c
+++ src/shell.c
@@ -8006,13 +8006,15 @@
8006 if( !zDetail ) continue;
8007 nDetail = STRLEN(zDetail);
8008
8009 for(i=0; i<nDetail; i++){
8010 const char *zIdx = 0;
8011 if( memcmp(&zDetail[i], " USING INDEX ", 13)==0 ){
8012 zIdx = &zDetail[i+13];
8013 }else if( memcmp(&zDetail[i], " USING COVERING INDEX ", 22)==0 ){
 
 
8014 zIdx = &zDetail[i+22];
8015 }
8016 if( zIdx ){
8017 const char *zSql;
8018 int nIdx = 0;
8019
--- src/shell.c
+++ src/shell.c
@@ -8006,13 +8006,15 @@
8006 if( !zDetail ) continue;
8007 nDetail = STRLEN(zDetail);
8008
8009 for(i=0; i<nDetail; i++){
8010 const char *zIdx = 0;
8011 if( i+13<nDetail && memcmp(&zDetail[i], " USING INDEX ", 13)==0 ){
8012 zIdx = &zDetail[i+13];
8013 }else if( i+22<nDetail
8014 && memcmp(&zDetail[i], " USING COVERING INDEX ", 22)==0
8015 ){
8016 zIdx = &zDetail[i+22];
8017 }
8018 if( zIdx ){
8019 const char *zSql;
8020 int nIdx = 0;
8021
+25 -8
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
11621162
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
11631163
** [sqlite_version()] and [sqlite_source_id()].
11641164
*/
11651165
#define SQLITE_VERSION "3.32.0"
11661166
#define SQLITE_VERSION_NUMBER 3032000
1167
-#define SQLITE_SOURCE_ID "2020-05-19 15:51:10 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad40bde"
1167
+#define SQLITE_SOURCE_ID "2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a"
11681168
11691169
/*
11701170
** CAPI3REF: Run-Time Library Version Numbers
11711171
** KEYWORDS: sqlite3_version sqlite3_sourceid
11721172
**
@@ -30856,10 +30856,11 @@
3085630856
/* UTF-16 Little-endian -> UTF-8 */
3085730857
while( zIn<zTerm ){
3085830858
c = *(zIn++);
3085930859
c += (*(zIn++))<<8;
3086030860
if( c>=0xd800 && c<0xe000 ){
30861
+#ifdef SQLITE_REPLACE_INVALID_UTF
3086130862
if( c>=0xdc00 || zIn>=zTerm ){
3086230863
c = 0xfffd;
3086330864
}else{
3086430865
int c2 = *(zIn++);
3086530866
c2 += (*(zIn++))<<8;
@@ -30868,19 +30869,27 @@
3086830869
c = 0xfffd;
3086930870
}else{
3087030871
c = ((c&0x3ff)<<10) + (c2&0x3ff) + 0x10000;
3087130872
}
3087230873
}
30874
+#else
30875
+ if( zIn<zTerm ){
30876
+ int c2 = (*zIn++);
30877
+ c2 += ((*zIn++)<<8);
30878
+ c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);
30879
+ }
30880
+#endif
3087330881
}
3087430882
WRITE_UTF8(z, c);
3087530883
}
3087630884
}else{
3087730885
/* UTF-16 Big-endian -> UTF-8 */
3087830886
while( zIn<zTerm ){
3087930887
c = (*(zIn++))<<8;
3088030888
c += *(zIn++);
3088130889
if( c>=0xd800 && c<0xe000 ){
30890
+#ifdef SQLITE_REPLACE_INVALID_UTF
3088230891
if( c>=0xdc00 || zIn>=zTerm ){
3088330892
c = 0xfffd;
3088430893
}else{
3088530894
int c2 = (*(zIn++))<<8;
3088630895
c2 += *(zIn++);
@@ -30889,10 +30898,17 @@
3088930898
c = 0xfffd;
3089030899
}else{
3089130900
c = ((c&0x3ff)<<10) + (c2&0x3ff) + 0x10000;
3089230901
}
3089330902
}
30903
+#else
30904
+ if( zIn<zTerm ){
30905
+ int c2 = ((*zIn++)<<8);
30906
+ c2 += (*zIn++);
30907
+ c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);
30908
+ }
30909
+#endif
3089430910
}
3089530911
WRITE_UTF8(z, c);
3089630912
}
3089730913
}
3089830914
pMem->n = (int)(z - zOut);
@@ -48315,14 +48331,15 @@
4831548331
*/
4831648332
SQLITE_PRIVATE int sqlite3MemdbInit(void){
4831748333
sqlite3_vfs *pLower = sqlite3_vfs_find(0);
4831848334
int sz = pLower->szOsFile;
4831948335
memdb_vfs.pAppData = pLower;
48320
- /* In all known configurations of SQLite, the size of a default
48321
- ** sqlite3_file is greater than the size of a memdb sqlite3_file.
48322
- ** Should that ever change, remove the following NEVER() */
48323
- if( NEVER(sz<sizeof(MemFile)) ) sz = sizeof(MemFile);
48336
+ /* The following conditional can only be true when compiled for
48337
+ ** Windows x86 and SQLITE_MAX_MMAP_SIZE=0. We always leave
48338
+ ** it in, to be safe, but it is marked as NO_TEST since there
48339
+ ** is no way to reach it under most builds. */
48340
+ if( sz<sizeof(MemFile) ) sz = sizeof(MemFile); /*NO_TEST*/
4832448341
memdb_vfs.szOsFile = sz;
4832548342
return sqlite3_vfs_register(&memdb_vfs, 0);
4832648343
}
4832748344
#endif /* SQLITE_ENABLE_DESERIALIZE */
4832848345
@@ -224747,11 +224764,11 @@
224747224764
int nArg, /* Number of args */
224748224765
sqlite3_value **apUnused /* Function arguments */
224749224766
){
224750224767
assert( nArg==0 );
224751224768
UNUSED_PARAM2(nArg, apUnused);
224752
- sqlite3_result_text(pCtx, "fts5: 2020-05-19 15:51:10 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad40bde", -1, SQLITE_TRANSIENT);
224769
+ sqlite3_result_text(pCtx, "fts5: 2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a", -1, SQLITE_TRANSIENT);
224753224770
}
224754224771
224755224772
/*
224756224773
** Return true if zName is the extension on one of the shadow tables used
224757224774
** by this module.
@@ -229530,12 +229547,12 @@
229530229547
}
229531229548
#endif /* SQLITE_CORE */
229532229549
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
229533229550
229534229551
/************** End of stmt.c ************************************************/
229535
-#if __LINE__!=229535
229552
+#if __LINE__!=229552
229536229553
#undef SQLITE_SOURCE_ID
229537
-#define SQLITE_SOURCE_ID "2020-05-19 15:51:10 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad4alt2"
229554
+#define SQLITE_SOURCE_ID "2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360falt2"
229538229555
#endif
229539229556
/* Return the source-id for this library */
229540229557
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
229541229558
/************************** End of sqlite3.c ******************************/
229542229559
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
1162 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1163 ** [sqlite_version()] and [sqlite_source_id()].
1164 */
1165 #define SQLITE_VERSION "3.32.0"
1166 #define SQLITE_VERSION_NUMBER 3032000
1167 #define SQLITE_SOURCE_ID "2020-05-19 15:51:10 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad40bde"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -30856,10 +30856,11 @@
30856 /* UTF-16 Little-endian -> UTF-8 */
30857 while( zIn<zTerm ){
30858 c = *(zIn++);
30859 c += (*(zIn++))<<8;
30860 if( c>=0xd800 && c<0xe000 ){
 
30861 if( c>=0xdc00 || zIn>=zTerm ){
30862 c = 0xfffd;
30863 }else{
30864 int c2 = *(zIn++);
30865 c2 += (*(zIn++))<<8;
@@ -30868,19 +30869,27 @@
30868 c = 0xfffd;
30869 }else{
30870 c = ((c&0x3ff)<<10) + (c2&0x3ff) + 0x10000;
30871 }
30872 }
 
 
 
 
 
 
 
30873 }
30874 WRITE_UTF8(z, c);
30875 }
30876 }else{
30877 /* UTF-16 Big-endian -> UTF-8 */
30878 while( zIn<zTerm ){
30879 c = (*(zIn++))<<8;
30880 c += *(zIn++);
30881 if( c>=0xd800 && c<0xe000 ){
 
30882 if( c>=0xdc00 || zIn>=zTerm ){
30883 c = 0xfffd;
30884 }else{
30885 int c2 = (*(zIn++))<<8;
30886 c2 += *(zIn++);
@@ -30889,10 +30898,17 @@
30889 c = 0xfffd;
30890 }else{
30891 c = ((c&0x3ff)<<10) + (c2&0x3ff) + 0x10000;
30892 }
30893 }
 
 
 
 
 
 
 
30894 }
30895 WRITE_UTF8(z, c);
30896 }
30897 }
30898 pMem->n = (int)(z - zOut);
@@ -48315,14 +48331,15 @@
48315 */
48316 SQLITE_PRIVATE int sqlite3MemdbInit(void){
48317 sqlite3_vfs *pLower = sqlite3_vfs_find(0);
48318 int sz = pLower->szOsFile;
48319 memdb_vfs.pAppData = pLower;
48320 /* In all known configurations of SQLite, the size of a default
48321 ** sqlite3_file is greater than the size of a memdb sqlite3_file.
48322 ** Should that ever change, remove the following NEVER() */
48323 if( NEVER(sz<sizeof(MemFile)) ) sz = sizeof(MemFile);
 
48324 memdb_vfs.szOsFile = sz;
48325 return sqlite3_vfs_register(&memdb_vfs, 0);
48326 }
48327 #endif /* SQLITE_ENABLE_DESERIALIZE */
48328
@@ -224747,11 +224764,11 @@
224747 int nArg, /* Number of args */
224748 sqlite3_value **apUnused /* Function arguments */
224749 ){
224750 assert( nArg==0 );
224751 UNUSED_PARAM2(nArg, apUnused);
224752 sqlite3_result_text(pCtx, "fts5: 2020-05-19 15:51:10 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad40bde", -1, SQLITE_TRANSIENT);
224753 }
224754
224755 /*
224756 ** Return true if zName is the extension on one of the shadow tables used
224757 ** by this module.
@@ -229530,12 +229547,12 @@
229530 }
229531 #endif /* SQLITE_CORE */
229532 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
229533
229534 /************** End of stmt.c ************************************************/
229535 #if __LINE__!=229535
229536 #undef SQLITE_SOURCE_ID
229537 #define SQLITE_SOURCE_ID "2020-05-19 15:51:10 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad4alt2"
229538 #endif
229539 /* Return the source-id for this library */
229540 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
229541 /************************** End of sqlite3.c ******************************/
229542
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
1162 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1163 ** [sqlite_version()] and [sqlite_source_id()].
1164 */
1165 #define SQLITE_VERSION "3.32.0"
1166 #define SQLITE_VERSION_NUMBER 3032000
1167 #define SQLITE_SOURCE_ID "2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -30856,10 +30856,11 @@
30856 /* UTF-16 Little-endian -> UTF-8 */
30857 while( zIn<zTerm ){
30858 c = *(zIn++);
30859 c += (*(zIn++))<<8;
30860 if( c>=0xd800 && c<0xe000 ){
30861 #ifdef SQLITE_REPLACE_INVALID_UTF
30862 if( c>=0xdc00 || zIn>=zTerm ){
30863 c = 0xfffd;
30864 }else{
30865 int c2 = *(zIn++);
30866 c2 += (*(zIn++))<<8;
@@ -30868,19 +30869,27 @@
30869 c = 0xfffd;
30870 }else{
30871 c = ((c&0x3ff)<<10) + (c2&0x3ff) + 0x10000;
30872 }
30873 }
30874 #else
30875 if( zIn<zTerm ){
30876 int c2 = (*zIn++);
30877 c2 += ((*zIn++)<<8);
30878 c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);
30879 }
30880 #endif
30881 }
30882 WRITE_UTF8(z, c);
30883 }
30884 }else{
30885 /* UTF-16 Big-endian -> UTF-8 */
30886 while( zIn<zTerm ){
30887 c = (*(zIn++))<<8;
30888 c += *(zIn++);
30889 if( c>=0xd800 && c<0xe000 ){
30890 #ifdef SQLITE_REPLACE_INVALID_UTF
30891 if( c>=0xdc00 || zIn>=zTerm ){
30892 c = 0xfffd;
30893 }else{
30894 int c2 = (*(zIn++))<<8;
30895 c2 += *(zIn++);
@@ -30889,10 +30898,17 @@
30898 c = 0xfffd;
30899 }else{
30900 c = ((c&0x3ff)<<10) + (c2&0x3ff) + 0x10000;
30901 }
30902 }
30903 #else
30904 if( zIn<zTerm ){
30905 int c2 = ((*zIn++)<<8);
30906 c2 += (*zIn++);
30907 c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);
30908 }
30909 #endif
30910 }
30911 WRITE_UTF8(z, c);
30912 }
30913 }
30914 pMem->n = (int)(z - zOut);
@@ -48315,14 +48331,15 @@
48331 */
48332 SQLITE_PRIVATE int sqlite3MemdbInit(void){
48333 sqlite3_vfs *pLower = sqlite3_vfs_find(0);
48334 int sz = pLower->szOsFile;
48335 memdb_vfs.pAppData = pLower;
48336 /* The following conditional can only be true when compiled for
48337 ** Windows x86 and SQLITE_MAX_MMAP_SIZE=0. We always leave
48338 ** it in, to be safe, but it is marked as NO_TEST since there
48339 ** is no way to reach it under most builds. */
48340 if( sz<sizeof(MemFile) ) sz = sizeof(MemFile); /*NO_TEST*/
48341 memdb_vfs.szOsFile = sz;
48342 return sqlite3_vfs_register(&memdb_vfs, 0);
48343 }
48344 #endif /* SQLITE_ENABLE_DESERIALIZE */
48345
@@ -224747,11 +224764,11 @@
224764 int nArg, /* Number of args */
224765 sqlite3_value **apUnused /* Function arguments */
224766 ){
224767 assert( nArg==0 );
224768 UNUSED_PARAM2(nArg, apUnused);
224769 sqlite3_result_text(pCtx, "fts5: 2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a", -1, SQLITE_TRANSIENT);
224770 }
224771
224772 /*
224773 ** Return true if zName is the extension on one of the shadow tables used
224774 ** by this module.
@@ -229530,12 +229547,12 @@
229547 }
229548 #endif /* SQLITE_CORE */
229549 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
229550
229551 /************** End of stmt.c ************************************************/
229552 #if __LINE__!=229552
229553 #undef SQLITE_SOURCE_ID
229554 #define SQLITE_SOURCE_ID "2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360falt2"
229555 #endif
229556 /* Return the source-id for this library */
229557 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
229558 /************************** End of sqlite3.c ******************************/
229559
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123123
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124124
** [sqlite_version()] and [sqlite_source_id()].
125125
*/
126126
#define SQLITE_VERSION "3.32.0"
127127
#define SQLITE_VERSION_NUMBER 3032000
128
-#define SQLITE_SOURCE_ID "2020-05-19 15:51:10 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad40bde"
128
+#define SQLITE_SOURCE_ID "2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
134134
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.32.0"
127 #define SQLITE_VERSION_NUMBER 3032000
128 #define SQLITE_SOURCE_ID "2020-05-19 15:51:10 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad40bde"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
134
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.32.0"
127 #define SQLITE_VERSION_NUMBER 3032000
128 #define SQLITE_SOURCE_ID "2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
134

Keyboard Shortcuts

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