Fossil SCM

Update the built-in SQLite to 3.14 release.

drh 2016-08-08 14:20 trunk
Commit 60d5fee782d03aedf5248cfa604226b7533fbc47
2 files changed +31 -13 +5 -6
+31 -13
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -380,11 +380,11 @@
380380
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381381
** [sqlite_version()] and [sqlite_source_id()].
382382
*/
383383
#define SQLITE_VERSION "3.14.0"
384384
#define SQLITE_VERSION_NUMBER 3014000
385
-#define SQLITE_SOURCE_ID "2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2"
385
+#define SQLITE_SOURCE_ID "2016-08-08 13:40:27 d5e98057028abcf7217d0d2b2e29bbbcdf09d6de"
386386
387387
/*
388388
** CAPI3REF: Run-Time Library Version Numbers
389389
** KEYWORDS: sqlite3_version, sqlite3_sourceid
390390
**
@@ -2217,11 +2217,11 @@
22172217
** interface independently of the [load_extension()] SQL function.
22182218
** The [sqlite3_enable_load_extension()] API enables or disables both the
22192219
** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
22202220
** There should be two additional arguments.
22212221
** When the first argument to this interface is 1, then only the C-API is
2222
-** enabled and the SQL function remains disabled. If the first argment to
2222
+** enabled and the SQL function remains disabled. If the first argument to
22232223
** this interface is 0, then both the C-API and the SQL function are disabled.
22242224
** If the first argument is -1, then no changes are made to state of either the
22252225
** C-API or the SQL function.
22262226
** The second parameter is a pointer to an integer into which
22272227
** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
@@ -5795,11 +5795,11 @@
57955795
** interface returns SQLITE_OK and fills in the non-NULL pointers in
57965796
** the final five arguments with appropriate values if the specified
57975797
** column exists. ^The sqlite3_table_column_metadata() interface returns
57985798
** SQLITE_ERROR and if the specified column does not exist.
57995799
** ^If the column-name parameter to sqlite3_table_column_metadata() is a
5800
-** NULL pointer, then this routine simply checks for the existance of the
5800
+** NULL pointer, then this routine simply checks for the existence of the
58015801
** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
58025802
** does not.
58035803
**
58045804
** ^The column is identified by the second, third and fourth parameters to
58055805
** this function. ^(The second parameter is either the name of the database
@@ -8390,11 +8390,11 @@
83908390
** tables.
83918391
**
83928392
** ^The second parameter to the preupdate callback is a pointer to
83938393
** the [database connection] that registered the preupdate hook.
83948394
** ^The third parameter to the preupdate callback is one of the constants
8395
-** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to indentify the
8395
+** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the
83968396
** kind of update operation that is about to occur.
83978397
** ^(The fourth parameter to the preupdate callback is the name of the
83988398
** database within the database connection that is being modified. This
83998399
** will be "main" for the main database or "temp" for TEMP tables or
84008400
** the name given after the AS keyword in the [ATTACH] statement for attached
@@ -10337,11 +10337,11 @@
1033710337
** following structure. All structure methods must be defined, setting
1033810338
** any member of the fts5_tokenizer struct to NULL leads to undefined
1033910339
** behaviour. The structure methods are expected to function as follows:
1034010340
**
1034110341
** xCreate:
10342
-** This function is used to allocate and inititalize a tokenizer instance.
10342
+** This function is used to allocate and initialize a tokenizer instance.
1034310343
** A tokenizer instance is required to actually tokenize text.
1034410344
**
1034510345
** The first argument passed to this function is a copy of the (void*)
1034610346
** pointer provided by the application when the fts5_tokenizer object
1034710347
** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -10596,11 +10596,10 @@
1059610596
#if 0
1059710597
} /* end of the 'extern "C"' block */
1059810598
#endif
1059910599
1060010600
#endif /* _FTS5_H */
10601
-
1060210601
1060310602
/******** End of fts5.h *********/
1060410603
1060510604
/************** End of sqlite3.h *********************************************/
1060610605
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -13084,10 +13083,11 @@
1308413083
SQLITE_PRIVATE sqlite3_file *sqlite3PagerJrnlFile(Pager*);
1308513084
SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);
1308613085
SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*);
1308713086
SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*);
1308813087
SQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *, int, int, int *);
13088
+SQLITE_PRIVATE void sqlite3PagerClearCache(Pager*);
1308913089
SQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *);
1309013090
1309113091
/* Functions used to truncate the database file. */
1309213092
SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno);
1309313093
@@ -53411,10 +53411,21 @@
5341153411
** sqlite3BackupUpdate() only.
5341253412
*/
5341353413
SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
5341453414
return &pPager->pBackup;
5341553415
}
53416
+
53417
+#ifndef SQLITE_OMIT_VACUUM
53418
+/*
53419
+** Unless this is an in-memory or temporary database, clear the pager cache.
53420
+*/
53421
+SQLITE_PRIVATE void sqlite3PagerClearCache(Pager *pPager){
53422
+ assert( MEMDB==0 || pPager->tempFile );
53423
+ if( pPager->tempFile==0 ) pager_reset(pPager);
53424
+}
53425
+#endif
53426
+
5341653427
5341753428
#ifndef SQLITE_OMIT_WAL
5341853429
/*
5341953430
** This function is called when the user invokes "PRAGMA wal_checkpoint",
5342053431
** "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint()
@@ -53636,11 +53647,10 @@
5363653647
SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager){
5363753648
assert( pPager->eState>=PAGER_READER );
5363853649
return sqlite3WalFramesize(pPager->pWal);
5363953650
}
5364053651
#endif
53641
-
5364253652
5364353653
#endif /* SQLITE_OMIT_DISKIO */
5364453654
5364553655
/************** End of pager.c ***********************************************/
5364653656
/************** Begin file wal.c *********************************************/
@@ -68596,17 +68606,19 @@
6859668606
/* 0x7FFFFFFF is the hard limit for the number of pages in a database
6859768607
** file. By passing this as the number of pages to copy to
6859868608
** sqlite3_backup_step(), we can guarantee that the copy finishes
6859968609
** within a single call (unless an error occurs). The assert() statement
6860068610
** checks this assumption - (p->rc) should be set to either SQLITE_DONE
68601
- ** or an error code.
68602
- */
68611
+ ** or an error code. */
6860368612
sqlite3_backup_step(&b, 0x7FFFFFFF);
6860468613
assert( b.rc!=SQLITE_OK );
68614
+
6860568615
rc = sqlite3_backup_finish(&b);
6860668616
if( rc==SQLITE_OK ){
6860768617
pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;
68618
+ }else{
68619
+ sqlite3PagerClearCache(sqlite3BtreePager(b.pDest));
6860868620
}
6860968621
6861068622
assert( sqlite3BtreeIsInTrans(pTo)==0 );
6861168623
copy_finished:
6861268624
sqlite3BtreeLeave(pFrom);
@@ -100390,10 +100402,17 @@
100390100402
for(pLoop=pTab->pIndex, n=1; pLoop; pLoop=pLoop->pNext, n++){}
100391100403
zName = sqlite3MPrintf(db, "sqlite_autoindex_%s_%d", pTab->zName, n);
100392100404
if( zName==0 ){
100393100405
goto exit_create_index;
100394100406
}
100407
+
100408
+ /* Automatic index names generated from within sqlite3_declare_vtab()
100409
+ ** must have names that are distinct from normal automatic index names.
100410
+ ** The following statement converts "sqlite3_autoindex..." into
100411
+ ** "sqlite3_butoindex..." in order to make the names distinct.
100412
+ ** The "vtab_err.test" test demonstrates the need of this statement. */
100413
+ if( IN_DECLARE_VTAB ) zName[7]++;
100395100414
}
100396100415
100397100416
/* Check for authorization to create an index.
100398100417
*/
100399100418
#ifndef SQLITE_OMIT_AUTHORIZATION
@@ -122479,11 +122498,11 @@
122479122498
SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
122480122499
int rc = SQLITE_OK;
122481122500
Table *pTab;
122482122501
122483122502
pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
122484
- if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){
122503
+ if( pTab!=0 && ALWAYS(pTab->pVTable!=0) ){
122485122504
VTable *p;
122486122505
int (*xDestroy)(sqlite3_vtab *);
122487122506
for(p=pTab->pVTable; p; p=p->pNext){
122488122507
assert( p->pVtab );
122489122508
if( p->pVtab->nRef>0 ){
@@ -177492,11 +177511,11 @@
177492177511
** following structure. All structure methods must be defined, setting
177493177512
** any member of the fts5_tokenizer struct to NULL leads to undefined
177494177513
** behaviour. The structure methods are expected to function as follows:
177495177514
**
177496177515
** xCreate:
177497
-** This function is used to allocate and inititalize a tokenizer instance.
177516
+** This function is used to allocate and initialize a tokenizer instance.
177498177517
** A tokenizer instance is required to actually tokenize text.
177499177518
**
177500177519
** The first argument passed to this function is a copy of the (void*)
177501177520
** pointer provided by the application when the fts5_tokenizer object
177502177521
** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -177751,11 +177770,10 @@
177751177770
#if 0
177752177771
} /* end of the 'extern "C"' block */
177753177772
#endif
177754177773
177755177774
#endif /* _FTS5_H */
177756
-
177757177775
177758177776
/*
177759177777
** 2014 May 31
177760177778
**
177761177779
** The author disclaims copyright to this source code. In place of
@@ -193980,11 +193998,11 @@
193980193998
int nArg, /* Number of args */
193981193999
sqlite3_value **apUnused /* Function arguments */
193982194000
){
193983194001
assert( nArg==0 );
193984194002
UNUSED_PARAM2(nArg, apUnused);
193985
- sqlite3_result_text(pCtx, "fts5: 2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2", -1, SQLITE_TRANSIENT);
194003
+ sqlite3_result_text(pCtx, "fts5: 2016-08-05 20:54:45 95578898835b933901603bd4d5e063f1219a016f", -1, SQLITE_TRANSIENT);
193986194004
}
193987194005
193988194006
static int fts5Init(sqlite3 *db){
193989194007
static const sqlite3_module fts5Mod = {
193990194008
/* iVersion */ 2,
193991194009
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -380,11 +380,11 @@
380 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381 ** [sqlite_version()] and [sqlite_source_id()].
382 */
383 #define SQLITE_VERSION "3.14.0"
384 #define SQLITE_VERSION_NUMBER 3014000
385 #define SQLITE_SOURCE_ID "2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2"
386
387 /*
388 ** CAPI3REF: Run-Time Library Version Numbers
389 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
390 **
@@ -2217,11 +2217,11 @@
2217 ** interface independently of the [load_extension()] SQL function.
2218 ** The [sqlite3_enable_load_extension()] API enables or disables both the
2219 ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
2220 ** There should be two additional arguments.
2221 ** When the first argument to this interface is 1, then only the C-API is
2222 ** enabled and the SQL function remains disabled. If the first argment to
2223 ** this interface is 0, then both the C-API and the SQL function are disabled.
2224 ** If the first argument is -1, then no changes are made to state of either the
2225 ** C-API or the SQL function.
2226 ** The second parameter is a pointer to an integer into which
2227 ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
@@ -5795,11 +5795,11 @@
5795 ** interface returns SQLITE_OK and fills in the non-NULL pointers in
5796 ** the final five arguments with appropriate values if the specified
5797 ** column exists. ^The sqlite3_table_column_metadata() interface returns
5798 ** SQLITE_ERROR and if the specified column does not exist.
5799 ** ^If the column-name parameter to sqlite3_table_column_metadata() is a
5800 ** NULL pointer, then this routine simply checks for the existance of the
5801 ** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
5802 ** does not.
5803 **
5804 ** ^The column is identified by the second, third and fourth parameters to
5805 ** this function. ^(The second parameter is either the name of the database
@@ -8390,11 +8390,11 @@
8390 ** tables.
8391 **
8392 ** ^The second parameter to the preupdate callback is a pointer to
8393 ** the [database connection] that registered the preupdate hook.
8394 ** ^The third parameter to the preupdate callback is one of the constants
8395 ** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to indentify the
8396 ** kind of update operation that is about to occur.
8397 ** ^(The fourth parameter to the preupdate callback is the name of the
8398 ** database within the database connection that is being modified. This
8399 ** will be "main" for the main database or "temp" for TEMP tables or
8400 ** the name given after the AS keyword in the [ATTACH] statement for attached
@@ -10337,11 +10337,11 @@
10337 ** following structure. All structure methods must be defined, setting
10338 ** any member of the fts5_tokenizer struct to NULL leads to undefined
10339 ** behaviour. The structure methods are expected to function as follows:
10340 **
10341 ** xCreate:
10342 ** This function is used to allocate and inititalize a tokenizer instance.
10343 ** A tokenizer instance is required to actually tokenize text.
10344 **
10345 ** The first argument passed to this function is a copy of the (void*)
10346 ** pointer provided by the application when the fts5_tokenizer object
10347 ** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -10596,11 +10596,10 @@
10596 #if 0
10597 } /* end of the 'extern "C"' block */
10598 #endif
10599
10600 #endif /* _FTS5_H */
10601
10602
10603 /******** End of fts5.h *********/
10604
10605 /************** End of sqlite3.h *********************************************/
10606 /************** Continuing where we left off in sqliteInt.h ******************/
@@ -13084,10 +13083,11 @@
13084 SQLITE_PRIVATE sqlite3_file *sqlite3PagerJrnlFile(Pager*);
13085 SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);
13086 SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*);
13087 SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*);
13088 SQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *, int, int, int *);
 
