mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
updated SQLite to 3.10.1
This commit is contained in:
parent
c58791f768
commit
e04ff8444d
3 changed files with 59 additions and 22 deletions
|
@ -977,7 +977,7 @@ are limited by the typeless nature of the SQLite database.
|
|||
=head1 SQLITE VERSION
|
||||
|
||||
DBD::SQLite is usually compiled with a bundled SQLite library
|
||||
(SQLite version S<3.10.0> as of this release) for consistency.
|
||||
(SQLite version S<3.10.1> as of this release) for consistency.
|
||||
However, a different version of SQLite may sometimes be used for
|
||||
some reasons like security, or some new experimental features.
|
||||
|
||||
|
|
63
sqlite3.c
63
sqlite3.c
|
@ -1,6 +1,6 @@
|
|||
/******************************************************************************
|
||||
** This file is an amalgamation of many separate C source files from SQLite
|
||||
** version 3.10.0. By combining all the individual C code files into this
|
||||
** version 3.10.1. By combining all the individual C code files into this
|
||||
** single large file, the entire code can be compiled as a single translation
|
||||
** unit. This allows many compilers to do optimizations that would not be
|
||||
** possible if the files were compiled separately. Performance improvements
|
||||
|
@ -325,9 +325,9 @@ extern "C" {
|
|||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.10.0"
|
||||
#define SQLITE_VERSION_NUMBER 3010000
|
||||
#define SQLITE_SOURCE_ID "2016-01-06 11:01:07 fd0a50f0797d154fefff724624f00548b5320566"
|
||||
#define SQLITE_VERSION "3.10.1"
|
||||
#define SQLITE_VERSION_NUMBER 3010001
|
||||
#define SQLITE_SOURCE_ID "2016-01-13 21:41:56 254419c36766225ca542ae873ed38255e3fb8588"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
|
@ -1008,8 +1008,13 @@ struct sqlite3_io_methods {
|
|||
** <li>[[SQLITE_FCNTL_FILE_POINTER]]
|
||||
** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer
|
||||
** to the [sqlite3_file] object associated with a particular database
|
||||
** connection. See the [sqlite3_file_control()] documentation for
|
||||
** additional information.
|
||||
** connection. See also [SQLITE_FCNTL_JOURNAL_POINTER].
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_JOURNAL_POINTER]]
|
||||
** The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer
|
||||
** to the [sqlite3_file] object associated with the journal file (either
|
||||
** the [rollback journal] or the [write-ahead log]) for a particular database
|
||||
** connection. See also [SQLITE_FCNTL_FILE_POINTER].
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_SYNC_OMITTED]]
|
||||
** No longer in use.
|
||||
|
@ -1224,6 +1229,7 @@ struct sqlite3_io_methods {
|
|||
#define SQLITE_FCNTL_ZIPVFS 25
|
||||
#define SQLITE_FCNTL_RBU 26
|
||||
#define SQLITE_FCNTL_VFS_POINTER 27
|
||||
#define SQLITE_FCNTL_JOURNAL_POINTER 28
|
||||
|
||||
/* deprecated names */
|
||||
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
||||
|
@ -11217,6 +11223,7 @@ SQLITE_PRIVATE int sqlite3PagerMemUsed(Pager*);
|
|||
SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*, int);
|
||||
SQLITE_PRIVATE sqlite3_vfs *sqlite3PagerVfs(Pager*);
|
||||
SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*);
|
||||
SQLITE_PRIVATE sqlite3_file *sqlite3PagerJrnlFile(Pager*);
|
||||
SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);
|
||||
SQLITE_PRIVATE int sqlite3PagerNosync(Pager*);
|
||||
SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*);
|
||||
|
@ -43329,6 +43336,7 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, int iBatch, sqlite3_int64
|
|||
# define sqlite3WalHeapMemory(z) 0
|
||||
# define sqlite3WalFramesize(z) 0
|
||||
# define sqlite3WalFindFrame(x,y,z) 0
|
||||
# define sqlite3WalFile(x) 0
|
||||
#else
|
||||
|
||||
#define WAL_SAVEPOINT_NDATA 4
|
||||
|
@ -43423,6 +43431,9 @@ SQLITE_PRIVATE void sqlite3WalSnapshotOpen(Wal *pWal, sqlite3_snapshot *pSnapsho
|
|||
SQLITE_PRIVATE int sqlite3WalFramesize(Wal *pWal);
|
||||
#endif
|
||||
|
||||
/* Return the sqlite3_file object for the WAL file */
|
||||
SQLITE_PRIVATE sqlite3_file *sqlite3WalFile(Wal *pWal);
|
||||
|
||||
#endif /* ifndef SQLITE_OMIT_WAL */
|
||||
#endif /* _WAL_H_ */
|
||||
|
||||
|
@ -50099,6 +50110,14 @@ SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager *pPager){
|
|||
return pPager->fd;
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the file handle for the journal file (if it exists).
|
||||
** This will be either the rollback journal or the WAL file.
|
||||
*/
|
||||
SQLITE_PRIVATE sqlite3_file *sqlite3PagerJrnlFile(Pager *pPager){
|
||||
return pPager->pWal ? sqlite3WalFile(pPager->pWal) : pPager->jfd;
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the full pathname of the journal file.
|
||||
*/
|
||||
|
@ -54069,6 +54088,12 @@ SQLITE_PRIVATE int sqlite3WalFramesize(Wal *pWal){
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Return the sqlite3_file object for the WAL file
|
||||
*/
|
||||
SQLITE_PRIVATE sqlite3_file *sqlite3WalFile(Wal *pWal){
|
||||
return pWal->pWalFd;
|
||||
}
|
||||
|
||||
#endif /* #ifndef SQLITE_OMIT_WAL */
|
||||
|
||||
/************** End of wal.c *************************************************/
|
||||
|
@ -109690,6 +109715,7 @@ struct SortCtx {
|
|||
int regReturn; /* Register holding block-output return address */
|
||||
int labelBkOut; /* Start label for the block-output subroutine */
|
||||
int addrSortIndex; /* Address of the OP_SorterOpen or OP_OpenEphemeral */
|
||||
int labelDone; /* Jump here when done, ex: LIMIT reached */
|
||||
u8 sortFlags; /* Zero or more SORTFLAG_* bits */
|
||||
};
|
||||
#define SORTFLAG_UseSorter 0x01 /* Use SorterOpen instead of OpenEphemeral */
|
||||
|
@ -110144,6 +110170,7 @@ static void pushOntoSorter(
|
|||
int regRecord = ++pParse->nMem; /* Assembled sorter record */
|
||||
int nOBSat = pSort->nOBSat; /* ORDER BY terms to skip */
|
||||
int op; /* Opcode to add sorter record to sorter */
|
||||
int iLimit; /* LIMIT counter */
|
||||
|
||||
assert( bSeq==0 || bSeq==1 );
|
||||
assert( nData==1 || regData==regOrigData );
|
||||
|
@ -110154,6 +110181,9 @@ static void pushOntoSorter(
|
|||
regBase = pParse->nMem + 1;
|
||||
pParse->nMem += nBase;
|
||||
}
|
||||
assert( pSelect->iOffset==0 || pSelect->iLimit!=0 );
|
||||
iLimit = pSelect->iOffset ? pSelect->iOffset+1 : pSelect->iLimit;
|
||||
pSort->labelDone = sqlite3VdbeMakeLabel(v);
|
||||
sqlite3ExprCodeExprList(pParse, pSort->pOrderBy, regBase, regOrigData,
|
||||
SQLITE_ECEL_DUP|SQLITE_ECEL_REF);
|
||||
if( bSeq ){
|
||||
|
@ -110162,7 +110192,6 @@ static void pushOntoSorter(
|
|||
if( nPrefixReg==0 ){
|
||||
sqlite3ExprCodeMove(pParse, regData, regBase+nExpr+bSeq, nData);
|
||||
}
|
||||
|
||||
sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase+nOBSat, nBase-nOBSat, regRecord);
|
||||
if( nOBSat>0 ){
|
||||
int regPrevKey; /* The first nOBSat columns of the previous row */
|
||||
|
@ -110197,6 +110226,10 @@ static void pushOntoSorter(
|
|||
pSort->regReturn = ++pParse->nMem;
|
||||
sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut);
|
||||
sqlite3VdbeAddOp1(v, OP_ResetSorter, pSort->iECursor);
|
||||
if( iLimit ){
|
||||
sqlite3VdbeAddOp2(v, OP_IfNot, iLimit, pSort->labelDone);
|
||||
VdbeCoverage(v);
|
||||
}
|
||||
sqlite3VdbeJumpHere(v, addrFirst);
|
||||
sqlite3ExprCodeMove(pParse, regBase, regPrevKey, pSort->nOBSat);
|
||||
sqlite3VdbeJumpHere(v, addrJmp);
|
||||
|
@ -110207,14 +110240,8 @@ static void pushOntoSorter(
|
|||
op = OP_IdxInsert;
|
||||
}
|
||||
sqlite3VdbeAddOp2(v, op, pSort->iECursor, regRecord);
|
||||
if( pSelect->iLimit ){
|
||||
if( iLimit ){
|
||||
int addr;
|
||||
int iLimit;
|
||||
if( pSelect->iOffset ){
|
||||
iLimit = pSelect->iOffset+1;
|
||||
}else{
|
||||
iLimit = pSelect->iLimit;
|
||||
}
|
||||
addr = sqlite3VdbeAddOp3(v, OP_IfNotZero, iLimit, 0, 1); VdbeCoverage(v);
|
||||
sqlite3VdbeAddOp1(v, OP_Last, pSort->iECursor);
|
||||
sqlite3VdbeAddOp1(v, OP_Delete, pSort->iECursor);
|
||||
|
@ -110818,7 +110845,7 @@ static void generateSortTail(
|
|||
SelectDest *pDest /* Write the sorted results here */
|
||||
){
|
||||
Vdbe *v = pParse->pVdbe; /* The prepared statement */
|
||||
int addrBreak = sqlite3VdbeMakeLabel(v); /* Jump here to exit loop */
|
||||
int addrBreak = pSort->labelDone; /* Jump here to exit loop */
|
||||
int addrContinue = sqlite3VdbeMakeLabel(v); /* Jump here for next cycle */
|
||||
int addr;
|
||||
int addrOnce = 0;
|
||||
|
@ -110837,6 +110864,7 @@ static void generateSortTail(
|
|||
struct ExprList_item *aOutEx = p->pEList->a;
|
||||
#endif
|
||||
|
||||
assert( addrBreak<0 );
|
||||
if( pSort->labelBkOut ){
|
||||
sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut);
|
||||
sqlite3VdbeGoto(v, addrBreak);
|
||||
|
@ -135452,6 +135480,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbN
|
|||
}else if( op==SQLITE_FCNTL_VFS_POINTER ){
|
||||
*(sqlite3_vfs**)pArg = sqlite3PagerVfs(pPager);
|
||||
rc = SQLITE_OK;
|
||||
}else if( op==SQLITE_FCNTL_JOURNAL_POINTER ){
|
||||
*(sqlite3_file**)pArg = sqlite3PagerJrnlFile(pPager);
|
||||
rc = SQLITE_OK;
|
||||
}else if( fd->pMethods ){
|
||||
rc = sqlite3OsFileControl(fd, op, pArg);
|
||||
}else{
|
||||
|
@ -182249,7 +182280,7 @@ static void fts5SourceIdFunc(
|
|||
sqlite3_value **apVal /* Function arguments */
|
||||
){
|
||||
assert( nArg==0 );
|
||||
sqlite3_result_text(pCtx, "fts5: 2016-01-06 11:01:07 fd0a50f0797d154fefff724624f00548b5320566", -1, SQLITE_TRANSIENT);
|
||||
sqlite3_result_text(pCtx, "fts5: 2016-01-13 21:41:56 254419c36766225ca542ae873ed38255e3fb8588", -1, SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
static int fts5Init(sqlite3 *db){
|
||||
|
|
16
sqlite3.h
16
sqlite3.h
|
@ -111,9 +111,9 @@ extern "C" {
|
|||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.10.0"
|
||||
#define SQLITE_VERSION_NUMBER 3010000
|
||||
#define SQLITE_SOURCE_ID "2016-01-06 11:01:07 fd0a50f0797d154fefff724624f00548b5320566"
|
||||
#define SQLITE_VERSION "3.10.1"
|
||||
#define SQLITE_VERSION_NUMBER 3010001
|
||||
#define SQLITE_SOURCE_ID "2016-01-13 21:41:56 254419c36766225ca542ae873ed38255e3fb8588"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
|
@ -794,8 +794,13 @@ struct sqlite3_io_methods {
|
|||
** <li>[[SQLITE_FCNTL_FILE_POINTER]]
|
||||
** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer
|
||||
** to the [sqlite3_file] object associated with a particular database
|
||||
** connection. See the [sqlite3_file_control()] documentation for
|
||||
** additional information.
|
||||
** connection. See also [SQLITE_FCNTL_JOURNAL_POINTER].
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_JOURNAL_POINTER]]
|
||||
** The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer
|
||||
** to the [sqlite3_file] object associated with the journal file (either
|
||||
** the [rollback journal] or the [write-ahead log]) for a particular database
|
||||
** connection. See also [SQLITE_FCNTL_FILE_POINTER].
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_SYNC_OMITTED]]
|
||||
** No longer in use.
|
||||
|
@ -1010,6 +1015,7 @@ struct sqlite3_io_methods {
|
|||
#define SQLITE_FCNTL_ZIPVFS 25
|
||||
#define SQLITE_FCNTL_RBU 26
|
||||
#define SQLITE_FCNTL_VFS_POINTER 27
|
||||
#define SQLITE_FCNTL_JOURNAL_POINTER 28
|
||||
|
||||
/* deprecated names */
|
||||
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
||||
|
|
Loading…
Add table
Reference in a new issue