Fossil SCM

Update the built-in SQLite to the 3.24.0 release.

drh 2018-06-04 19:52 trunk
Commit f39d0a729075e4e4bc6d09a52c444aee771dbe4ef2ad64b29a2c61757a2abf99
3 files changed +1 -1 +42 -35 +2 -2
+1 -1
--- src/shell.c
+++ src/shell.c
@@ -15743,11 +15743,11 @@
1574315743
** Internal check: Verify that the SQLite is uninitialized. Print a
1574415744
** error message if it is initialized.
1574515745
*/
1574615746
static void verify_uninitialized(void){
1574715747
if( sqlite3_config(-1)==SQLITE_MISUSE ){
15748
- utf8_printf(stdout, "WARNING: attempt to configuration SQLite after"
15748
+ utf8_printf(stdout, "WARNING: attempt to configure SQLite after"
1574915749
" initialization.\n");
1575015750
}
1575115751
}
1575215752
1575315753
/*
1575415754
--- src/shell.c
+++ src/shell.c
@@ -15743,11 +15743,11 @@
15743 ** Internal check: Verify that the SQLite is uninitialized. Print a
15744 ** error message if it is initialized.
15745 */
15746 static void verify_uninitialized(void){
15747 if( sqlite3_config(-1)==SQLITE_MISUSE ){
15748 utf8_printf(stdout, "WARNING: attempt to configuration SQLite after"
15749 " initialization.\n");
15750 }
15751 }
15752
15753 /*
15754
--- src/shell.c
+++ src/shell.c
@@ -15743,11 +15743,11 @@
15743 ** Internal check: Verify that the SQLite is uninitialized. Print a
15744 ** error message if it is initialized.
15745 */
15746 static void verify_uninitialized(void){
15747 if( sqlite3_config(-1)==SQLITE_MISUSE ){
15748 utf8_printf(stdout, "WARNING: attempt to configure SQLite after"
15749 " initialization.\n");
15750 }
15751 }
15752
15753 /*
15754
+42 -35
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1150,11 +1150,11 @@
11501150
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
11511151
** [sqlite_version()] and [sqlite_source_id()].
11521152
*/
11531153
#define SQLITE_VERSION "3.24.0"
11541154
#define SQLITE_VERSION_NUMBER 3024000
1155
-#define SQLITE_SOURCE_ID "2018-05-30 01:14:20 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7de4c2"
1155
+#define SQLITE_SOURCE_ID "2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca"
11561156
11571157
/*
11581158
** CAPI3REF: Run-Time Library Version Numbers
11591159
** KEYWORDS: sqlite3_version sqlite3_sourceid
11601160
**
@@ -10063,11 +10063,11 @@
1006310063
** memory representation of the database exists. A contiguous memory
1006410064
** representation of the database will usually only exist if there has
1006510065
** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
1006610066
** values of D and S.
1006710067
** The size of the database is written into *P even if the
10068
-** SQLITE_SERIALIZE_NOCOPY bit is set but no contigious copy
10068
+** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
1006910069
** of the database exists.
1007010070
**
1007110071
** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
1007210072
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
1007310073
** allocation error occurs.
@@ -35437,11 +35437,11 @@
3543735437
** or an error number on failure". See the manpage for details. */
3543835438
int err;
3543935439
do{
3544035440
err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
3544135441
}while( err==EINTR );
35442
- if( err ) return SQLITE_IOERR_WRITE;
35442
+ if( err && err!=EINVAL ) return SQLITE_IOERR_WRITE;
3544335443
#else
3544435444
/* If the OS does not have posix_fallocate(), fake it. Write a
3544535445
** single byte to the last byte in each block that falls entirely
3544635446
** within the extended region. Then, if required, a single byte
3544735447
** at offset (nSize-1), to set the size of the file correctly.
@@ -62893,11 +62893,15 @@
6289362893
**
6289462894
** Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor
6289562895
** back to where it ought to be if this routine returns true.
6289662896
*/
6289762897
SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor *pCur){
62898
- return pCur->eState!=CURSOR_VALID;
62898
+ assert( EIGHT_BYTE_ALIGNMENT(pCur)
62899
+ || pCur==sqlite3BtreeFakeValidCursor() );
62900
+ assert( offsetof(BtCursor, eState)==0 );
62901
+ assert( sizeof(pCur->eState)==1 );
62902
+ return CURSOR_VALID != *(u8*)pCur;
6289962903
}
6290062904
6290162905
/*
6290262906
** Return a pointer to a fake BtCursor object that will always answer
6290362907
** false to the sqlite3BtreeCursorHasMoved() routine above. The fake
@@ -86664,14 +86668,14 @@
8666486668
** If cursor P2 is a table, then the content extracted is the data.
8666586669
**
8666686670
** If the P1 cursor must be pointing to a valid row (not a NULL row)
8666786671
** of a real table, not a pseudo-table.
8666886672
**
86669
-** If P3!=0 then this opcode is allowed to make an ephermeral pointer
86673
+** If P3!=0 then this opcode is allowed to make an ephemeral pointer
8667086674
** into the database page. That means that the content of the output
8667186675
** register will be invalidated as soon as the cursor moves - including
86672
-** moves caused by other cursors that "save" the the current cursors
86676
+** moves caused by other cursors that "save" the current cursors
8667386677
** position in order that they can write to the same table. If P3==0
8667486678
** then a copy of the data is made into memory. P3!=0 is faster, but
8667586679
** P3==0 is safer.
8667686680
**
8667786681
** If P3!=0 then the content of the P2 register is unsuitable for use
@@ -87484,11 +87488,11 @@
8748487488
** Synopsis: r[P2]=root iDb=P1 flags=P3
8748587489
**
8748687490
** Allocate a new b-tree in the main database file if P1==0 or in the
8748787491
** TEMP database file if P1==1 or in an attached database if
8748887492
** P1>1. The P3 argument must be 1 (BTREE_INTKEY) for a rowid table
87489
-** it must be 2 (BTREE_BLOBKEY) for a index or WITHOUT ROWID table.
87493
+** it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table.
8749087494
** The root page number of the new b-tree is stored in register P2.
8749187495
*/
8749287496
case OP_CreateBtree: { /* out2 */
8749387497
int pgno;
8749487498
Db *pDb;
@@ -93231,33 +93235,35 @@
9323193235
assert( iCol>=0 && iCol<pEList->nExpr );
9323293236
pOrig = pEList->a[iCol].pExpr;
9323393237
assert( pOrig!=0 );
9323493238
db = pParse->db;
9323593239
pDup = sqlite3ExprDup(db, pOrig, 0);
93236
- if( pDup==0 ) return;
93237
- if( zType[0]!='G' ) incrAggFunctionDepth(pDup, nSubquery);
93238
- if( pExpr->op==TK_COLLATE ){
93239
- pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
93240
- }
93241
- ExprSetProperty(pDup, EP_Alias);
93242
-
93243
- /* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
93244
- ** prevents ExprDelete() from deleting the Expr structure itself,
93245
- ** allowing it to be repopulated by the memcpy() on the following line.
93246
- ** The pExpr->u.zToken might point into memory that will be freed by the
93247
- ** sqlite3DbFree(db, pDup) on the last line of this block, so be sure to
93248
- ** make a copy of the token before doing the sqlite3DbFree().
93249
- */
93250
- ExprSetProperty(pExpr, EP_Static);
93251
- sqlite3ExprDelete(db, pExpr);
93252
- memcpy(pExpr, pDup, sizeof(*pExpr));
93253
- if( !ExprHasProperty(pExpr, EP_IntValue) && pExpr->u.zToken!=0 ){
93254
- assert( (pExpr->flags & (EP_Reduced|EP_TokenOnly))==0 );
93255
- pExpr->u.zToken = sqlite3DbStrDup(db, pExpr->u.zToken);
93256
- pExpr->flags |= EP_MemToken;
93257
- }
93258
- sqlite3DbFree(db, pDup);
93240
+ if( pDup!=0 ){
93241
+ if( zType[0]!='G' ) incrAggFunctionDepth(pDup, nSubquery);
93242
+ if( pExpr->op==TK_COLLATE ){
93243
+ pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
93244
+ }
93245
+ ExprSetProperty(pDup, EP_Alias);
93246
+
93247
+ /* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
93248
+ ** prevents ExprDelete() from deleting the Expr structure itself,
93249
+ ** allowing it to be repopulated by the memcpy() on the following line.
93250
+ ** The pExpr->u.zToken might point into memory that will be freed by the
93251
+ ** sqlite3DbFree(db, pDup) on the last line of this block, so be sure to
93252
+ ** make a copy of the token before doing the sqlite3DbFree().
93253
+ */
93254
+ ExprSetProperty(pExpr, EP_Static);
93255
+ sqlite3ExprDelete(db, pExpr);
93256
+ memcpy(pExpr, pDup, sizeof(*pExpr));
93257
+ if( !ExprHasProperty(pExpr, EP_IntValue) && pExpr->u.zToken!=0 ){
93258
+ assert( (pExpr->flags & (EP_Reduced|EP_TokenOnly))==0 );
93259
+ pExpr->u.zToken = sqlite3DbStrDup(db, pExpr->u.zToken);
93260
+ pExpr->flags |= EP_MemToken;
93261
+ }
93262
+ sqlite3DbFree(db, pDup);
93263
+ }
93264
+ ExprSetProperty(pExpr, EP_Alias);
9325993265
}
9326093266
9326193267
9326293268
/*
9326393269
** Return TRUE if the name zCol occurs anywhere in the USING clause.
@@ -93505,10 +93511,11 @@
9350593511
#ifndef SQLITE_OMIT_UPSERT
9350693512
if( pExpr->iTable==2 ){
9350793513
testcase( iCol==(-1) );
9350893514
pExpr->iTable = pNC->uNC.pUpsert->regData + iCol;
9350993515
eNewExprOp = TK_REGISTER;
93516
+ ExprSetProperty(pExpr, EP_Alias);
9351093517
}else
9351193518
#endif /* SQLITE_OMIT_UPSERT */
9351293519
{
9351393520
#ifndef SQLITE_OMIT_TRIGGER
9351493521
if( iCol<0 ){
@@ -103788,19 +103795,19 @@
103788103795
const char *zCol; /* Name of the column of the table */
103789103796
int iSrc; /* Index in pTabList->a[] of table being read */
103790103797
int iDb; /* The index of the database the expression refers to */
103791103798
int iCol; /* Index of column in table */
103792103799
103800
+ assert( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER );
103793103801
if( db->xAuth==0 ) return;
103794103802
iDb = sqlite3SchemaToIndex(pParse->db, pSchema);
103795103803
if( iDb<0 ){
103796103804
/* An attempt to read a column out of a subquery or other
103797103805
** temporary table. */
103798103806
return;
103799103807
}
103800103808
103801
- assert( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER );
103802103809
if( pExpr->op==TK_TRIGGER ){
103803103810
pTab = pParse->pTriggerTab;
103804103811
}else{
103805103812
assert( pTabList );
103806103813
for(iSrc=0; ALWAYS(iSrc<pTabList->nSrc); iSrc++){
@@ -122104,11 +122111,11 @@
122104122111
for(i=0; i<pEList->nExpr; i++){
122105122112
struct ExprList_item *pItem = &pEList->a[i];
122106122113
if( pItem->u.x.iOrderByCol==0 ){
122107122114
Expr *pExpr = pItem->pExpr;
122108122115
Table *pTab = pExpr->pTab;
122109
- if( pExpr->op==TK_COLUMN && pTab && !IsVirtual(pTab)
122116
+ if( pExpr->op==TK_COLUMN && pExpr->iColumn>=0 && pTab && !IsVirtual(pTab)
122110122117
&& (pTab->aCol[pExpr->iColumn].colFlags & COLFLAG_SORTERREF)
122111122118
){
122112122119
int j;
122113122120
for(j=0; j<nDefer; j++){
122114122121
if( pSort->aDefer[j].iCsr==pExpr->iTable ) break;
@@ -207576,11 +207583,11 @@
207576207583
int nArg, /* Number of args */
207577207584
sqlite3_value **apUnused /* Function arguments */
207578207585
){
207579207586
assert( nArg==0 );
207580207587
UNUSED_PARAM2(nArg, apUnused);
207581
- sqlite3_result_text(pCtx, "fts5: 2018-05-30 01:14:20 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7de4c2", -1, SQLITE_TRANSIENT);
207588
+ sqlite3_result_text(pCtx, "fts5: 2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca", -1, SQLITE_TRANSIENT);
207582207589
}
207583207590
207584207591
static int fts5Init(sqlite3 *db){
207585207592
static const sqlite3_module fts5Mod = {
207586207593
/* iVersion */ 2,
@@ -211846,12 +211853,12 @@
211846211853
}
211847211854
#endif /* SQLITE_CORE */
211848211855
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
211849211856
211850211857
/************** End of stmt.c ************************************************/
211851
-#if __LINE__!=211851
211858
+#if __LINE__!=211858
211852211859
#undef SQLITE_SOURCE_ID
211853
-#define SQLITE_SOURCE_ID "2018-05-30 01:14:20 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7dalt2"
211860
+#define SQLITE_SOURCE_ID "2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199aalt2"
211854211861
#endif
211855211862
/* Return the source-id for this library */
211856211863
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
211857211864
/************************** End of sqlite3.c ******************************/
211858211865
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1150,11 +1150,11 @@
1150 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1151 ** [sqlite_version()] and [sqlite_source_id()].
1152 */
1153 #define SQLITE_VERSION "3.24.0"
1154 #define SQLITE_VERSION_NUMBER 3024000
1155 #define SQLITE_SOURCE_ID "2018-05-30 01:14:20 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7de4c2"
1156
1157 /*
1158 ** CAPI3REF: Run-Time Library Version Numbers
1159 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1160 **
@@ -10063,11 +10063,11 @@
10063 ** memory representation of the database exists. A contiguous memory
10064 ** representation of the database will usually only exist if there has
10065 ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
10066 ** values of D and S.
10067 ** The size of the database is written into *P even if the
10068 ** SQLITE_SERIALIZE_NOCOPY bit is set but no contigious copy
10069 ** of the database exists.
10070 **
10071 ** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
10072 ** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
10073 ** allocation error occurs.
@@ -35437,11 +35437,11 @@
35437 ** or an error number on failure". See the manpage for details. */
35438 int err;
35439 do{
35440 err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
35441 }while( err==EINTR );
35442 if( err ) return SQLITE_IOERR_WRITE;
35443 #else
35444 /* If the OS does not have posix_fallocate(), fake it. Write a
35445 ** single byte to the last byte in each block that falls entirely
35446 ** within the extended region. Then, if required, a single byte
35447 ** at offset (nSize-1), to set the size of the file correctly.
@@ -62893,11 +62893,15 @@
62893 **
62894 ** Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor
62895 ** back to where it ought to be if this routine returns true.
62896 */
62897 SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor *pCur){
62898 return pCur->eState!=CURSOR_VALID;
 
 
 
 
62899 }
62900
62901 /*
62902 ** Return a pointer to a fake BtCursor object that will always answer
62903 ** false to the sqlite3BtreeCursorHasMoved() routine above. The fake
@@ -86664,14 +86668,14 @@
86664 ** If cursor P2 is a table, then the content extracted is the data.
86665 **
86666 ** If the P1 cursor must be pointing to a valid row (not a NULL row)
86667 ** of a real table, not a pseudo-table.
86668 **
86669 ** If P3!=0 then this opcode is allowed to make an ephermeral pointer
86670 ** into the database page. That means that the content of the output
86671 ** register will be invalidated as soon as the cursor moves - including
86672 ** moves caused by other cursors that "save" the the current cursors
86673 ** position in order that they can write to the same table. If P3==0
86674 ** then a copy of the data is made into memory. P3!=0 is faster, but
86675 ** P3==0 is safer.
86676 **
86677 ** If P3!=0 then the content of the P2 register is unsuitable for use
@@ -87484,11 +87488,11 @@
87484 ** Synopsis: r[P2]=root iDb=P1 flags=P3
87485 **
87486 ** Allocate a new b-tree in the main database file if P1==0 or in the
87487 ** TEMP database file if P1==1 or in an attached database if
87488 ** P1>1. The P3 argument must be 1 (BTREE_INTKEY) for a rowid table
87489 ** it must be 2 (BTREE_BLOBKEY) for a index or WITHOUT ROWID table.
87490 ** The root page number of the new b-tree is stored in register P2.
87491 */
87492 case OP_CreateBtree: { /* out2 */
87493 int pgno;
87494 Db *pDb;
@@ -93231,33 +93235,35 @@
93231 assert( iCol>=0 && iCol<pEList->nExpr );
93232 pOrig = pEList->a[iCol].pExpr;
93233 assert( pOrig!=0 );
93234 db = pParse->db;
93235 pDup = sqlite3ExprDup(db, pOrig, 0);
93236 if( pDup==0 ) return;
93237 if( zType[0]!='G' ) incrAggFunctionDepth(pDup, nSubquery);
93238 if( pExpr->op==TK_COLLATE ){
93239 pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
93240 }
93241 ExprSetProperty(pDup, EP_Alias);
93242
93243 /* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
93244 ** prevents ExprDelete() from deleting the Expr structure itself,
93245 ** allowing it to be repopulated by the memcpy() on the following line.
93246 ** The pExpr->u.zToken might point into memory that will be freed by the
93247 ** sqlite3DbFree(db, pDup) on the last line of this block, so be sure to
93248 ** make a copy of the token before doing the sqlite3DbFree().
93249 */
93250 ExprSetProperty(pExpr, EP_Static);
93251 sqlite3ExprDelete(db, pExpr);
93252 memcpy(pExpr, pDup, sizeof(*pExpr));
93253 if( !ExprHasProperty(pExpr, EP_IntValue) && pExpr->u.zToken!=0 ){
93254 assert( (pExpr->flags & (EP_Reduced|EP_TokenOnly))==0 );
93255 pExpr->u.zToken = sqlite3DbStrDup(db, pExpr->u.zToken);
93256 pExpr->flags |= EP_MemToken;
93257 }
93258 sqlite3DbFree(db, pDup);
 
 
93259 }
93260
93261
93262 /*
93263 ** Return TRUE if the name zCol occurs anywhere in the USING clause.
@@ -93505,10 +93511,11 @@
93505 #ifndef SQLITE_OMIT_UPSERT
93506 if( pExpr->iTable==2 ){
93507 testcase( iCol==(-1) );
93508 pExpr->iTable = pNC->uNC.pUpsert->regData + iCol;
93509 eNewExprOp = TK_REGISTER;
 
93510 }else
93511 #endif /* SQLITE_OMIT_UPSERT */
93512 {
93513 #ifndef SQLITE_OMIT_TRIGGER
93514 if( iCol<0 ){
@@ -103788,19 +103795,19 @@
103788 const char *zCol; /* Name of the column of the table */
103789 int iSrc; /* Index in pTabList->a[] of table being read */
103790 int iDb; /* The index of the database the expression refers to */
103791 int iCol; /* Index of column in table */
103792
 
103793 if( db->xAuth==0 ) return;
103794 iDb = sqlite3SchemaToIndex(pParse->db, pSchema);
103795 if( iDb<0 ){
103796 /* An attempt to read a column out of a subquery or other
103797 ** temporary table. */
103798 return;
103799 }
103800
103801 assert( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER );
103802 if( pExpr->op==TK_TRIGGER ){
103803 pTab = pParse->pTriggerTab;
103804 }else{
103805 assert( pTabList );
103806 for(iSrc=0; ALWAYS(iSrc<pTabList->nSrc); iSrc++){
@@ -122104,11 +122111,11 @@
122104 for(i=0; i<pEList->nExpr; i++){
122105 struct ExprList_item *pItem = &pEList->a[i];
122106 if( pItem->u.x.iOrderByCol==0 ){
122107 Expr *pExpr = pItem->pExpr;
122108 Table *pTab = pExpr->pTab;
122109 if( pExpr->op==TK_COLUMN && pTab && !IsVirtual(pTab)
122110 && (pTab->aCol[pExpr->iColumn].colFlags & COLFLAG_SORTERREF)
122111 ){
122112 int j;
122113 for(j=0; j<nDefer; j++){
122114 if( pSort->aDefer[j].iCsr==pExpr->iTable ) break;
@@ -207576,11 +207583,11 @@
207576 int nArg, /* Number of args */
207577 sqlite3_value **apUnused /* Function arguments */
207578 ){
207579 assert( nArg==0 );
207580 UNUSED_PARAM2(nArg, apUnused);
207581 sqlite3_result_text(pCtx, "fts5: 2018-05-30 01:14:20 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7de4c2", -1, SQLITE_TRANSIENT);
207582 }
207583
207584 static int fts5Init(sqlite3 *db){
207585 static const sqlite3_module fts5Mod = {
207586 /* iVersion */ 2,
@@ -211846,12 +211853,12 @@
211846 }
211847 #endif /* SQLITE_CORE */
211848 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
211849
211850 /************** End of stmt.c ************************************************/
211851 #if __LINE__!=211851
211852 #undef SQLITE_SOURCE_ID
211853 #define SQLITE_SOURCE_ID "2018-05-30 01:14:20 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7dalt2"
211854 #endif
211855 /* Return the source-id for this library */
211856 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
211857 /************************** End of sqlite3.c ******************************/
211858
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1150,11 +1150,11 @@
1150 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1151 ** [sqlite_version()] and [sqlite_source_id()].
1152 */
1153 #define SQLITE_VERSION "3.24.0"
1154 #define SQLITE_VERSION_NUMBER 3024000
1155 #define SQLITE_SOURCE_ID "2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca"
1156
1157 /*
1158 ** CAPI3REF: Run-Time Library Version Numbers
1159 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1160 **
@@ -10063,11 +10063,11 @@
10063 ** memory representation of the database exists. A contiguous memory
10064 ** representation of the database will usually only exist if there has
10065 ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
10066 ** values of D and S.
10067 ** The size of the database is written into *P even if the
10068 ** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
10069 ** of the database exists.
10070 **
10071 ** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
10072 ** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
10073 ** allocation error occurs.
@@ -35437,11 +35437,11 @@
35437 ** or an error number on failure". See the manpage for details. */
35438 int err;
35439 do{
35440 err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
35441 }while( err==EINTR );
35442 if( err && err!=EINVAL ) return SQLITE_IOERR_WRITE;
35443 #else
35444 /* If the OS does not have posix_fallocate(), fake it. Write a
35445 ** single byte to the last byte in each block that falls entirely
35446 ** within the extended region. Then, if required, a single byte
35447 ** at offset (nSize-1), to set the size of the file correctly.
@@ -62893,11 +62893,15 @@
62893 **
62894 ** Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor
62895 ** back to where it ought to be if this routine returns true.
62896 */
62897 SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor *pCur){
62898 assert( EIGHT_BYTE_ALIGNMENT(pCur)
62899 || pCur==sqlite3BtreeFakeValidCursor() );
62900 assert( offsetof(BtCursor, eState)==0 );
62901 assert( sizeof(pCur->eState)==1 );
62902 return CURSOR_VALID != *(u8*)pCur;
62903 }
62904
62905 /*
62906 ** Return a pointer to a fake BtCursor object that will always answer
62907 ** false to the sqlite3BtreeCursorHasMoved() routine above. The fake
@@ -86664,14 +86668,14 @@
86668 ** If cursor P2 is a table, then the content extracted is the data.
86669 **
86670 ** If the P1 cursor must be pointing to a valid row (not a NULL row)
86671 ** of a real table, not a pseudo-table.
86672 **
86673 ** If P3!=0 then this opcode is allowed to make an ephemeral pointer
86674 ** into the database page. That means that the content of the output
86675 ** register will be invalidated as soon as the cursor moves - including
86676 ** moves caused by other cursors that "save" the current cursors
86677 ** position in order that they can write to the same table. If P3==0
86678 ** then a copy of the data is made into memory. P3!=0 is faster, but
86679 ** P3==0 is safer.
86680 **
86681 ** If P3!=0 then the content of the P2 register is unsuitable for use
@@ -87484,11 +87488,11 @@
87488 ** Synopsis: r[P2]=root iDb=P1 flags=P3
87489 **
87490 ** Allocate a new b-tree in the main database file if P1==0 or in the
87491 ** TEMP database file if P1==1 or in an attached database if
87492 ** P1>1. The P3 argument must be 1 (BTREE_INTKEY) for a rowid table
87493 ** it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table.
87494 ** The root page number of the new b-tree is stored in register P2.
87495 */
87496 case OP_CreateBtree: { /* out2 */
87497 int pgno;
87498 Db *pDb;
@@ -93231,33 +93235,35 @@
93235 assert( iCol>=0 && iCol<pEList->nExpr );
93236 pOrig = pEList->a[iCol].pExpr;
93237 assert( pOrig!=0 );
93238 db = pParse->db;
93239 pDup = sqlite3ExprDup(db, pOrig, 0);
93240 if( pDup!=0 ){
93241 if( zType[0]!='G' ) incrAggFunctionDepth(pDup, nSubquery);
93242 if( pExpr->op==TK_COLLATE ){
93243 pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
93244 }
93245 ExprSetProperty(pDup, EP_Alias);
93246
93247 /* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
93248 ** prevents ExprDelete() from deleting the Expr structure itself,
93249 ** allowing it to be repopulated by the memcpy() on the following line.
93250 ** The pExpr->u.zToken might point into memory that will be freed by the
93251 ** sqlite3DbFree(db, pDup) on the last line of this block, so be sure to
93252 ** make a copy of the token before doing the sqlite3DbFree().
93253 */
93254 ExprSetProperty(pExpr, EP_Static);
93255 sqlite3ExprDelete(db, pExpr);
93256 memcpy(pExpr, pDup, sizeof(*pExpr));
93257 if( !ExprHasProperty(pExpr, EP_IntValue) && pExpr->u.zToken!=0 ){
93258 assert( (pExpr->flags & (EP_Reduced|EP_TokenOnly))==0 );
93259 pExpr->u.zToken = sqlite3DbStrDup(db, pExpr->u.zToken);
93260 pExpr->flags |= EP_MemToken;
93261 }
93262 sqlite3DbFree(db, pDup);
93263 }
93264 ExprSetProperty(pExpr, EP_Alias);
93265 }
93266
93267
93268 /*
93269 ** Return TRUE if the name zCol occurs anywhere in the USING clause.
@@ -93505,10 +93511,11 @@
93511 #ifndef SQLITE_OMIT_UPSERT
93512 if( pExpr->iTable==2 ){
93513 testcase( iCol==(-1) );
93514 pExpr->iTable = pNC->uNC.pUpsert->regData + iCol;
93515 eNewExprOp = TK_REGISTER;
93516 ExprSetProperty(pExpr, EP_Alias);
93517 }else
93518 #endif /* SQLITE_OMIT_UPSERT */
93519 {
93520 #ifndef SQLITE_OMIT_TRIGGER
93521 if( iCol<0 ){
@@ -103788,19 +103795,19 @@
103795 const char *zCol; /* Name of the column of the table */
103796 int iSrc; /* Index in pTabList->a[] of table being read */
103797 int iDb; /* The index of the database the expression refers to */
103798 int iCol; /* Index of column in table */
103799
103800 assert( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER );
103801 if( db->xAuth==0 ) return;
103802 iDb = sqlite3SchemaToIndex(pParse->db, pSchema);
103803 if( iDb<0 ){
103804 /* An attempt to read a column out of a subquery or other
103805 ** temporary table. */
103806 return;
103807 }
103808
 
103809 if( pExpr->op==TK_TRIGGER ){
103810 pTab = pParse->pTriggerTab;
103811 }else{
103812 assert( pTabList );
103813 for(iSrc=0; ALWAYS(iSrc<pTabList->nSrc); iSrc++){
@@ -122104,11 +122111,11 @@
122111 for(i=0; i<pEList->nExpr; i++){
122112 struct ExprList_item *pItem = &pEList->a[i];
122113 if( pItem->u.x.iOrderByCol==0 ){
122114 Expr *pExpr = pItem->pExpr;
122115 Table *pTab = pExpr->pTab;
122116 if( pExpr->op==TK_COLUMN && pExpr->iColumn>=0 && pTab && !IsVirtual(pTab)
122117 && (pTab->aCol[pExpr->iColumn].colFlags & COLFLAG_SORTERREF)
122118 ){
122119 int j;
122120 for(j=0; j<nDefer; j++){
122121 if( pSort->aDefer[j].iCsr==pExpr->iTable ) break;
@@ -207576,11 +207583,11 @@
207583 int nArg, /* Number of args */
207584 sqlite3_value **apUnused /* Function arguments */
207585 ){
207586 assert( nArg==0 );
207587 UNUSED_PARAM2(nArg, apUnused);
207588 sqlite3_result_text(pCtx, "fts5: 2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca", -1, SQLITE_TRANSIENT);
207589 }
207590
207591 static int fts5Init(sqlite3 *db){
207592 static const sqlite3_module fts5Mod = {
207593 /* iVersion */ 2,
@@ -211846,12 +211853,12 @@
211853 }
211854 #endif /* SQLITE_CORE */
211855 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
211856
211857 /************** End of stmt.c ************************************************/
211858 #if __LINE__!=211858
211859 #undef SQLITE_SOURCE_ID
211860 #define SQLITE_SOURCE_ID "2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199aalt2"
211861 #endif
211862 /* Return the source-id for this library */
211863 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
211864 /************************** End of sqlite3.c ******************************/
211865
+2 -2
--- 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.24.0"
127127
#define SQLITE_VERSION_NUMBER 3024000
128
-#define SQLITE_SOURCE_ID "2018-05-30 01:14:20 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7de4c2"
128
+#define SQLITE_SOURCE_ID "2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
@@ -9036,11 +9036,11 @@
90369036
** memory representation of the database exists. A contiguous memory
90379037
** representation of the database will usually only exist if there has
90389038
** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
90399039
** values of D and S.
90409040
** The size of the database is written into *P even if the
9041
-** SQLITE_SERIALIZE_NOCOPY bit is set but no contigious copy
9041
+** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
90429042
** of the database exists.
90439043
**
90449044
** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
90459045
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
90469046
** allocation error occurs.
90479047
--- 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.24.0"
127 #define SQLITE_VERSION_NUMBER 3024000
128 #define SQLITE_SOURCE_ID "2018-05-30 01:14:20 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7de4c2"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -9036,11 +9036,11 @@
9036 ** memory representation of the database exists. A contiguous memory
9037 ** representation of the database will usually only exist if there has
9038 ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
9039 ** values of D and S.
9040 ** The size of the database is written into *P even if the
9041 ** SQLITE_SERIALIZE_NOCOPY bit is set but no contigious copy
9042 ** of the database exists.
9043 **
9044 ** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
9045 ** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
9046 ** allocation error occurs.
9047
--- 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.24.0"
127 #define SQLITE_VERSION_NUMBER 3024000
128 #define SQLITE_SOURCE_ID "2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -9036,11 +9036,11 @@
9036 ** memory representation of the database exists. A contiguous memory
9037 ** representation of the database will usually only exist if there has
9038 ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
9039 ** values of D and S.
9040 ** The size of the database is written into *P even if the
9041 ** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
9042 ** of the database exists.
9043 **
9044 ** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
9045 ** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
9046 ** allocation error occurs.
9047

Keyboard Shortcuts

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