13089 SQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *);
13090
13091 /* Functions used to truncate the database file. */
13092 SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno);
13093
@@ -53411,10 +53411,21 @@
53411 ** sqlite3BackupUpdate() only.
53412 */
53413 SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
53414 return &pPager->pBackup;
53415 }
 
 
 
 
 
 
 
 
 
 
 
53416
53417 #ifndef SQLITE_OMIT_WAL
53418 /*
53419 ** This function is called when the user invokes "PRAGMA wal_checkpoint",
53420 ** "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint()
@@ -53636,11 +53647,10 @@
53636 SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager){
53637 assert( pPager->eState>=PAGER_READER );
53638 return sqlite3WalFramesize(pPager->pWal);
53639 }
53640 #endif
53641
53642
53643 #endif /* SQLITE_OMIT_DISKIO */
53644
53645 /************** End of pager.c ***********************************************/
53646 /************** Begin file wal.c *********************************************/
@@ -68596,17 +68606,19 @@
68596 /* 0x7FFFFFFF is the hard limit for the number of pages in a database
68597 ** file. By passing this as the number of pages to copy to
68598 ** sqlite3_backup_step(), we can guarantee that the copy finishes
68599 ** within a single call (unless an error occurs). The assert() statement
68600 ** checks this assumption - (p->rc) should be set to either SQLITE_DONE
68601 ** or an error code.
68602 */
68603 sqlite3_backup_step(&b, 0x7FFFFFFF);
68604 assert( b.rc!=SQLITE_OK );
 
