Fossil SCM

Update to SQLite 3.15.1

jan.nijtmans 2016-11-04 23:16 UTC branch-1.36
Commit a8a67989fc994954c40ad26e915a2f2d43200da7
2 files changed +36 -14 +10 -3
+36 -14
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3
-** version 3.15.0. By combining all the individual C code files into this
3
+** version 3.15.1. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
77
** of 5% or more are commonly seen when SQLite is compiled as a single
88
** translation unit.
@@ -379,13 +379,13 @@
379379
**
380380
** See also: [sqlite3_libversion()],
381381
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382382
** [sqlite_version()] and [sqlite_source_id()].
383383
*/
384
-#define SQLITE_VERSION "3.15.0"
385
-#define SQLITE_VERSION_NUMBER 3015000
386
-#define SQLITE_SOURCE_ID "2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8"
384
+#define SQLITE_VERSION "3.15.1"
385
+#define SQLITE_VERSION_NUMBER 3015001
386
+#define SQLITE_SOURCE_ID "2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36"
387387
388388
/*
389389
** CAPI3REF: Run-Time Library Version Numbers
390390
** KEYWORDS: sqlite3_version, sqlite3_sourceid
391391
**
@@ -1235,10 +1235,16 @@
12351235
** <li>[[SQLITE_FCNTL_HAS_MOVED]]
12361236
** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
12371237
** pointer to an integer and it writes a boolean into that integer depending
12381238
** on whether or not the file has been renamed, moved, or deleted since it
12391239
** was first opened.
1240
+**
1241
+** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]
1242
+** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
1243
+** underlying native file handle associated with a file handle. This file
1244
+** control interprets its argument as a pointer to a native file handle and
1245
+** writes the resulting value there.
12401246
**
12411247
** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
12421248
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
12431249
** opcode causes the xFileControl method to swap the file handle with the one
12441250
** pointed to by the pArg argument. This capability is used during testing
@@ -1286,10 +1292,11 @@
12861292
#define SQLITE_FCNTL_WAL_BLOCK 24
12871293
#define SQLITE_FCNTL_ZIPVFS 25
12881294
#define SQLITE_FCNTL_RBU 26
12891295
#define SQLITE_FCNTL_VFS_POINTER 27
12901296
#define SQLITE_FCNTL_JOURNAL_POINTER 28
1297
+#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
12911298
12921299
/* deprecated names */
12931300
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
12941301
#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
12951302
#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -13086,14 +13093,17 @@
1308613093
SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int, int*, int*);
1308713094
SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
1308813095
SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
1308913096
SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
1309013097
SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager);
13098
+SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager);
1309113099
# ifdef SQLITE_ENABLE_SNAPSHOT
1309213100
SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
1309313101
SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
1309413102
# endif
13103
+#else
13104
+# define sqlite3PagerUseWal(x) 0
1309513105
#endif
1309613106
1309713107
#ifdef SQLITE_ENABLE_ZIPVFS
1309813108
SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager);
1309913109
#endif
@@ -18105,12 +18115,12 @@
1810518115
UnpackedRecord *pUnpacked; /* Unpacked version of aRecord[] */
1810618116
UnpackedRecord *pNewUnpacked; /* Unpacked version of new.* record */
1810718117
int iNewReg; /* Register for new.* values */
1810818118
i64 iKey1; /* First key value passed to hook */
1810918119
i64 iKey2; /* Second key value passed to hook */
18110
- int iPKey; /* If not negative index of IPK column */
1811118120
Mem *aNew; /* Array of new.* values */
18121
+ Table *pTab; /* Schema object being upated */
1811218122
};
1811318123
1811418124
/*
1811518125
** Function prototypes
1811618126
*/
@@ -40674,10 +40684,16 @@
4067440684
a[1] = winIoerrRetryDelay;
4067540685
}
4067640686
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
4067740687
return SQLITE_OK;
4067840688
}
40689
+ case SQLITE_FCNTL_WIN32_GET_HANDLE: {
40690
+ LPHANDLE phFile = (LPHANDLE)pArg;
40691
+ *phFile = pFile->h;
40692
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
40693
+ return SQLITE_OK;
40694
+ }
4067940695
#ifdef SQLITE_TEST
4068040696
case SQLITE_FCNTL_WIN32_SET_HANDLE: {
4068140697
LPHANDLE phFile = (LPHANDLE)pArg;
4068240698
HANDLE hOldFile = pFile->h;
4068340699
pFile->h = *phFile;
@@ -47164,13 +47180,14 @@
4716447180
/*
4716547181
** Return true if this pager uses a write-ahead log instead of the usual
4716647182
** rollback journal. Otherwise false.
4716747183
*/
4716847184
#ifndef SQLITE_OMIT_WAL
47169
-static int pagerUseWal(Pager *pPager){
47185
+SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager){
4717047186
return (pPager->pWal!=0);
4717147187
}
47188
+# define pagerUseWal(x) sqlite3PagerUseWal(x)
4717247189
#else
4717347190
# define pagerUseWal(x) 0
4717447191
# define pagerRollbackWal(x) 0
4717547192
# define pagerWalFrames(v,w,x,y) 0
4717647193
# define pagerOpenWalIfPresent(z) SQLITE_OK
@@ -62825,11 +62842,11 @@
6282562842
if( (eOp&0x01)==0 /* (1) */
6282662843
&& offset==0 /* (2) */
6282762844
&& (bEnd || a==ovflSize) /* (6) */
6282862845
&& pBt->inTransaction==TRANS_READ /* (4) */
6282962846
&& (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (3) */
62830
- && pBt->pPage1->aData[19]==0x01 /* (5) */
62847
+ && 0==sqlite3PagerUseWal(pBt->pPager) /* (5) */
6283162848
&& &pBuf[-4]>=pBufStart /* (7) */
6283262849
){
6283362850
u8 aSave[4];
6283462851
u8 *aWrite = &pBuf[-4];
6283562852
assert( aWrite>=pBufStart ); /* hence (7) */
@@ -75076,11 +75093,11 @@
7507675093
preupdate.keyinfo.enc = ENC(db);
7507775094
preupdate.keyinfo.nField = pTab->nCol;
7507875095
preupdate.keyinfo.aSortOrder = (u8*)&fakeSortOrder;
7507975096
preupdate.iKey1 = iKey1;
7508075097
preupdate.iKey2 = iKey2;
75081
- preupdate.iPKey = pTab->iPKey;
75098
+ preupdate.pTab = pTab;
7508275099
7508375100
db->pPreUpdate = &preupdate;
7508475101
db->xPreUpdateCallback(db->pPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2);
7508575102
db->pPreUpdate = 0;
7508675103
sqlite3DbFree(db, preupdate.aRecord);
@@ -76808,13 +76825,18 @@
7680876825
}
7680976826
7681076827
if( iIdx>=p->pUnpacked->nField ){
7681176828
*ppValue = (sqlite3_value *)columnNullValue();
7681276829
}else{
76830
+ Mem *pMem = *ppValue = &p->pUnpacked->aMem[iIdx];
7681376831
*ppValue = &p->pUnpacked->aMem[iIdx];
76814
- if( iIdx==p->iPKey ){
76815
- sqlite3VdbeMemSetInt64(*ppValue, p->iKey1);
76832
+ if( iIdx==p->pTab->iPKey ){
76833
+ sqlite3VdbeMemSetInt64(pMem, p->iKey1);
76834
+ }else if( p->pTab->aCol[iIdx].affinity==SQLITE_AFF_REAL ){
76835
+ if( pMem->flags & MEM_Int ){
76836
+ sqlite3VdbeMemRealify(pMem);
76837
+ }
7681676838
}
7681776839
}
7681876840
7681976841
preupdate_old_out:
7682076842
sqlite3Error(db, rc);
@@ -76887,11 +76909,11 @@
7688776909
}
7688876910
if( iIdx>=pUnpack->nField ){
7688976911
pMem = (sqlite3_value *)columnNullValue();
7689076912
}else{
7689176913
pMem = &pUnpack->aMem[iIdx];
76892
- if( iIdx==p->iPKey ){
76914
+ if( iIdx==p->pTab->iPKey ){
7689376915
sqlite3VdbeMemSetInt64(pMem, p->iKey2);
7689476916
}
7689576917
}
7689676918
}else{
7689776919
/* For an UPDATE, memory cell (p->iNewReg+1+iIdx) contains the required
@@ -76908,11 +76930,11 @@
7690876930
}
7690976931
}
7691076932
assert( iIdx>=0 && iIdx<p->pCsr->nField );
7691176933
pMem = &p->aNew[iIdx];
7691276934
if( pMem->flags==0 ){
76913
- if( iIdx==p->iPKey ){
76935
+ if( iIdx==p->pTab->iPKey ){
7691476936
sqlite3VdbeMemSetInt64(pMem, p->iKey2);
7691576937
}else{
7691676938
rc = sqlite3VdbeMemCopy(pMem, &p->v->aMem[p->iNewReg+1+iIdx]);
7691776939
if( rc!=SQLITE_OK ) goto preupdate_new_out;
7691876940
}
@@ -165210,11 +165232,11 @@
165210165232
** of the locale to use. Passing an empty string ("") or SQL NULL value
165211165233
** as the second argument is the same as invoking the 1 argument version
165212165234
** of upper() or lower().
165213165235
**
165214165236
** lower('I', 'en_us') -> 'i'
165215
-** lower('I', 'tr_tr') -> 'ı' (small dotless i)
165237
+** lower('I', 'tr_tr') -> '\u131' (small dotless i)
165216165238
**
165217165239
** http://www.icu-project.org/userguide/posix.html#case_mappings
165218165240
*/
165219165241
static void icuCaseFunc16(sqlite3_context *p, int nArg, sqlite3_value **apArg){
165220165242
const UChar *zInput; /* Pointer to input string */
@@ -195599,11 +195621,11 @@
195599195621
int nArg, /* Number of args */
195600195622
sqlite3_value **apUnused /* Function arguments */
195601195623
){
195602195624
assert( nArg==0 );
195603195625
UNUSED_PARAM2(nArg, apUnused);
195604
- sqlite3_result_text(pCtx, "fts5: 2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8", -1, SQLITE_TRANSIENT);
195626
+ sqlite3_result_text(pCtx, "fts5: 2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36", -1, SQLITE_TRANSIENT);
195605195627
}
195606195628
195607195629
static int fts5Init(sqlite3 *db){
195608195630
static const sqlite3_module fts5Mod = {
195609195631
/* iVersion */ 2,
195610195632
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.15.0. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
@@ -379,13 +379,13 @@
379 **
380 ** See also: [sqlite3_libversion()],
381 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382 ** [sqlite_version()] and [sqlite_source_id()].
383 */
384 #define SQLITE_VERSION "3.15.0"
385 #define SQLITE_VERSION_NUMBER 3015000
386 #define SQLITE_SOURCE_ID "2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8"
387
388 /*
389 ** CAPI3REF: Run-Time Library Version Numbers
390 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
391 **
@@ -1235,10 +1235,16 @@
1235 ** <li>[[SQLITE_FCNTL_HAS_MOVED]]
1236 ** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
1237 ** pointer to an integer and it writes a boolean into that integer depending
1238 ** on whether or not the file has been renamed, moved, or deleted since it
1239 ** was first opened.
 
 
 
 
 
 
1240 **
1241 ** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
1242 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
1243 ** opcode causes the xFileControl method to swap the file handle with the one
1244 ** pointed to by the pArg argument. This capability is used during testing
@@ -1286,10 +1292,11 @@
1286 #define SQLITE_FCNTL_WAL_BLOCK 24
1287 #define SQLITE_FCNTL_ZIPVFS 25
1288 #define SQLITE_FCNTL_RBU 26
1289 #define SQLITE_FCNTL_VFS_POINTER 27
1290 #define SQLITE_FCNTL_JOURNAL_POINTER 28
 
1291
1292 /* deprecated names */
1293 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1294 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1295 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -13086,14 +13093,17 @@
13086 SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int, int*, int*);
13087 SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
13088 SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
13089 SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
13090 SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager);
 
13091 # ifdef SQLITE_ENABLE_SNAPSHOT
13092 SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
13093 SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
13094 # endif
 
 
13095 #endif
13096
13097 #ifdef SQLITE_ENABLE_ZIPVFS
13098 SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager);
13099 #endif
@@ -18105,12 +18115,12 @@
18105 UnpackedRecord *pUnpacked; /* Unpacked version of aRecord[] */
18106 UnpackedRecord *pNewUnpacked; /* Unpacked version of new.* record */
18107 int iNewReg; /* Register for new.* values */
18108 i64 iKey1; /* First key value passed to hook */
18109 i64 iKey2; /* Second key value passed to hook */
18110 int iPKey; /* If not negative index of IPK column */
18111 Mem *aNew; /* Array of new.* values */
 
18112 };
18113
18114 /*
18115 ** Function prototypes
18116 */
@@ -40674,10 +40684,16 @@
40674 a[1] = winIoerrRetryDelay;
40675 }
40676 OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
40677 return SQLITE_OK;
40678 }
 
 
 
 
 
 
40679 #ifdef SQLITE_TEST
40680 case SQLITE_FCNTL_WIN32_SET_HANDLE: {
40681 LPHANDLE phFile = (LPHANDLE)pArg;
40682 HANDLE hOldFile = pFile->h;
40683 pFile->h = *phFile;
@@ -47164,13 +47180,14 @@
47164 /*
47165 ** Return true if this pager uses a write-ahead log instead of the usual
47166 ** rollback journal. Otherwise false.
47167 */
47168 #ifndef SQLITE_OMIT_WAL
47169 static int pagerUseWal(Pager *pPager){
47170 return (pPager->pWal!=0);
47171 }
 
47172 #else
47173 # define pagerUseWal(x) 0
47174 # define pagerRollbackWal(x) 0
47175 # define pagerWalFrames(v,w,x,y) 0
47176 # define pagerOpenWalIfPresent(z) SQLITE_OK
@@ -62825,11 +62842,11 @@
62825 if( (eOp&0x01)==0 /* (1) */
62826 && offset==0 /* (2) */
62827 && (bEnd || a==ovflSize) /* (6) */
62828 && pBt->inTransaction==TRANS_READ /* (4) */
62829 && (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (3) */
62830 && pBt->pPage1->aData[19]==0x01 /* (5) */
62831 && &pBuf[-4]>=pBufStart /* (7) */
62832 ){
62833 u8 aSave[4];
62834 u8 *aWrite = &pBuf[-4];
62835 assert( aWrite>=pBufStart ); /* hence (7) */
@@ -75076,11 +75093,11 @@
75076 preupdate.keyinfo.enc = ENC(db);
75077 preupdate.keyinfo.nField = pTab->nCol;
75078 preupdate.keyinfo.aSortOrder = (u8*)&fakeSortOrder;
75079 preupdate.iKey1 = iKey1;
75080 preupdate.iKey2 = iKey2;
75081 preupdate.iPKey = pTab->iPKey;
75082
75083 db->pPreUpdate = &preupdate;
75084 db->xPreUpdateCallback(db->pPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2);
75085 db->pPreUpdate = 0;
75086 sqlite3DbFree(db, preupdate.aRecord);
@@ -76808,13 +76825,18 @@
76808 }
76809
76810 if( iIdx>=p->pUnpacked->nField ){
76811 *ppValue = (sqlite3_value *)columnNullValue();
76812 }else{
 
76813 *ppValue = &p->pUnpacked->aMem[iIdx];
76814 if( iIdx==p->iPKey ){
76815 sqlite3VdbeMemSetInt64(*ppValue, p->iKey1);
 
 
 
 
76816 }
76817 }
76818
76819 preupdate_old_out:
76820 sqlite3Error(db, rc);
@@ -76887,11 +76909,11 @@
76887 }
76888 if( iIdx>=pUnpack->nField ){
76889 pMem = (sqlite3_value *)columnNullValue();
76890 }else{
76891 pMem = &pUnpack->aMem[iIdx];
76892 if( iIdx==p->iPKey ){
76893 sqlite3VdbeMemSetInt64(pMem, p->iKey2);
76894 }
76895 }
76896 }else{
76897 /* For an UPDATE, memory cell (p->iNewReg+1+iIdx) contains the required
@@ -76908,11 +76930,11 @@
76908 }
76909 }
76910 assert( iIdx>=0 && iIdx<p->pCsr->nField );
76911 pMem = &p->aNew[iIdx];
76912 if( pMem->flags==0 ){
76913 if( iIdx==p->iPKey ){
76914 sqlite3VdbeMemSetInt64(pMem, p->iKey2);
76915 }else{
76916 rc = sqlite3VdbeMemCopy(pMem, &p->v->aMem[p->iNewReg+1+iIdx]);
76917 if( rc!=SQLITE_OK ) goto preupdate_new_out;
76918 }
@@ -165210,11 +165232,11 @@
165210 ** of the locale to use. Passing an empty string ("") or SQL NULL value
165211 ** as the second argument is the same as invoking the 1 argument version
165212 ** of upper() or lower().
165213 **
165214 ** lower('I', 'en_us') -> 'i'
165215 ** lower('I', 'tr_tr') -> 'ı' (small dotless i)
165216 **
165217 ** http://www.icu-project.org/userguide/posix.html#case_mappings
165218 */
165219 static void icuCaseFunc16(sqlite3_context *p, int nArg, sqlite3_value **apArg){
165220 const UChar *zInput; /* Pointer to input string */
@@ -195599,11 +195621,11 @@
195599 int nArg, /* Number of args */
195600 sqlite3_value **apUnused /* Function arguments */
195601 ){
195602 assert( nArg==0 );
195603 UNUSED_PARAM2(nArg, apUnused);
195604 sqlite3_result_text(pCtx, "fts5: 2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8", -1, SQLITE_TRANSIENT);
195605 }
195606
195607 static int fts5Init(sqlite3 *db){
195608 static const sqlite3_module fts5Mod = {
195609 /* iVersion */ 2,
195610
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.15.1. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
@@ -379,13 +379,13 @@
379 **
380 ** See also: [sqlite3_libversion()],
381 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382 ** [sqlite_version()] and [sqlite_source_id()].
383 */
384 #define SQLITE_VERSION "3.15.1"
385 #define SQLITE_VERSION_NUMBER 3015001
386 #define SQLITE_SOURCE_ID "2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36"
387
388 /*
389 ** CAPI3REF: Run-Time Library Version Numbers
390 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
391 **
@@ -1235,10 +1235,16 @@
1235 ** <li>[[SQLITE_FCNTL_HAS_MOVED]]
1236 ** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
1237 ** pointer to an integer and it writes a boolean into that integer depending
1238 ** on whether or not the file has been renamed, moved, or deleted since it
1239 ** was first opened.
1240 **
1241 ** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]
1242 ** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
1243 ** underlying native file handle associated with a file handle. This file
1244 ** control interprets its argument as a pointer to a native file handle and
1245 ** writes the resulting value there.
1246 **
1247 ** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
1248 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
1249 ** opcode causes the xFileControl method to swap the file handle with the one
1250 ** pointed to by the pArg argument. This capability is used during testing
@@ -1286,10 +1292,11 @@
1292 #define SQLITE_FCNTL_WAL_BLOCK 24
1293 #define SQLITE_FCNTL_ZIPVFS 25
1294 #define SQLITE_FCNTL_RBU 26
1295 #define SQLITE_FCNTL_VFS_POINTER 27
1296 #define SQLITE_FCNTL_JOURNAL_POINTER 28
1297 #define SQLITE_FCNTL_WIN32_GET_HANDLE 29
1298
1299 /* deprecated names */
1300 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1301 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1302 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -13086,14 +13093,17 @@
13093 SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int, int*, int*);
13094 SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
13095 SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
13096 SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
13097 SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager);
13098 SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager);
13099 # ifdef SQLITE_ENABLE_SNAPSHOT
13100 SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
13101 SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
13102 # endif
13103 #else
13104 # define sqlite3PagerUseWal(x) 0
13105 #endif
13106
13107 #ifdef SQLITE_ENABLE_ZIPVFS
13108 SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager);
13109 #endif
@@ -18105,12 +18115,12 @@
18115 UnpackedRecord *pUnpacked; /* Unpacked version of aRecord[] */
18116 UnpackedRecord *pNewUnpacked; /* Unpacked version of new.* record */
18117 int iNewReg; /* Register for new.* values */
18118 i64 iKey1; /* First key value passed to hook */
18119 i64 iKey2; /* Second key value passed to hook */
 