68605 rc = sqlite3_backup_finish(&b);
68606 if( rc==SQLITE_OK ){
68607 pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;
 
 
68608 }
68609
68610 assert( sqlite3BtreeIsInTrans(pTo)==0 );
68611 copy_finished:
68612 sqlite3BtreeLeave(pFrom);
@@ -100390,10 +100402,17 @@
100390 for(pLoop=pTab->pIndex, n=1; pLoop; pLoop=pLoop->pNext, n++){}
100391 zName = sqlite3MPrintf(db, "sqlite_autoindex_%s_%d", pTab->zName, n);
100392 if( zName==0 ){
100393 goto exit_create_index;
100394 }
 
 
 
 
 
 
 
100395 }
100396
100397 /* Check for authorization to create an index.
100398 */
100399 #ifndef SQLITE_OMIT_AUTHORIZATION
@@ -122479,11 +122498,11 @@
122479 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
122480 int rc = SQLITE_OK;
122481 Table *pTab;
122482
122483 pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
122484 if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){
122485 VTable *p;
122486 int (*xDestroy)(sqlite3_vtab *);
122487 for(p=pTab->pVTable; p; p=p->pNext){
122488 assert( p->pVtab );
122489 if( p->pVtab->nRef>0 ){
@@ -177492,11 +177511,11 @@
177492 ** following structure. All structure methods must be defined, setting
177493 ** any member of the fts5_tokenizer struct to NULL leads to undefined
177494 ** behaviour. The structure methods are expected to function as follows:
177495 **
177496 ** xCreate:
177497 ** This function is used to allocate and inititalize a tokenizer instance.
177498 ** A tokenizer instance is required to actually tokenize text.
177499 **
177500 ** The first argument passed to this function is a copy of the (void*)
177501 ** pointer provided by the application when the fts5_tokenizer object
177502 ** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -177751,11 +177770,10 @@
177751 #if 0
177752 } /* end of the 'extern "C"' block */
177753 #endif
177754
177755 #endif /* _FTS5_H */
177756
177757
177758 /*
177759 ** 2014 May 31
177760 **
177761 ** The author disclaims copyright to this source code. In place of
@@ -193980,11 +193998,11 @@
193980 int nArg, /* Number of args */
193981 sqlite3_value **apUnused /* Function arguments */
193982 ){
193983 assert( nArg==0 );
193984 UNUSED_PARAM2(nArg, apUnused);
193985 sqlite3_result_text(pCtx, "fts5: 2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2", -1, SQLITE_TRANSIENT);
193986 }
193987
193988 static int fts5Init(sqlite3 *db){
193989 static const sqlite3_module fts5Mod = {
193990 /* iVersion */ 2,
193991
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -380,11 +380,11 @@
380 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381 ** [sqlite_version()] and [sqlite_source_id()].
382 */
383 #define SQLITE_VERSION "3.14.0"
384 #define SQLITE_VERSION_NUMBER 3014000
385 #define SQLITE_SOURCE_ID "2016-08-08 13:40:27 d5e98057028abcf7217d0d2b2e29bbbcdf09d6de"
386
387 /*
388 ** CAPI3REF: Run-Time Library Version Numbers
389 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
390 **
@@ -2217,11 +2217,11 @@
2217 ** interface independently of the [load_extension()] SQL function.
2218 ** The [sqlite3_enable_load_extension()] API enables or disables both the
2219 ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
2220 ** There should be two additional arguments.
2221 ** When the first argument to this interface is 1, then only the C-API is
2222 ** enabled and the SQL function remains disabled. If the first argument to
2223 ** this interface is 0, then both the C-API and the SQL function are disabled.
2224 ** If the first argument is -1, then no changes are made to state of either the
2225 ** C-API or the SQL function.
2226 ** The second parameter is a pointer to an integer into which
2227 ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
@@ -5795,11 +5795,11 @@
5795 ** interface returns SQLITE_OK and fills in the non-NULL pointers in
5796 ** the final five arguments with appropriate values if the specified
5797 ** column exists. ^The sqlite3_table_column_metadata() interface returns
5798 ** SQLITE_ERROR and if the specified column does not exist.
5799 ** ^If the column-name parameter to sqlite3_table_column_metadata() is a
5800 ** NULL pointer, then this routine simply checks for the existence of the
5801 ** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
5802 ** does not.
5803 **
5804 ** ^The column is identified by the second, third and fourth parameters to
5805 ** this function. ^(The second parameter is either the name of the database
@@ -8390,11 +8390,11 @@
8390 ** tables.
8391 **
8392 ** ^The second parameter to the preupdate callback is a pointer to
8393 ** the [database connection] that registered the preupdate hook.
8394 ** ^The third parameter to the preupdate callback is one of the constants
8395 ** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the
8396 ** kind of update operation that is about to occur.
8397 ** ^(The fourth parameter to the preupdate callback is the name of the
8398 ** database within the database connection that is being modified. This
8399 ** will be "main" for the main database or "temp" for TEMP tables or
8400 ** the name given after the AS keyword in the [ATTACH] statement for attached
@@ -10337,11 +10337,11 @@
10337 ** following structure. All structure methods must be defined, setting
10338 ** any member of the fts5_tokenizer struct to NULL leads to undefined
10339 ** behaviour. The structure methods are expected to function as follows:
10340 **
10341 ** xCreate:
10342 ** This function is used to allocate and initialize a tokenizer instance.
10343 ** A tokenizer instance is required to actually tokenize text.
10344 **
10345 ** The first argument passed to this function is a copy of the (void*)
10346 ** pointer provided by the application when the fts5_tokenizer object
10347 ** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -10596,11 +10596,10 @@
10596 #if 0
10597 } /* end of the 'extern "C"' block */
10598 #endif
10599
10600 #endif /* _FTS5_H */
 
10601
10602 /******** End of fts5.h *********/
10603
10604 /************** End of sqlite3.h *********************************************/
10605 /************** Continuing where we left off in sqliteInt.h ******************/
@@ -13084,10 +13083,11 @@
13083 SQLITE_PRIVATE sqlite3_file *sqlite3PagerJrnlFile(Pager*);
13084 SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);
13085 SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*);
13086 SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*);
13087 SQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *, int, int, int *);
13088 SQLITE_PRIVATE void sqlite3PagerClearCache(Pager*);
13089 SQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *);
13090
13091 /* Functions used to truncate the database file. */
13092 SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno);
13093
@@ -53411,10 +53411,21 @@
53411 ** sqlite3BackupUpdate() only.
53412 */
53413 SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
53414 return &pPager->pBackup;
53415 }
53416
53417 #ifndef SQLITE_OMIT_VACUUM
53418 /*
53419 ** Unless this is an in-memory or temporary database, clear the pager cache.
53420 */
53421 SQLITE_PRIVATE void sqlite3PagerClearCache(Pager *pPager){
53422 assert( MEMDB==0 || pPager->tempFile );
53423 if( pPager->tempFile==0 ) pager_reset(pPager);
53424 }
53425 #endif
53426
53427
53428 #ifndef SQLITE_OMIT_WAL
53429 /*
53430 ** This function is called when the user invokes "PRAGMA wal_checkpoint",
53431 ** "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint()
@@ -53636,11 +53647,10 @@
53647 SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager){
53648 assert( pPager->eState>=PAGER_READER );
53649 return sqlite3WalFramesize(pPager->pWal);
53650 }
53651 #endif
 
53652
53653 #endif /* SQLITE_OMIT_DISKIO */
53654
53655 /************** End of pager.c ***********************************************/
53656 /************** Begin file wal.c *********************************************/
@@ -68596,17 +68606,19 @@
68606 /* 0x7FFFFFFF is the hard limit for the number of pages in a database
68607 ** file. By passing this as the number of pages to copy to
68608 ** sqlite3_backup_step(), we can guarantee that the copy finishes
68609 ** within a single call (unless an error occurs). The assert() statement
68610 ** checks this assumption - (p->rc) should be set to either SQLITE_DONE
68611 ** or an error code. */
 