18120 Mem *aNew; /* Array of new.* values */
18121 Table *pTab; /* Schema object being upated */
18122 };
18123
18124 /*
18125 ** Function prototypes
18126 */
@@ -40674,10 +40684,16 @@
40684 a[1] = winIoerrRetryDelay;
40685 }
40686 OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
40687 return SQLITE_OK;
40688 }
40689 case SQLITE_FCNTL_WIN32_GET_HANDLE: {
40690 LPHANDLE phFile = (LPHANDLE)pArg;
40691 *phFile = pFile->h;
40692 OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
40693 return SQLITE_OK;
40694 }
40695 #ifdef SQLITE_TEST
40696 case SQLITE_FCNTL_WIN32_SET_HANDLE: {
40697 LPHANDLE phFile = (LPHANDLE)pArg;
40698 HANDLE hOldFile = pFile->h;
40699 pFile->h = *phFile;
@@ -47164,13 +47180,14 @@
47180 /*
47181 ** Return true if this pager uses a write-ahead log instead of the usual
47182 ** rollback journal. Otherwise false.
47183 */
47184 #ifndef SQLITE_OMIT_WAL
47185 SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager){
47186 return (pPager->pWal!=0);
47187 }
47188 # define pagerUseWal(x) sqlite3PagerUseWal(x)
47189 #else
47190 # define pagerUseWal(x) 0
47191 # define pagerRollbackWal(x) 0
47192 # define pagerWalFrames(v,w,x,y) 0
47193 # define pagerOpenWalIfPresent(z) SQLITE_OK
@@ -62825,11 +62842,11 @@
62842 if( (eOp&0x01)==0 /* (1) */
62843 && offset==0 /* (2) */
62844 && (bEnd || a==ovflSize) /* (6) */
62845 && pBt->inTransaction==TRANS_READ /* (4) */
62846 && (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (3) */
62847 && 0==sqlite3PagerUseWal(pBt->pPager) /* (5) */
62848 && &pBuf[-4]>=pBufStart /* (7) */
62849 ){
62850 u8 aSave[4];
62851 u8 *aWrite = &pBuf[-4];
62852 assert( aWrite>=pBufStart ); /* hence (7) */
@@ -75076,11 +75093,11 @@
75093 preupdate.keyinfo.enc = ENC(db);
75094 preupdate.keyinfo.nField = pTab->nCol;
75095 preupdate.keyinfo.aSortOrder = (u8*)&fakeSortOrder;
75096 preupdate.iKey1 = iKey1;
75097 preupdate.iKey2 = iKey2;
75098 preupdate.pTab = pTab;
75099
75100 db->pPreUpdate = &preupdate;
75101 db->xPreUpdateCallback(db->pPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2);
75102 db->pPreUpdate = 0;
75103 sqlite3DbFree(db, preupdate.aRecord);
@@ -76808,13 +76825,18 @@
76825 }
76826
76827 if( iIdx>=p->pUnpacked->nField ){
76828 *ppValue = (sqlite3_value *)columnNullValue();
76829 }else{
76830 Mem *pMem = *ppValue = &p->pUnpacked->aMem[iIdx];
76831 *ppValue = &p->pUnpacked->aMem[iIdx];
76832 if( iIdx==p->pTab->iPKey ){
76833 sqlite3VdbeMemSetInt64(pMem, p->iKey1);
76834 }else if( p->pTab->aCol[iIdx].affinity==SQLITE_AFF_REAL ){
76835 if( pMem->flags & MEM_Int ){
76836 sqlite3VdbeMemRealify(pMem);
76837 }
76838 }
76839 }
76840
76841 preupdate_old_out:
76842 sqlite3Error(db, rc);
@@ -76887,11 +76909,11 @@
76909 }
76910 if( iIdx>=pUnpack->nField ){
76911 pMem = (sqlite3_value *)columnNullValue();
76912 }else{
76913 pMem = &pUnpack->aMem[iIdx];
76914 if( iIdx==p->pTab->iPKey ){
76915 sqlite3VdbeMemSetInt64(pMem, p->iKey2);
76916 }
76917 }
76918 }else{
76919 /* For an UPDATE, memory cell (p->iNewReg+1+iIdx) contains the required
@@ -76908,11 +76930,11 @@
76930 }
76931 }
76932 assert( iIdx>=0 && iIdx<p->pCsr->nField );
76933 pMem = &p->aNew[iIdx];
76934 if( pMem->flags==0 ){
76935 if( iIdx==p->pTab->iPKey ){
76936 sqlite3VdbeMemSetInt64(pMem, p->iKey2);
76937 }else{
76938 rc = sqlite3VdbeMemCopy(pMem, &p->v->aMem[p->iNewReg+1+iIdx]);
76939 if( rc!=SQLITE_OK ) goto preupdate_new_out;
76940 }
@@ -165210,11 +165232,11 @@
165232 ** of the locale to use. Passing an empty string ("") or SQL NULL value
165233 ** as the second argument is the same as invoking the 1 argument version
165234 ** of upper() or lower().
165235 **
165236 ** lower('I', 'en_us') -> 'i'
165237 ** lower('I', 'tr_tr') -> '\u131' (small dotless i)
165238 **
165239 ** http://www.icu-project.org/userguide/posix.html#case_mappings
165240 */
165241 static void icuCaseFunc16(sqlite3_context *p, int nArg, sqlite3_value **apArg){
165242 const UChar *zInput; /* Pointer to input string */
@@ -195599,11 +195621,11 @@
195621 int nArg, /* Number of args */
195622 sqlite3_value **apUnused /* Function arguments */
195623 ){
195624 assert( nArg==0 );
195625 UNUSED_PARAM2(nArg, apUnused);
195626 sqlite3_result_text(pCtx, "fts5: 2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36", -1, SQLITE_TRANSIENT);
195627 }
195628
195629 static int fts5Init(sqlite3 *db){
195630 static const sqlite3_module fts5Mod = {
195631 /* iVersion */ 2,
195632
+10 -3
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -119,13 +119,13 @@
119119
**
120120
** See also: [sqlite3_libversion()],
121121
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122122
** [sqlite_version()] and [sqlite_source_id()].
123123
*/
124
-#define SQLITE_VERSION "3.15.0"
125
-#define SQLITE_VERSION_NUMBER 3015000
126
-#define SQLITE_SOURCE_ID "2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8"
124
+#define SQLITE_VERSION "3.15.1"
125
+#define SQLITE_VERSION_NUMBER 3015001
126
+#define SQLITE_SOURCE_ID "2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36"
127127
128128
/*
129129
** CAPI3REF: Run-Time Library Version Numbers
130130
** KEYWORDS: sqlite3_version, sqlite3_sourceid
131131
**
@@ -975,10 +975,16 @@
975975
** <li>[[SQLITE_FCNTL_HAS_MOVED]]
976976
** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
977977
** pointer to an integer and it writes a boolean into that integer depending
978978
** on whether or not the file has been renamed, moved, or deleted since it
979979
** was first opened.
980
+**
981
+** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]
982
+** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
983
+** underlying native file handle associated with a file handle. This file
984
+** control interprets its argument as a pointer to a native file handle and
985
+** writes the resulting value there.
980986
**
981987
** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
982988
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
983989
** opcode causes the xFileControl method to swap the file handle with the one
984990
** pointed to by the pArg argument. This capability is used during testing
@@ -1026,10 +1032,11 @@
10261032
#define SQLITE_FCNTL_WAL_BLOCK 24
10271033
#define SQLITE_FCNTL_ZIPVFS 25
10281034
#define SQLITE_FCNTL_RBU 26
10291035
#define SQLITE_FCNTL_VFS_POINTER 27
10301036
#define SQLITE_FCNTL_JOURNAL_POINTER 28
1037
+#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
10311038
10321039
/* deprecated names */
10331040
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
10341041
#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
10351042
#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
10361043
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -119,13 +119,13 @@
119 **
120 ** See also: [sqlite3_libversion()],
121 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122 ** [sqlite_version()] and [sqlite_source_id()].
123 */
124 #define SQLITE_VERSION "3.15.0"
125 #define SQLITE_VERSION_NUMBER 3015000
126 #define SQLITE_SOURCE_ID "2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8"
127
128 /*
129 ** CAPI3REF: Run-Time Library Version Numbers
130 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
131 **
@@ -975,10 +975,16 @@
975 ** <li>[[SQLITE_FCNTL_HAS_MOVED]]
976 ** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
977 ** pointer to an integer and it writes a boolean into that integer depending
978 ** on whether or not the file has been renamed, moved, or deleted since it
979 ** was first opened.
 
 
 
 
 
 
980 **
981 ** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
982 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
983 ** opcode causes the xFileControl method to swap the file handle with the one
984 ** pointed to by the pArg argument. This capability is used during testing
@@ -1026,10 +1032,11 @@
1026 #define SQLITE_FCNTL_WAL_BLOCK 24
1027 #define SQLITE_FCNTL_ZIPVFS 25
1028 #define SQLITE_FCNTL_RBU 26
1029 #define SQLITE_FCNTL_VFS_POINTER 27
1030 #define SQLITE_FCNTL_JOURNAL_POINTER 28
 
1031
1032 /* deprecated names */
1033 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1034 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1035 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
1036
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -119,13 +119,13 @@
119 **
120 ** See also: [sqlite3_libversion()],
121 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122 ** [sqlite_version()] and [sqlite_source_id()].
123 */
124 #define SQLITE_VERSION "3.15.1"
125 #define SQLITE_VERSION_NUMBER 3015001
126 #define SQLITE_SOURCE_ID "2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36"
127
128 /*
129 ** CAPI3REF: Run-Time Library Version Numbers
130 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
131 **
@@ -975,10 +975,16 @@
975 ** <li>[[SQLITE_FCNTL_HAS_MOVED]]
976 ** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
977 ** pointer to an integer and it writes a boolean into that integer depending
978 ** on whether or not the file has been renamed, moved, or deleted since it
979 ** was first opened.
980 **
981 ** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]
982 ** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
983 ** underlying native file handle associated with a file handle. This file
984 ** control interprets its argument as a pointer to a native file handle and
985 ** writes the resulting value there.
986 **
987 ** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
988 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
989 ** opcode causes the xFileControl method to swap the file handle with the one
990 ** pointed to by the pArg argument. This capability is used during testing
@@ -1026,10 +1032,11 @@
1032 #define SQLITE_FCNTL_WAL_BLOCK 24
1033 #define SQLITE_FCNTL_ZIPVFS 25
1034 #define SQLITE_FCNTL_RBU 26
1035 #define SQLITE_FCNTL_VFS_POINTER 27
1036 #define SQLITE_FCNTL_JOURNAL_POINTER 28
1037 #define SQLITE_FCNTL_WIN32_GET_HANDLE 29
1038
1039 /* deprecated names */
1040 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1041 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1042 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
1043

Keyboard Shortcuts

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