68612 sqlite3_backup_step(&b, 0x7FFFFFFF);
68613 assert( b.rc!=SQLITE_OK );
68614
68615 rc = sqlite3_backup_finish(&b);
68616 if( rc==SQLITE_OK ){
68617 pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;
68618 }else{
68619 sqlite3PagerClearCache(sqlite3BtreePager(b.pDest));
68620 }
68621
68622 assert( sqlite3BtreeIsInTrans(pTo)==0 );
68623 copy_finished:
68624 sqlite3BtreeLeave(pFrom);
@@ -100390,10 +100402,17 @@
100402 for(pLoop=pTab->pIndex, n=1; pLoop; pLoop=pLoop->pNext, n++){}
100403 zName = sqlite3MPrintf(db, "sqlite_autoindex_%s_%d", pTab->zName, n);
100404 if( zName==0 ){
100405 goto exit_create_index;
100406 }
100407
100408 /* Automatic index names generated from within sqlite3_declare_vtab()
100409 ** must have names that are distinct from normal automatic index names.
100410 ** The following statement converts "sqlite3_autoindex..." into
100411 ** "sqlite3_butoindex..." in order to make the names distinct.
100412 ** The "vtab_err.test" test demonstrates the need of this statement. */
100413 if( IN_DECLARE_VTAB ) zName[7]++;
100414 }
100415
100416 /* Check for authorization to create an index.
100417 */
100418 #ifndef SQLITE_OMIT_AUTHORIZATION
@@ -122479,11 +122498,11 @@
122498 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
122499 int rc = SQLITE_OK;
122500 Table *pTab;
122501
122502 pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
122503 if( pTab!=0 && ALWAYS(pTab->pVTable!=0) ){
122504 VTable *p;
122505 int (*xDestroy)(sqlite3_vtab *);
122506 for(p=pTab->pVTable; p; p=p->pNext){
122507 assert( p->pVtab );
122508 if( p->pVtab->nRef>0 ){
@@ -177492,11 +177511,11 @@
177511 ** following structure. All structure methods must be defined, setting
177512 ** any member of the fts5_tokenizer struct to NULL leads to undefined
177513 ** behaviour. The structure methods are expected to function as follows:
177514 **
177515 ** xCreate:
177516 ** This function is used to allocate and initialize a tokenizer instance.
177517 ** A tokenizer instance is required to actually tokenize text.
177518 **
177519 ** The first argument passed to this function is a copy of the (void*)
177520 ** pointer provided by the application when the fts5_tokenizer object
177521 ** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -177751,11 +177770,10 @@
177770 #if 0
177771 } /* end of the 'extern "C"' block */
177772 #endif
177773
177774 #endif /* _FTS5_H */
 
177775
177776 /*
177777 ** 2014 May 31
177778 **
177779 ** The author disclaims copyright to this source code. In place of
@@ -193980,11 +193998,11 @@
193998 int nArg, /* Number of args */
193999 sqlite3_value **apUnused /* Function arguments */
194000 ){
194001 assert( nArg==0 );
194002 UNUSED_PARAM2(nArg, apUnused);
194003 sqlite3_result_text(pCtx, "fts5: 2016-08-05 20:54:45 95578898835b933901603bd4d5e063f1219a016f", -1, SQLITE_TRANSIENT);
194004 }
194005
194006 static int fts5Init(sqlite3 *db){
194007 static const sqlite3_module fts5Mod = {
194008 /* iVersion */ 2,
194009
+5 -6
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -120,11 +120,11 @@
120120
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121121
** [sqlite_version()] and [sqlite_source_id()].
122122
*/
123123
#define SQLITE_VERSION "3.14.0"
124124
#define SQLITE_VERSION_NUMBER 3014000
125
-#define SQLITE_SOURCE_ID "2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2"
125
+#define SQLITE_SOURCE_ID "2016-08-08 13:40:27 d5e98057028abcf7217d0d2b2e29bbbcdf09d6de"
126126
127127
/*
128128
** CAPI3REF: Run-Time Library Version Numbers
129129
** KEYWORDS: sqlite3_version, sqlite3_sourceid
130130
**
@@ -1957,11 +1957,11 @@
19571957
** interface independently of the [load_extension()] SQL function.
19581958
** The [sqlite3_enable_load_extension()] API enables or disables both the
19591959
** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
19601960
** There should be two additional arguments.
19611961
** When the first argument to this interface is 1, then only the C-API is
1962
-** enabled and the SQL function remains disabled. If the first argment to
1962
+** enabled and the SQL function remains disabled. If the first argument to
19631963
** this interface is 0, then both the C-API and the SQL function are disabled.
19641964
** If the first argument is -1, then no changes are made to state of either the
19651965
** C-API or the SQL function.
19661966
** The second parameter is a pointer to an integer into which
19671967
** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
@@ -5535,11 +5535,11 @@
55355535
** interface returns SQLITE_OK and fills in the non-NULL pointers in
55365536
** the final five arguments with appropriate values if the specified
55375537
** column exists. ^The sqlite3_table_column_metadata() interface returns
55385538
** SQLITE_ERROR and if the specified column does not exist.
55395539
** ^If the column-name parameter to sqlite3_table_column_metadata() is a
5540
-** NULL pointer, then this routine simply checks for the existance of the
5540
+** NULL pointer, then this routine simply checks for the existence of the
55415541
** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
55425542
** does not.
55435543
**
55445544
** ^The column is identified by the second, third and fourth parameters to
55455545
** this function. ^(The second parameter is either the name of the database
@@ -8130,11 +8130,11 @@
81308130
** tables.
81318131
**
81328132
** ^The second parameter to the preupdate callback is a pointer to
81338133
** the [database connection] that registered the preupdate hook.
81348134
** ^The third parameter to the preupdate callback is one of the constants
8135
-** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to indentify the
8135
+** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the
81368136
** kind of update operation that is about to occur.
81378137
** ^(The fourth parameter to the preupdate callback is the name of the
81388138
** database within the database connection that is being modified. This
81398139
** will be "main" for the main database or "temp" for TEMP tables or
81408140
** the name given after the AS keyword in the [ATTACH] statement for attached
@@ -10077,11 +10077,11 @@
1007710077
** following structure. All structure methods must be defined, setting
1007810078
** any member of the fts5_tokenizer struct to NULL leads to undefined
1007910079
** behaviour. The structure methods are expected to function as follows:
1008010080
**
1008110081
** xCreate:
10082
-** This function is used to allocate and inititalize a tokenizer instance.
10082
+** This function is used to allocate and initialize a tokenizer instance.
1008310083
** A tokenizer instance is required to actually tokenize text.
1008410084
**
1008510085
** The first argument passed to this function is a copy of the (void*)
1008610086
** pointer provided by the application when the fts5_tokenizer object
1008710087
** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -10336,8 +10336,7 @@
1033610336
#ifdef __cplusplus
1033710337
} /* end of the 'extern "C"' block */
1033810338
#endif
1033910339
1034010340
#endif /* _FTS5_H */
10341
-
1034210341
1034310342
/******** End of fts5.h *********/
1034410343
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -120,11 +120,11 @@
120 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121 ** [sqlite_version()] and [sqlite_source_id()].
122 */
123 #define SQLITE_VERSION "3.14.0"
124 #define SQLITE_VERSION_NUMBER 3014000
125 #define SQLITE_SOURCE_ID "2016-08-04 13:23:28 9adda385267d1a0ecff259b42a284913668441a2"
126
127 /*
128 ** CAPI3REF: Run-Time Library Version Numbers
129 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
130 **
@@ -1957,11 +1957,11 @@
1957 ** interface independently of the [load_extension()] SQL function.
1958 ** The [sqlite3_enable_load_extension()] API enables or disables both the
1959 ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
1960 ** There should be two additional arguments.
1961 ** When the first argument to this interface is 1, then only the C-API is
1962 ** enabled and the SQL function remains disabled. If the first argment to
1963 ** this interface is 0, then both the C-API and the SQL function are disabled.
1964 ** If the first argument is -1, then no changes are made to state of either the
1965 ** C-API or the SQL function.
1966 ** The second parameter is a pointer to an integer into which
1967 ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
@@ -5535,11 +5535,11 @@
5535 ** interface returns SQLITE_OK and fills in the non-NULL pointers in
5536 ** the final five arguments with appropriate values if the specified
5537 ** column exists. ^The sqlite3_table_column_metadata() interface returns
5538 ** SQLITE_ERROR and if the specified column does not exist.
5539 ** ^If the column-name parameter to sqlite3_table_column_metadata() is a
5540 ** NULL pointer, then this routine simply checks for the existance of the
5541 ** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
5542 ** does not.
5543 **
5544 ** ^The column is identified by the second, third and fourth parameters to
5545 ** this function. ^(The second parameter is either the name of the database
@@ -8130,11 +8130,11 @@
8130 ** tables.
8131 **
8132 ** ^The second parameter to the preupdate callback is a pointer to
8133 ** the [database connection] that registered the preupdate hook.
8134 ** ^The third parameter to the preupdate callback is one of the constants
8135 ** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to indentify the
8136 ** kind of update operation that is about to occur.
8137 ** ^(The fourth parameter to the preupdate callback is the name of the
8138 ** database within the database connection that is being modified. This
8139 ** will be "main" for the main database or "temp" for TEMP tables or
8140 ** the name given after the AS keyword in the [ATTACH] statement for attached
@@ -10077,11 +10077,11 @@
10077 ** following structure. All structure methods must be defined, setting
10078 ** any member of the fts5_tokenizer struct to NULL leads to undefined
10079 ** behaviour. The structure methods are expected to function as follows:
10080 **
10081 ** xCreate:
10082 ** This function is used to allocate and inititalize a tokenizer instance.
10083 ** A tokenizer instance is required to actually tokenize text.
10084 **
10085 ** The first argument passed to this function is a copy of the (void*)
10086 ** pointer provided by the application when the fts5_tokenizer object
10087 ** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -10336,8 +10336,7 @@
10336 #ifdef __cplusplus
10337 } /* end of the 'extern "C"' block */
10338 #endif
10339
10340 #endif /* _FTS5_H */
10341
10342
10343 /******** End of fts5.h *********/
10344
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -120,11 +120,11 @@
120 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121 ** [sqlite_version()] and [sqlite_source_id()].
122 */
123 #define SQLITE_VERSION "3.14.0"
124 #define SQLITE_VERSION_NUMBER 3014000
125 #define SQLITE_SOURCE_ID "2016-08-08 13:40:27 d5e98057028abcf7217d0d2b2e29bbbcdf09d6de"
126
127 /*
128 ** CAPI3REF: Run-Time Library Version Numbers
129 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
130 **
@@ -1957,11 +1957,11 @@
1957 ** interface independently of the [load_extension()] SQL function.
1958 ** The [sqlite3_enable_load_extension()] API enables or disables both the
1959 ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
1960 ** There should be two additional arguments.
1961 ** When the first argument to this interface is 1, then only the C-API is
1962 ** enabled and the SQL function remains disabled. If the first argument to
1963 ** this interface is 0, then both the C-API and the SQL function are disabled.
1964 ** If the first argument is -1, then no changes are made to state of either the
1965 ** C-API or the SQL function.
1966 ** The second parameter is a pointer to an integer into which
1967 ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
@@ -5535,11 +5535,11 @@
5535 ** interface returns SQLITE_OK and fills in the non-NULL pointers in
5536 ** the final five arguments with appropriate values if the specified
5537 ** column exists. ^The sqlite3_table_column_metadata() interface returns
5538 ** SQLITE_ERROR and if the specified column does not exist.
5539 ** ^If the column-name parameter to sqlite3_table_column_metadata() is a
5540 ** NULL pointer, then this routine simply checks for the existence of the
5541 ** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
5542 ** does not.
5543 **
5544 ** ^The column is identified by the second, third and fourth parameters to
5545 ** this function. ^(The second parameter is either the name of the database
@@ -8130,11 +8130,11 @@
8130 ** tables.
8131 **
8132 ** ^The second parameter to the preupdate callback is a pointer to
8133 ** the [database connection] that registered the preupdate hook.
8134 ** ^The third parameter to the preupdate callback is one of the constants
8135 ** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the
8136 ** kind of update operation that is about to occur.
8137 ** ^(The fourth parameter to the preupdate callback is the name of the
8138 ** database within the database connection that is being modified. This
8139 ** will be "main" for the main database or "temp" for TEMP tables or
8140 ** the name given after the AS keyword in the [ATTACH] statement for attached
@@ -10077,11 +10077,11 @@
10077 ** following structure. All structure methods must be defined, setting
10078 ** any member of the fts5_tokenizer struct to NULL leads to undefined
10079 ** behaviour. The structure methods are expected to function as follows:
10080 **
10081 ** xCreate:
10082 ** This function is used to allocate and initialize a tokenizer instance.
10083 ** A tokenizer instance is required to actually tokenize text.
10084 **
10085 ** The first argument passed to this function is a copy of the (void*)
10086 ** pointer provided by the application when the fts5_tokenizer object
10087 ** was registered with FTS5 (the third argument to xCreateTokenizer()).
@@ -10336,8 +10336,7 @@
10336 #ifdef __cplusplus
10337 } /* end of the 'extern "C"' block */
10338 #endif
10339
10340 #endif /* _FTS5_H */
 
10341
10342 /******** End of fts5.h *********/
10343

Keyboard Shortcuts

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