Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a541c0361 | |||
| ae3ec3f920 | |||
| fe8eadc94d | |||
| 3963e584b4 | |||
| e7c6f97b1d | |||
| a4e54e868e | |||
| a4d770cf60 | |||
| 13c6fc5c6c | |||
| cb0d3ba862 | |||
| a50b309187 | |||
| 04ed43d64d | |||
| 858205d8bd | |||
| 749e4a9fd1 | |||
| 3cef364966 | |||
| 380c7ce460 | |||
| 0e6b83088f | |||
| c9fb27bfa8 | |||
| 59541d70a8 | |||
| a199ffca58 | |||
| aa15168983 | |||
| 3eddffd8bb | |||
| e83b847b75 | |||
| 923260c865 | |||
| 4b8035e69b | |||
| 17ca22616b | |||
| 968d8715fd | |||
| 33b46eeb35 | |||
| 4ba5f33f39 | |||
| 06aecf0954 | |||
| c9407508b1 | |||
| 96b10030e9 |
+2
-1
@@ -484,7 +484,8 @@ TESTSRC2 = \
|
||||
$(TOP)/ext/fts3/fts3_tokenizer.c \
|
||||
$(TOP)/ext/fts3/fts3_write.c \
|
||||
$(TOP)/ext/async/sqlite3async.c \
|
||||
$(TOP)/ext/session/sqlite3session.c
|
||||
$(TOP)/ext/session/sqlite3session.c \
|
||||
$(TOP)/ext/misc/stmt.c
|
||||
|
||||
# Header files used by all library source files.
|
||||
#
|
||||
|
||||
+2
-2
@@ -3353,7 +3353,7 @@ static int fts3ColumnMethod(
|
||||
switch( iCol-p->nColumn ){
|
||||
case 0:
|
||||
/* The special 'table-name' column */
|
||||
sqlite3_result_pointer(pCtx, pCsr);
|
||||
sqlite3_result_pointer(pCtx, pCsr, "fts3cursor");
|
||||
break;
|
||||
|
||||
case 1:
|
||||
@@ -3572,7 +3572,7 @@ static int fts3FunctionArg(
|
||||
Fts3Cursor **ppCsr /* OUT: Store cursor handle here */
|
||||
){
|
||||
int rc;
|
||||
*ppCsr = (Fts3Cursor*)sqlite3_value_pointer(pVal);
|
||||
*ppCsr = (Fts3Cursor*)sqlite3_value_pointer(pVal, "fts3cursor");
|
||||
if( (*ppCsr)!=0 ){
|
||||
rc = SQLITE_OK;
|
||||
}else{
|
||||
|
||||
+3
-3
@@ -3,6 +3,7 @@
|
||||
# this project. After including main.mk, the users makefile should contain:
|
||||
#
|
||||
# LSMDIR=$(TOP)/ext/lsm1/
|
||||
# LSMOPTS=-fPIC
|
||||
# include $(LSMDIR)/Makefile
|
||||
#
|
||||
# The most useful targets are [lsmtest] and [lsm.so].
|
||||
@@ -42,7 +43,7 @@ LSMTESTSRC = $(LSMDIR)/lsm-test/lsmtest1.c $(LSMDIR)/lsm-test/lsmtest2.c \
|
||||
|
||||
# all: lsm.so
|
||||
|
||||
LSMOPTS = -DLSM_MUTEX_PTHREADS=1 -I$(LSMDIR)
|
||||
LSMOPTS += -DLSM_MUTEX_PTHREADS=1 -I$(LSMDIR)
|
||||
|
||||
lsm.so: $(LSMOBJ)
|
||||
$(TCCX) -shared -o lsm.so $(LSMOBJ)
|
||||
@@ -52,5 +53,4 @@ lsm.so: $(LSMOBJ)
|
||||
|
||||
lsmtest$(EXE): $(LSMOBJ) $(LSMTESTSRC) $(LSMTESTHDR) sqlite3.o
|
||||
# $(TCPPX) -c $(TOP)/lsm-test/lsmtest_tdb2.cc
|
||||
$(TCCX) $(LSMOPTS) $(LSMTESTSRC) $(LSMOBJ) sqlite3.o -o lsmtest$(EXE) $(THREADLIB)
|
||||
|
||||
$(TCCX) $(LSMOPTS) $(LSMTESTSRC) $(LSMOBJ) sqlite3.o -o lsmtest$(EXE) $(THREADLIB)
|
||||
|
||||
@@ -95,6 +95,8 @@ lsm_vtab.lo: $(LSMDIR)\lsm_vtab.c $(LSMHDR) $(SQLITE3H)
|
||||
|
||||
lsm.dll: $(LSMOBJ)
|
||||
$(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ $(LSMOBJ)
|
||||
copy /Y $@ $(LSMDIR)\$@
|
||||
|
||||
lsmtest.exe: $(LSMOBJ) $(LSMTESTSRC) $(LSMTESTHDR) $(LIBOBJ)
|
||||
$(LTLINK) $(LSMOPTS) $(LSMTESTSRC) /link $(LSMOBJ) $(LIBOBJ)
|
||||
copy /Y $@ $(LSMDIR)\$@
|
||||
|
||||
+25
-2
@@ -45,6 +45,23 @@ struct lsm1_cursor {
|
||||
u8 bUnique; /* True if no more than one row of output */
|
||||
};
|
||||
|
||||
/* Dequote the string */
|
||||
static void lsm1Dequote(char *z){
|
||||
int j;
|
||||
char cQuote = z[0];
|
||||
size_t i, n;
|
||||
|
||||
if( cQuote!='\'' && cQuote!='"' ) return;
|
||||
n = strlen(z);
|
||||
if( n<2 || z[n-1]!=z[0] ) return;
|
||||
for(i=1, j=0; i<n-1; i++){
|
||||
if( z[i]==cQuote && z[i+1]==cQuote ) i++;
|
||||
z[j++] = z[i];
|
||||
}
|
||||
z[j] = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** The lsm1Connect() method is invoked to create a new
|
||||
** lsm1_vtab that describes the virtual table.
|
||||
@@ -58,6 +75,7 @@ static int lsm1Connect(
|
||||
){
|
||||
lsm1_vtab *pNew;
|
||||
int rc;
|
||||
char *zFilename;
|
||||
|
||||
if( argc!=4 || argv[3]==0 || argv[3][0]==0 ){
|
||||
*pzErr = sqlite3_mprintf("filename argument missing");
|
||||
@@ -75,7 +93,10 @@ static int lsm1Connect(
|
||||
rc = SQLITE_ERROR;
|
||||
goto connect_failed;
|
||||
}
|
||||
rc = lsm_open(pNew->pDb, argv[3]);
|
||||
zFilename = sqlite3_mprintf("%s", argv[3]);
|
||||
lsm1Dequote(zFilename);
|
||||
rc = lsm_open(pNew->pDb, zFilename);
|
||||
sqlite3_free(zFilename);
|
||||
if( rc ){
|
||||
*pzErr = sqlite3_mprintf("lsm_open failed with %d", rc);
|
||||
rc = SQLITE_ERROR;
|
||||
@@ -595,6 +616,7 @@ int lsm1Update(
|
||||
){
|
||||
lsm1_vtab *p = (lsm1_vtab*)pVTab;
|
||||
const void *pKey;
|
||||
void *pFree = 0;
|
||||
int nKey;
|
||||
int eType;
|
||||
int rc = LSM_OK;
|
||||
@@ -629,6 +651,7 @@ int lsm1Update(
|
||||
(unsigned char**)&pKey,&nKey,
|
||||
pSpace,sizeof(pSpace));
|
||||
if( rc ) return rc;
|
||||
if( pKey!=(const void*)pSpace ) pFree = (void*)pKey;
|
||||
}
|
||||
if( sqlite3_value_type(argv[2+LSM1_COLUMN_BLOBVALUE])==SQLITE_BLOB ){
|
||||
pVal = sqlite3_value_blob(argv[2+LSM1_COLUMN_BLOBVALUE]);
|
||||
@@ -683,7 +706,7 @@ int lsm1Update(
|
||||
}
|
||||
}
|
||||
}
|
||||
if( pKey!=(const void*)pSpace ) sqlite3_free((void*)pKey);
|
||||
sqlite3_free(pFree);
|
||||
return rc==LSM_OK ? SQLITE_OK : SQLITE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# 2014 Dec 19
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
|
||||
if {![info exists testdir]} {
|
||||
set testdir [file join [file dirname [info script]] .. .. .. test]
|
||||
}
|
||||
source $testdir/tester.tcl
|
||||
|
||||
# Check if the lsm1 extension has been compiled.
|
||||
if {$::tcl_platform(platform) == "windows"} {
|
||||
set lsm1 lsm.dll
|
||||
} else {
|
||||
set lsm1 lsm.so
|
||||
}
|
||||
|
||||
if {[file exists [file join .. $lsm1]]} {
|
||||
proc return_if_no_lsm1 {} {}
|
||||
} else {
|
||||
proc return_if_no_lsm1 {} {
|
||||
finish_test
|
||||
return -code return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
proc load_lsm1_vtab {db} {
|
||||
db enable_load_extension 1
|
||||
db eval {SELECT load_extension('../lsm')}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
# 2017 July 14
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#*************************************************************************
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this script is testing the lsm1 virtual table module.
|
||||
#
|
||||
|
||||
source [file join [file dirname [info script]] lsm1_common.tcl]
|
||||
set testprefix lsm1_simple
|
||||
return_if_no_lsm1
|
||||
load_lsm1_vtab db
|
||||
|
||||
forcedelete testlsm.db
|
||||
|
||||
do_execsql_test 1.0 {
|
||||
CREATE VIRTUAL TABLE x1 USING lsm1(testlsm.db);
|
||||
PRAGMA table_info(x1);
|
||||
} {
|
||||
0 key {} 0 {} 0
|
||||
1 blobkey {} 0 {} 0
|
||||
2 value {} 0 {} 0
|
||||
3 blobvalue {} 0 {} 0
|
||||
}
|
||||
|
||||
do_execsql_test 1.1 {
|
||||
INSERT INTO x1(blobkey, blobvalue) VALUES(x'abcd', x'1234');
|
||||
SELECT quote(blobkey), quote(blobvalue) FROM x1;
|
||||
} {X'ABCD' X'1234'}
|
||||
|
||||
do_catchsql_test 1.2 {
|
||||
UPDATE x1 SET blobvalue = x'7890' WHERE blobkey = x'abcd';
|
||||
} {1 {cannot UPDATE}}
|
||||
|
||||
do_catchsql_test 1.3 {
|
||||
DELETE FROM x1 WHERE blobkey = x'abcd'
|
||||
} {1 {cannot DELETE}}
|
||||
|
||||
do_test 1.4 {
|
||||
lsort [glob testlsm.db*]
|
||||
} {testlsm.db testlsm.db-log testlsm.db-shm}
|
||||
|
||||
db close
|
||||
do_test 1.5 {
|
||||
lsort [glob testlsm.db*]
|
||||
} {testlsm.db}
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
+12
-4
@@ -17,8 +17,14 @@
|
||||
** SELECT * FROM carray($ptr,5)
|
||||
**
|
||||
** The query above returns 5 integers contained in a C-language array
|
||||
** at the address $ptr. $ptr is a pointer to the array of integers that
|
||||
** has been cast to an integer.
|
||||
** at the address $ptr. $ptr is a pointer to the array of integers.
|
||||
** The pointer value must be assigned to $ptr using the
|
||||
** sqlite3_bind_pointer() interface with a pointer type of "carray".
|
||||
** For example:
|
||||
**
|
||||
** static int aX[] = { 53, 9, 17, 2231, 4, 99 };
|
||||
** int i = sqlite3_bind_parameter_index(pStmt, "$ptr");
|
||||
** sqlite3_bind_value(pStmt, i, aX, "carray");
|
||||
**
|
||||
** There is an optional third parameter to determine the datatype of
|
||||
** the C-language array. Allowed values of the third parameter are
|
||||
@@ -26,6 +32,8 @@
|
||||
**
|
||||
** SELECT * FROM carray($ptr,10,'char*');
|
||||
**
|
||||
** The default value of the third parameter is 'int32'.
|
||||
**
|
||||
** HOW IT WORKS
|
||||
**
|
||||
** The carray "function" is really a virtual table with the
|
||||
@@ -232,7 +240,7 @@ static int carrayFilter(
|
||||
){
|
||||
carray_cursor *pCur = (carray_cursor *)pVtabCursor;
|
||||
if( idxNum ){
|
||||
pCur->pPtr = sqlite3_value_pointer(argv[0]);
|
||||
pCur->pPtr = sqlite3_value_pointer(argv[0], "carray");
|
||||
pCur->iCnt = pCur->pPtr ? sqlite3_value_int64(argv[1]) : 0;
|
||||
if( idxNum<3 ){
|
||||
pCur->eType = CARRAY_INT32;
|
||||
@@ -369,7 +377,7 @@ static void inttoptrFunc(
|
||||
int i32 = i64 & 0xffffffff;
|
||||
memcpy(&p, &i32, sizeof(p));
|
||||
}
|
||||
sqlite3_result_pointer(context, p);
|
||||
sqlite3_result_pointer(context, p, "carray");
|
||||
}
|
||||
#endif /* SQLITE_TEST */
|
||||
|
||||
|
||||
+3
-2
@@ -21,7 +21,8 @@
|
||||
** UPDATE counterTab SET cnt=remember(cnt,$PTR)+1 WHERE id=$ID
|
||||
**
|
||||
** Prepare the above statement once. Then to use it, bind the address
|
||||
** of the output variable to $PTR and the id of the counter to $ID and
|
||||
** of the output variable to $PTR using sqlite3_bind_pointer() with a
|
||||
** pointer type of "carray" and bind the id of the counter to $ID and
|
||||
** run the prepared statement.
|
||||
**
|
||||
** One can imagine doing similar things with floating-point values and
|
||||
@@ -47,7 +48,7 @@ static void rememberFunc(
|
||||
sqlite3_int64 *ptr;
|
||||
assert( argc==2 );
|
||||
v = sqlite3_value_int64(argv[0]);
|
||||
ptr = sqlite3_value_pointer(argv[1]);
|
||||
ptr = sqlite3_value_pointer(argv[1], "carray");
|
||||
if( ptr ) *ptr = v;
|
||||
sqlite3_result_int64(pCtx, v);
|
||||
}
|
||||
|
||||
+13
-35
@@ -30,23 +30,6 @@ SQLITE_EXTENSION_INIT1
|
||||
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
|
||||
/*
|
||||
** The following macros are used to cast pointers to integers.
|
||||
** The way you do this varies from one compiler
|
||||
** to the next, so we have developed the following set of #if statements
|
||||
** to generate appropriate macros for a wide range of compilers.
|
||||
*/
|
||||
#if defined(__PTRDIFF_TYPE__) /* This case should work for GCC */
|
||||
# define SQLITE_PTR_TO_INT64(X) ((sqlite3_int64)(__PTRDIFF_TYPE__)(X))
|
||||
#elif !defined(__GNUC__) /* Works for compilers other than LLVM */
|
||||
# define SQLITE_PTR_TO_INT64(X) ((sqlite3_int64)(((char*)X)-(char*)0))
|
||||
#elif defined(HAVE_STDINT_H) /* Use this case if we have ANSI headers */
|
||||
# define SQLITE_PTR_TO_INT64(X) ((sqlite3_int64)(intptr_t)(X))
|
||||
#else /* Generates a warning - but it always works */
|
||||
# define SQLITE_PTR_TO_INT64(X) ((sqlite3_int64)(X))
|
||||
#endif
|
||||
|
||||
|
||||
/* stmt_vtab is a subclass of sqlite3_vtab which will
|
||||
** serve as the underlying representation of a stmt virtual table
|
||||
*/
|
||||
@@ -92,22 +75,21 @@ static int stmtConnect(
|
||||
int rc;
|
||||
|
||||
/* Column numbers */
|
||||
#define STMT_COLUMN_PTR 0 /* Numeric value of the statement pointer */
|
||||
#define STMT_COLUMN_SQL 1 /* SQL for the statement */
|
||||
#define STMT_COLUMN_NCOL 2 /* Number of result columns */
|
||||
#define STMT_COLUMN_RO 3 /* True if read-only */
|
||||
#define STMT_COLUMN_BUSY 4 /* True if currently busy */
|
||||
#define STMT_COLUMN_NSCAN 5 /* SQLITE_STMTSTATUS_FULLSCAN_STEP */
|
||||
#define STMT_COLUMN_NSORT 6 /* SQLITE_STMTSTATUS_SORT */
|
||||
#define STMT_COLUMN_NAIDX 7 /* SQLITE_STMTSTATUS_AUTOINDEX */
|
||||
#define STMT_COLUMN_NSTEP 8 /* SQLITE_STMTSTATUS_VM_STEP */
|
||||
#define STMT_COLUMN_REPREP 9 /* SQLITE_STMTSTATUS_REPREPARE */
|
||||
#define STMT_COLUMN_RUN 10 /* SQLITE_STMTSTATUS_RUN */
|
||||
#define STMT_COLUMN_MEM 11 /* SQLITE_STMTSTATUS_MEMUSED */
|
||||
#define STMT_COLUMN_SQL 0 /* SQL for the statement */
|
||||
#define STMT_COLUMN_NCOL 1 /* Number of result columns */
|
||||
#define STMT_COLUMN_RO 2 /* True if read-only */
|
||||
#define STMT_COLUMN_BUSY 3 /* True if currently busy */
|
||||
#define STMT_COLUMN_NSCAN 4 /* SQLITE_STMTSTATUS_FULLSCAN_STEP */
|
||||
#define STMT_COLUMN_NSORT 5 /* SQLITE_STMTSTATUS_SORT */
|
||||
#define STMT_COLUMN_NAIDX 6 /* SQLITE_STMTSTATUS_AUTOINDEX */
|
||||
#define STMT_COLUMN_NSTEP 7 /* SQLITE_STMTSTATUS_VM_STEP */
|
||||
#define STMT_COLUMN_REPREP 8 /* SQLITE_STMTSTATUS_REPREPARE */
|
||||
#define STMT_COLUMN_RUN 9 /* SQLITE_STMTSTATUS_RUN */
|
||||
#define STMT_COLUMN_MEM 10 /* SQLITE_STMTSTATUS_MEMUSED */
|
||||
|
||||
|
||||
rc = sqlite3_declare_vtab(db,
|
||||
"CREATE TABLE x(ptr,sql,ncol,ro,busy,nscan,nsort,naidx,nstep,"
|
||||
"CREATE TABLE x(sql,ncol,ro,busy,nscan,nsort,naidx,nstep,"
|
||||
"reprep,run,mem)");
|
||||
if( rc==SQLITE_OK ){
|
||||
pNew = sqlite3_malloc( sizeof(*pNew) );
|
||||
@@ -170,10 +152,6 @@ static int stmtColumn(
|
||||
){
|
||||
stmt_cursor *pCur = (stmt_cursor*)cur;
|
||||
switch( i ){
|
||||
case STMT_COLUMN_PTR: {
|
||||
sqlite3_result_int64(ctx, SQLITE_PTR_TO_INT64(pCur->pStmt));
|
||||
break;
|
||||
}
|
||||
case STMT_COLUMN_SQL: {
|
||||
sqlite3_result_text(ctx, sqlite3_sql(pCur->pStmt), -1, SQLITE_TRANSIENT);
|
||||
break;
|
||||
@@ -295,7 +273,7 @@ static sqlite3_module stmtModule = {
|
||||
int sqlite3StmtVtabInit(sqlite3 *db){
|
||||
int rc = SQLITE_OK;
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
rc = sqlite3_create_module(db, "stmt", &stmtModule, 0);
|
||||
rc = sqlite3_create_module(db, "sqlite_stmt", &stmtModule, 0);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
C Fix\san\sincorrect\stype\ssignature\sfor\sthe\sloadable\sextension\spointer\nfor\ssqlite3_result_pointer().
|
||||
D 2017-07-13T17:56:52.837
|
||||
F Makefile.in 081e48dfe7f995d57ce1a88ddf4d2917b4349158648a6cd45b42beae30de3a12
|
||||
C Improve\sthe\ssqlite3_result_pointer()\sinterface\sso\sthat\sit\scannot\sbe\sfaked\nusing\ssqlite3_result_null()\sand\ssqlite3_result_subtype().
|
||||
D 2017-07-17T11:39:46.366
|
||||
F Makefile.in eda8bedf08c4c93e2137ef1218b3d3302488c68c2774918de0335a1133aab157
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 20850e3e8d4d4791e0531955852d768eb06f24138214870d543abb1a47346fba
|
||||
F README.md f5c87359573c4d255425e588a56554b50fdcc2afba4e017a2e02a43701456afd
|
||||
@@ -70,7 +70,7 @@ F ext/fts3/README.content fdc666a70d5257a64fee209f97cf89e0e6e32b51
|
||||
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
|
||||
F ext/fts3/README.tokenizers e0a8b81383ea60d0334d274fadf305ea14a8c314
|
||||
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
|
||||
F ext/fts3/fts3.c 02fbd2215309a7a73cbf29045897344987b6e17bb0b1685d13155f8b29768a50
|
||||
F ext/fts3/fts3.c dfda8bb464d229785e0528fcf7017b4f8e95656d40d28333dfc3f3363bbe229e
|
||||
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
|
||||
F ext/fts3/fts3Int.h eb2502000148e80913b965db3e59f29251266d0a
|
||||
F ext/fts3/fts3_aux.c 9edc3655fcb287f0467d0a4b886a01c6185fe9f1
|
||||
@@ -209,8 +209,8 @@ F ext/fts5/tool/showfts5.tcl d54da0e067306663e2d5d523965ca487698e722c
|
||||
F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43
|
||||
F ext/icu/icu.c 84900472a088a3a172c6c079f58a1d3a1952c332
|
||||
F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
|
||||
F ext/lsm1/Makefile a2ea4975162be8932b5efa727080f4982715d34c32035d9eb7a015ae78404981
|
||||
F ext/lsm1/Makefile.msc f9b5f1f9f534231bf315d96364315928f9f06eae1a96435197c98c1f834e23b4
|
||||
F ext/lsm1/Makefile 2951812df1c1cbc9e023af7e070876f479b3d75ce3898b3b9d00f83fecf13608
|
||||
F ext/lsm1/Makefile.msc f8c878b467232226de288da320e1ac71c131f5ec91e08b21f502303347260013
|
||||
F ext/lsm1/lsm-test/README 87ea529d2abe615e856d4714bfe8bb185e6c2771b8612aa6298588b7b43e6f86
|
||||
F ext/lsm1/lsm-test/lsmtest.h 5847594d4b43ec3412e1fd97104f7eb5fd770be55e691e6cb2e80929f86bebe3
|
||||
F ext/lsm1/lsm-test/lsmtest1.c 33158978327f800e82b6a47c09b86ace809f56a9ff10b0162273ec1186cc3153
|
||||
@@ -249,12 +249,14 @@ F ext/lsm1/lsm_str.c 65e361b488c87b10bf3e5c0070b14ffc602cf84f094880bece77bbf6678
|
||||
F ext/lsm1/lsm_tree.c 682679d7ef2b8b6f2fe77aeb532c8d29695bca671c220b0abac77069de5fb9fb
|
||||
F ext/lsm1/lsm_unix.c 57361bcf5b1a1a028f5d66571ee490e9064d2cfb145a2cc9e5ddade467bb551b
|
||||
F ext/lsm1/lsm_varint.c 43f954af668a66c7928b81597c14d6ad4be9fedbc276bbd80f52fa28a02fdb62
|
||||
F ext/lsm1/lsm_vtab.c e4afff67205741075b74d6c598f9f9967bbdec8eb306bdc7cc1dcd0c71bffbd9
|
||||
F ext/lsm1/lsm_vtab.c d5af32abe32601b3f2618b9488225db9ca06af803ddee1aaaf1653e08e9d112b
|
||||
F ext/lsm1/lsm_win32.c 0a4acbd7e8d136dd3a5753f0a9e7a9802263a9d96cef3278cf120bcaa724db7c
|
||||
F ext/lsm1/test/lsm1_common.tcl 5ed4bab07c93be2e4f300ebe46007ecf4b3e20bc5fbe1dedaf04a8774a6d8d82
|
||||
F ext/lsm1/test/lsm1_simple.test 3bb38951450cd1f12a6c294949334d6fbb109a3da38c48eaf0877a37c43a0fab
|
||||
F ext/misc/README.md 8e008c8d2b02e09096b31dfba033253ac27c6c06a18aa5826e299fa7601d90b2
|
||||
F ext/misc/amatch.c 6db4607cb17c54b853a2d7c7c36046d004853f65b9b733e6f019d543d5dfae87
|
||||
F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a22525eddb
|
||||
F ext/misc/carray.c 1fbaf9ada5b1919c07a5e76e260a41c13a20fe6d399411e41f1e9cc4a559479f
|
||||
F ext/misc/carray.c 880684b2796ef6ad915094093297eede40db6c07f280c7f491c8eff72ea03ec7
|
||||
F ext/misc/closure.c 0d2a038df8fbae7f19de42e7c7d71f2e4dc88704
|
||||
F ext/misc/completion.c 52c3f01523e3e387eb321b4739a89d1fe47cbe6025aa1f2d8d3685e9e365df0f
|
||||
F ext/misc/compress.c 122faa92d25033d6c3f07c39231de074ab3d2e83
|
||||
@@ -269,7 +271,7 @@ F ext/misc/memvfs.c e5225bc22e79dde6b28380f3a068ddf600683a33
|
||||
F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342
|
||||
F ext/misc/percentile.c 92699c8cd7d517ff610e6037e56506f8904dae2e
|
||||
F ext/misc/regexp.c a68d25c659bd2d893cd1215667bbf75ecb9dc7d4
|
||||
F ext/misc/remember.c bee7963ddfa5b0633f4ac13f01cb471ae712f323a87978c9a9a47108b555598f
|
||||
F ext/misc/remember.c 9b9e220ca9d08466508018a9643d4a367bc03bb038d5213c21f70ab74bfc7f20
|
||||
F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a
|
||||
F ext/misc/scrub.c 1c5bfb8b0cd18b602fcb55755e84abf0023ac2fb
|
||||
F ext/misc/series.c b0f5f346aca9b7ff7caaf0da2efb4ad462441abd4dcd92a460cb573b3ea2370b
|
||||
@@ -277,7 +279,7 @@ F ext/misc/sha1.c 0b9e9b855354910d3ca467bf39099d570e73db56
|
||||
F ext/misc/shathree.c fa185d7aee0ad0aca5e091b4a2db7baff11796170e5793b5de99e511a13af448
|
||||
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
|
||||
F ext/misc/spellfix.c a4723b6aff748a417b5091b68a46443265c40f0d
|
||||
F ext/misc/stmt.c de7f8e172b319f9f708bd31b15a048e31dc4f73639454fe23a6b31bf8a7ea1d6
|
||||
F ext/misc/stmt.c 6f16443abb3551e3f5813bb13ba19a30e7032830015b0f92fe0c0453045c0a11
|
||||
F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512
|
||||
F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95
|
||||
F ext/misc/vfsstat.c bf10ef0bc51e1ad6756629e1edb142f7a8db1178
|
||||
@@ -402,10 +404,10 @@ F src/ctime.c 928954802b1397d9fb1378c7eb702c94b4735bbab1d5793e21b6a77734f56a1b
|
||||
F src/date.c cc42a41c7422389860d40419a5e3bce5eaf6e7835c3ba2677751dc653550a5c7
|
||||
F src/dbstat.c 7a4ba8518b6369ef3600c49cf9c918ad979acba610b2aebef1b656d649b96720
|
||||
F src/delete.c 3213547e97b676c6fa79948b7a9ede4801ea04a01a2043241deafedf132ecf5d
|
||||
F src/expr.c f3f0f7a1a8f91e980244152e9e0263144a9db862e715a80c70422faa2fde4f2f
|
||||
F src/expr.c 68552ca7f1238c9661e60a3adb4bd28c93d5373895bed5a0293b3977518dc980
|
||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||
F src/fkey.c 5ff2c895fe087756d8085dc1a9bc229b5670e2a65c3929dd87c71e43649af333
|
||||
F src/func.c 7647140a8624c66cc6e34bdf8005a92390253d6272e87c7901dc8065b563d435
|
||||
F src/func.c e2854b19386b93ad6b498a3f3b7d6baa98ec14cfe84530fb12fce4414263d871
|
||||
F src/global.c 8a6ab6b4d91effb96ffa81b39f0d70c862abca157f8aaa194600a4a8b7923344
|
||||
F src/hash.c a12580e143f10301ed5166ea4964ae2853d3905a511d4e0c44497245c7ce1f7a
|
||||
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
|
||||
@@ -414,7 +416,7 @@ F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||
F src/insert.c bb70abf32c7c926745eb550938db9132309584a667a44c2db0e5fa3207600391
|
||||
F src/legacy.c 134ab3e3fae00a0f67a5187981d6935b24b337bcf0f4b3e5c9fa5763da95bf4e
|
||||
F src/loadext.c 20865b183bb8a3723d59cf1efffc3c50217eb452c1021d077b908c94da26b0b2
|
||||
F src/main.c 20574bb9a0d7911efcd659ac252f2126dc4e3308bed3c8764ea3fb5a00f70420
|
||||
F src/main.c 3a9da9e3974d8a32ef6ca15b75503d540af22d284beb75bc7f0d93254ca3f8f7
|
||||
F src/malloc.c e20bb2b48abec52d3faf01cce12e8b4f95973755fafec98d45162dfdab111978
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
|
||||
@@ -442,19 +444,19 @@ F src/parse.y e384cb73f99e1b074085c974b37f4d830e885359e4b60837e30f7d67c16ba65b
|
||||
F src/pcache.c 62835bed959e2914edd26afadfecce29ece0e870
|
||||
F src/pcache.h 521bb9610d38ef17a3cc9b5ddafd4546c2ea67fa3d0e464823d73c2a28d50e11
|
||||
F src/pcache1.c 1195a21fe28e223e024f900b2011e80df53793f0356a24caace4188b098540dc
|
||||
F src/pragma.c 54e64a9d65e2c3b6ef11d4ca732c6abc8b67f5e886f222ffe2cbf3506c4efbd2
|
||||
F src/pragma.c 2ae4088e9c3ca0e63ffc3ada7f2d2d66e91f0b3db50c7f7ddb2f56e9e37fd638
|
||||
F src/pragma.h bb83728944b42f6d409c77f5838a8edbdb0fe83046c5496ffc9602b40340a324
|
||||
F src/prepare.c 4b84ae7458febe1df3e04ae62ba56abc851f771340e460d14426e6802c5615f4
|
||||
F src/prepare.c dd250f904739b1dc449c131ac527c35e3424d94082dd111321bd83f80c6bb0fe
|
||||
F src/printf.c 8757834f1b54dae512fb25eb1acc8e94a0d15dd2290b58f2563f65973265adb2
|
||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||
F src/resolve.c 4324a94573b1e29286f8121e4881db59eaedc014afeb274c8d3e07ed282e0e20
|
||||
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
|
||||
F src/select.c 95659b7990e390f9bd8dc30b8975c675fcd1d46e569bc4f5a14e22a8d03e3d14
|
||||
F src/shell.c 0401a716fc5343594b8ee60ce065d9a71373d3403f0b81f9fed684741e6401d1
|
||||
F src/shell.c.in 98bfdeeb0808418b37f59e6d380568a76e0733efe2494377096f434b39940cad
|
||||
F src/sqlite.h.in 77f4bee882ad4999bf04cf011e1c4cd7f1c6488e290764f3fb46833810447c5d
|
||||
F src/shell.c e89ad1135cb47c95896a1aec4bd0113af90a057d80f20003f354fa56fc10a616
|
||||
F src/shell.c.in dae43a6a43988d955014f070341f296561ea4a43ca2685166a32495b0667ef59
|
||||
F src/sqlite.h.in 07edd8c96112acb8b8f5e4a6d0c404bef0796484cd1d28408f6ec7a4b3f96f97
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 654d76dd288780a460be9c88edc6a5eb2d61df03a7153c92f1d87aba41f73b96
|
||||
F src/sqlite3ext.h 967154985ed2ae62f90d9029bb5b5071793d847f1696a2ebe9e8cc0b042ae60b
|
||||
F src/sqliteInt.h 0ba730cdc8afa723a5642380712f8bb33abd6a69218571c18b94acf3562de22a
|
||||
F src/sqliteLimit.h 1513bfb7b20378aa0041e7022d04acb73525de35b80b252f1b83fedb4de6a76b
|
||||
F src/status.c a9e66593dfb28a9e746cba7153f84d49c1ddc4b1
|
||||
@@ -519,11 +521,11 @@ F src/util.c fc081ec6f63448dcd80d3dfad35baecfa104823254a815b081a4d9fe76e1db23
|
||||
F src/vacuum.c 874c0f2f15ab2908748297d587d22d485ea96d55aaec91d4775dddb2e24d2ecf
|
||||
F src/vdbe.c adc8a378710ec2376101483cc8a5f499539ee9bbebfb2a784f3370704d5d44ad
|
||||
F src/vdbe.h 7bf719031782823b915aff2c1f93d1944c1c6b300770a15339b7dbc9610b802e
|
||||
F src/vdbeInt.h 36b162cce2410f07cc6ad1c4472af7d5e31bcc0b8a532082aa6f2740e124a11f
|
||||
F src/vdbeapi.c 8f830cf2e37929315a09b578a975d77070bad8185ade2006b14e72bf60227f3e
|
||||
F src/vdbeInt.h 19bd04a4211fe56c712ab35b48be77fd5a0579b851e9dea2cb8deade359b72b9
|
||||
F src/vdbeapi.c f600bf0dfcea8edb0e0a44a98035bbe3310824af18c193ba242449db250627a4
|
||||
F src/vdbeaux.c 518d1cf6728ecb591390541c58b14902e8d61735ef574426b9971624c54d2c4b
|
||||
F src/vdbeblob.c 359891617358deefc85bef7bcf787fa6b77facb9
|
||||
F src/vdbemem.c 78dfccca73eba44f4f6988f1f3d6ca93dd6431fcf9e6946945f4505fff1fb03f
|
||||
F src/vdbemem.c fe8fce1cdc258320b465934039fe4b1230d63f81d6b81b1eac775b6eec00af0d
|
||||
F src/vdbesort.c f512c68d0bf7e0105316a5594c4329358c8ee9cae3b25138df041d97516c0372
|
||||
F src/vdbetrace.c 41963d5376f0349842b5fc4aaaaacd7d9cdc0834
|
||||
F src/vtab.c 35b9bdc2b41de32a417141d12097bcc4e29a77ed7cdb8f836d1d2305d946b61b
|
||||
@@ -569,7 +571,7 @@ F test/async3.test d73a062002376d7edc1fe3edff493edbec1fc2f7
|
||||
F test/async4.test 1787e3952128aa10238bf39945126de7ca23685a
|
||||
F test/async5.test 383ab533fdb9f7ad228cc99ee66e1acb34cc0dc0
|
||||
F test/atof1.test ff0b0156fd705b67c506e1f2bfe9e26102bea9bd
|
||||
F test/attach.test b4c269f780b82acb1a17f2dddefe4da7304406cfa7cc371318ee55b7bf5ffb0c
|
||||
F test/attach.test f4b8918ba2f3e88e6883b8452340545f10a1388af808343c37fc5c577be8281c
|
||||
F test/attach2.test 0ec5defa340363de6cd50fd595046465e9aaba2d
|
||||
F test/attach3.test c59d92791070c59272e00183b7353eeb94915976
|
||||
F test/attach4.test 53bf502f17647c6d6c5add46dda6bac8b6f4665c
|
||||
@@ -719,10 +721,10 @@ F test/e_createtable.test d4c6059d44dcd4b636de9aae322766062b471844
|
||||
F test/e_delete.test ab39084f26ae1f033c940b70ebdbbd523dc4962e
|
||||
F test/e_droptrigger.test 3cd080807622c13e5bbb61fc9a57bd7754da2412
|
||||
F test/e_dropview.test 21ce09c361227ddbc9819a5608ee2700c276bdd5
|
||||
F test/e_expr.test d0dd488e0527cbc560ae2dea1939cc44cb9b9924
|
||||
F test/e_fkey.test 54cc0046d2d952d6c42b0dd94414e7a8f75f79f4
|
||||
F test/e_expr.test 146deba180273d19e3bf9f6b45f4e50094c64c7ec4756ea72f79dda25818eb17
|
||||
F test/e_fkey.test dcdc6ad26b1d4f07636208de4c1c22aae7c0597a685a6c10fe6da91f3191dd96
|
||||
F test/e_fts3.test 8cf40550bb088a6aa187c818c00fabe26ef82900a4cd5c66b427ccafe28bedaa
|
||||
F test/e_insert.test 3de217e95094d3d165992a6de1164bbc4bd92dc7
|
||||
F test/e_insert.test f02f7f17852b2163732c6611d193f84fc67bc641fb4882c77a464076e5eba80e
|
||||
F test/e_reindex.test 2bebf7b393e519198b7c654407221cf171a439b8
|
||||
F test/e_resolve.test a61751c368b109db73df0f20fc75fb47e166b1d8
|
||||
F test/e_select.test 16651bb681e83a1a2875ff4a595ed2b4b4dee375
|
||||
@@ -974,7 +976,7 @@ F test/keyword1.test 37ef6bba5d2ed5b07ecdd6810571de2956599dff
|
||||
F test/kvtest.c d2b8cfc91047ebf6cac4f3a04f19c3a864e4ecfd683bbb65c395df450b8dc79c
|
||||
F test/lastinsert.test 42e948fd6442f07d60acbd15d33fb86473e0ef63
|
||||
F test/laststmtchanges.test ae613f53819206b3222771828d024154d51db200
|
||||
F test/like.test e7b1e724c731a219c4338e37cfe2c5861cd1cd7a856bbdd1d6045ae4f83dc7c7
|
||||
F test/like.test 3d26ae14d7042a0e96f7b0b9e9ad2c8ca6ed122772439c6b1c691fe167e15a37
|
||||
F test/like2.test 3b2ee13149ba4a8a60b59756f4e5d345573852da
|
||||
F test/like3.test 3608a2042b6f922f900fbfd5d3ce4e7eca57f7c4
|
||||
F test/limit.test 0c99a27a87b14c646a9d583c7c89fd06c352663e
|
||||
@@ -1083,7 +1085,7 @@ F test/parser1.test 391b9bf9a229547a129c61ac345ed1a6f5eb1854
|
||||
F test/pcache.test c8acbedd3b6fd0f9a7ca887a83b11d24a007972b
|
||||
F test/pcache2.test af7f3deb1a819f77a6d0d81534e97d1cf62cd442
|
||||
F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff
|
||||
F test/permutations.test 8aaa22a0f428a7e6b8446b97bc7691a273eaeff5dc290fb9129bf79fa9813a6e
|
||||
F test/permutations.test 5e2e5439642898e0947ced066ad09b82bd817ddfb83dc71291b4c957efc84b62
|
||||
F test/pragma.test f274259d6393b6681eb433beb8dd39a26ec06a4431052a4880b43b84912a3f58
|
||||
F test/pragma2.test e5d5c176360c321344249354c0c16aec46214c9f
|
||||
F test/pragma3.test 14c12bc5352b1e100e0b6b44f371053a81ccf8ed
|
||||
@@ -1176,7 +1178,7 @@ F test/shell1.test f78ea0e2637ae9f497cb41206f6346f983052ffc7a359e664aaf6847fc704
|
||||
F test/shell2.test e242a9912f44f4c23c3d1d802a83e934e84c853b
|
||||
F test/shell3.test 9b95ba643eaa228376f06a898fb410ee9b6e57c1
|
||||
F test/shell4.test 89ad573879a745974ff2df20ff97c5d6ffffbd5d
|
||||
F test/shell5.test 0d973866d0df8501486a840f51d1502ab0d9b38ca12c9b242ee26adc788af576
|
||||
F test/shell5.test 23939a4c51f0421330ea61dbd3c74f9c215f5f8d3d1a94846da6ffc777a35458
|
||||
F test/shell6.test ab1592ebe881371f651f18ee6a0df21cbfb5310f88cb832ab642d4038f679772
|
||||
F test/shell7.test 115132f66d0463417f408562cc2cf534f6bbc6d83a6d50f0072a9eb171bae97f
|
||||
F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
|
||||
@@ -1217,7 +1219,7 @@ F test/sqllog.test 6af6cb0b09f4e44e1917e06ce85be7670302517a
|
||||
F test/stat.test f8f1279ffffabe6df825723af18cc6e0ae70a893
|
||||
F test/statfault.test f525a7bf633e50afd027700e9a486090684b1ac1
|
||||
F test/stmt.test 64844332db69cf1a735fcb3e11548557fc95392f
|
||||
F test/stmtvtab1.test 2a3cee496574ee9515e5e7a92fb8d9447903ccc14536a21545debeda267ff3c8
|
||||
F test/stmtvtab1.test acc3c40f484f2c4922e270724383d715abb9d69676da907a9c64f31c54f2ef9f
|
||||
F test/subjournal.test 8d4e2572c0ee9a15549f0d8e40863161295107e52f07a3e8012a2e1fdd093c49
|
||||
F test/subquery.test d7268d193dd33d5505df965399d3a594e76ae13f
|
||||
F test/subquery2.test 438f8a7da1457277b22e4176510f7659b286995f
|
||||
@@ -1566,7 +1568,7 @@ F tool/mkctimec.tcl dd183b73ae1c28249669741c250525f0407e579a70482371668fd5f130d9
|
||||
F tool/mkkeywordhash.c 2e852ac0dfdc5af18886dc1ce7e9676d11714ae3df0a282dc7d90b3a0fe2033c
|
||||
F tool/mkmsvcmin.tcl cbd93f1cfa3a0a9ae56fc958510aa3fc3ac65e29cb111716199e3d0e66eefaa4
|
||||
F tool/mkopcodec.tcl d1b6362bd3aa80d5520d4d6f3765badf01f6c43c
|
||||
F tool/mkopcodeh.tcl a01d2c1d8a6205b03fc635adf3735b4c523befd3
|
||||
F tool/mkopcodeh.tcl bb04ab6e5e2000c91e0c69a597e7e36e002320d123e2e1944cb2819181b72ee9
|
||||
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
|
||||
F tool/mkpragmatab.tcl 2144bc8550a6471a029db262a132d2df4b9e0db61b90398bf64f5b7b3f8d92cd
|
||||
F tool/mkshellc.tcl 69c38ecd7b74b2b0799a35ce20e1e3998e504d8c99c100ca4b98ae9d8f6279bc
|
||||
@@ -1587,7 +1589,7 @@ F tool/run-speed-test.sh f95d19fd669b68c4c38b6b475242841d47c66076
|
||||
F tool/showdb.c e6bc9dba233bf1b57ca0a525a2bba762db4e223de84990739db3f09c46151b1e
|
||||
F tool/showjournal.c 5bad7ae8784a43d2b270d953060423b8bd480818
|
||||
F tool/showlocks.c 9920bcc64f58378ff1118caead34147201f48c68
|
||||
F tool/showstat4.c b14159aa062f661b394ba37b6b7b94bfb8012ab9
|
||||
F tool/showstat4.c 0682ebea7abf4d3657f53c4a243f2e7eab48eab344ed36a94bb75dcd19a5c2a1
|
||||
F tool/showwal.c ad9d768f96ca6199ad3a8c9562d679680bd032dd01204ea3e5ea6fb931d81847
|
||||
F tool/soak1.tcl 8d407956e1a45b485a8e072470a3e629a27037fe
|
||||
F tool/spaceanal.tcl f40dc82b4d5e39d040a02a3ec38268e324068815e4292a15ffa30ee93208bbfd
|
||||
@@ -1631,7 +1633,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P e5a518038fcb23376d2b17d4d70648320bc5540c5bd8b164201044ebe1ce45c5
|
||||
R c5909f0683f2365e40f92a217eed2222
|
||||
P 211cce04e97d2e325a6ea3e99738fc71115d673dc13daeffb03ac3140deb11de
|
||||
R b5069fb289c149b1ae5393ff07d0ac4e
|
||||
U drh
|
||||
Z 36e4bbc5bdc1a46b79fe430f87487a42
|
||||
Z 009027d79ad8aabb66e97a4b8be0060e
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0bd7875bd9948836a14061275eb8ddac627f562a49f59f400ec98c00e2be82c5
|
||||
c13264d5ef0470fb24e09f7bc12f19be3b77eab06d41f55607b38dddb532a132
|
||||
+2
-2
@@ -5255,8 +5255,8 @@ void sqlite3ClearTempRegCache(Parse *pParse){
|
||||
int sqlite3NoTempsInRange(Parse *pParse, int iFirst, int iLast){
|
||||
int i;
|
||||
if( pParse->nRangeReg>0
|
||||
&& pParse->iRangeReg+pParse->nRangeReg<iLast
|
||||
&& pParse->iRangeReg>=iFirst
|
||||
&& pParse->iRangeReg+pParse->nRangeReg > iFirst
|
||||
&& pParse->iRangeReg <= iLast
|
||||
){
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -85,6 +85,10 @@ static void typeofFunc(
|
||||
assert( SQLITE_TEXT==3 );
|
||||
assert( SQLITE_BLOB==4 );
|
||||
assert( SQLITE_NULL==5 );
|
||||
/* EVIDENCE-OF: R-01470-60482 The sqlite3_value_type(V) interface returns
|
||||
** the datatype code for the initial datatype of the sqlite3_value object
|
||||
** V. The returned value is one of SQLITE_INTEGER, SQLITE_FLOAT,
|
||||
** SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL. */
|
||||
sqlite3_result_text(context, azType[i], -1, SQLITE_STATIC);
|
||||
}
|
||||
|
||||
|
||||
@@ -793,6 +793,8 @@ int sqlite3_db_config(sqlite3 *db, int op, ...){
|
||||
va_start(ap, op);
|
||||
switch( op ){
|
||||
case SQLITE_DBCONFIG_MAINDBNAME: {
|
||||
/* IMP: R-06824-28531 */
|
||||
/* IMP: R-36257-52125 */
|
||||
db->aDb[0].zDbSName = va_arg(ap,char*);
|
||||
rc = SQLITE_OK;
|
||||
break;
|
||||
|
||||
+3
-1
@@ -1528,6 +1528,7 @@ void sqlite3Pragma(
|
||||
|
||||
/* Make sure sufficient number of registers have been allocated */
|
||||
pParse->nMem = MAX( pParse->nMem, 8+mxIdx );
|
||||
sqlite3ClearTempRegCache(pParse);
|
||||
|
||||
/* Do the b-tree integrity checks */
|
||||
sqlite3VdbeAddOp4(v, OP_IntegrityCk, 2, cnt, 1, (char*)aRoot,P4_INTARRAY);
|
||||
@@ -1942,7 +1943,8 @@ void sqlite3Pragma(
|
||||
** 0x0008 (Not yet implemented) Create indexes that might have
|
||||
** been helpful to recent queries
|
||||
**
|
||||
** The default MASK is and always shall be 0xfffe. 0xfffe means perform all ** of the optimizations listed above except Debug Mode, including new
|
||||
** The default MASK is and always shall be 0xfffe. 0xfffe means perform all
|
||||
** of the optimizations listed above except Debug Mode, including new
|
||||
** optimizations that have not yet been invented. If new optimizations are
|
||||
** ever added that should be off by default, those off-by-default
|
||||
** optimizations will have bitmasks of 0x10000 or larger.
|
||||
|
||||
+14
-2
@@ -765,9 +765,14 @@ int sqlite3_prepare_v2(
|
||||
const char **pzTail /* OUT: End of parsed string */
|
||||
){
|
||||
int rc;
|
||||
/* EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works
|
||||
** exactly the same as sqlite3_prepare_v3() with a zero prepFlags
|
||||
** parameter.
|
||||
**
|
||||
** Proof in that the 5th parameter to sqlite3LockAndPrepare is 0 */
|
||||
rc = sqlite3LockAndPrepare(db,zSql,nBytes,SQLITE_PREPARE_SAVESQL,0,
|
||||
ppStmt,pzTail);
|
||||
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
|
||||
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );
|
||||
return rc;
|
||||
}
|
||||
int sqlite3_prepare_v3(
|
||||
@@ -779,10 +784,17 @@ int sqlite3_prepare_v3(
|
||||
const char **pzTail /* OUT: End of parsed string */
|
||||
){
|
||||
int rc;
|
||||
/* EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from
|
||||
** sqlite3_prepare_v2() only in having the extra prepFlags parameter,
|
||||
** which is a bit array consisting of zero or more of the
|
||||
** SQLITE_PREPARE_* flags.
|
||||
**
|
||||
** Proof by comparison to the implementation of sqlite3_prepare_v2()
|
||||
** directly above. */
|
||||
rc = sqlite3LockAndPrepare(db,zSql,nBytes,
|
||||
SQLITE_PREPARE_SAVESQL|(prepFlags&SQLITE_PREPARE_MASK),
|
||||
0,ppStmt,pzTail);
|
||||
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
|
||||
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -4266,7 +4266,6 @@ static char *readline_completion_generator(const char *text, int state){
|
||||
char *zRet;
|
||||
if( state==0 ){
|
||||
char *zSql;
|
||||
int rc;
|
||||
sqlite3_finalize(pStmt);
|
||||
zSql = sqlite3_mprintf("SELECT DISTINCT candidate COLLATE nocase"
|
||||
" FROM completion(%Q) ORDER BY 1", text);
|
||||
@@ -4274,7 +4273,7 @@ static char *readline_completion_generator(const char *text, int state){
|
||||
sqlite3_free(zSql);
|
||||
}
|
||||
if( sqlite3_step(pStmt)==SQLITE_ROW ){
|
||||
zRet = strdup(sqlite3_column_text(pStmt, 0));
|
||||
zRet = strdup((const char*)sqlite3_column_text(pStmt, 0));
|
||||
}else{
|
||||
sqlite3_finalize(pStmt);
|
||||
pStmt = 0;
|
||||
|
||||
+1
-2
@@ -2906,7 +2906,6 @@ static char *readline_completion_generator(const char *text, int state){
|
||||
char *zRet;
|
||||
if( state==0 ){
|
||||
char *zSql;
|
||||
int rc;
|
||||
sqlite3_finalize(pStmt);
|
||||
zSql = sqlite3_mprintf("SELECT DISTINCT candidate COLLATE nocase"
|
||||
" FROM completion(%Q) ORDER BY 1", text);
|
||||
@@ -2914,7 +2913,7 @@ static char *readline_completion_generator(const char *text, int state){
|
||||
sqlite3_free(zSql);
|
||||
}
|
||||
if( sqlite3_step(pStmt)==SQLITE_ROW ){
|
||||
zRet = strdup(sqlite3_column_text(pStmt, 0));
|
||||
zRet = strdup((const char*)sqlite3_column_text(pStmt, 0));
|
||||
}else{
|
||||
sqlite3_finalize(pStmt);
|
||||
pStmt = 0;
|
||||
|
||||
+42
-38
@@ -235,7 +235,7 @@ int sqlite3_threadsafe(void);
|
||||
** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
|
||||
** and [sqlite3_close_v2()] are its destructors. There are many other
|
||||
** interfaces (such as
|
||||
** [sqlite3_prepare_v3()], [sqlite3_create_function()], and
|
||||
** [sqlite3_prepare_v2()], [sqlite3_create_function()], and
|
||||
** [sqlite3_busy_timeout()] to name but three) that are methods on an
|
||||
** sqlite3 object.
|
||||
*/
|
||||
@@ -339,7 +339,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
|
||||
** METHOD: sqlite3
|
||||
**
|
||||
** The sqlite3_exec() interface is a convenience wrapper around
|
||||
** [sqlite3_prepare_v3()], [sqlite3_step()], and [sqlite3_finalize()],
|
||||
** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],
|
||||
** that allows an application to run multiple statements of SQL
|
||||
** without having to use a lot of C code.
|
||||
**
|
||||
@@ -2008,10 +2008,10 @@ struct sqlite3_mem_methods {
|
||||
** </dd>
|
||||
**
|
||||
** <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
|
||||
** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
|
||||
** the [query planner stability guarantee] (QPSG). When the QPSG is active,
|
||||
** a single SQL query statement will always use the same algorithm regardless
|
||||
** of values of [bound parameters]. The QPSG disables some query optimizations
|
||||
** of values of [bound parameters].)^ The QPSG disables some query optimizations
|
||||
** that look at the values of bound parameters, which can make some queries
|
||||
** slower. But the QPSG has the advantage of more predictable behavior. With
|
||||
** the QPSG active, SQLite will always use the same query plan in the field as
|
||||
@@ -2701,12 +2701,12 @@ void sqlite3_randomness(int N, void *P);
|
||||
** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be
|
||||
** rejected with an error. ^If the authorizer callback returns
|
||||
** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]
|
||||
** then the [sqlite3_prepare_v3()] or equivalent call that triggered
|
||||
** then the [sqlite3_prepare_v2()] or equivalent call that triggered
|
||||
** the authorizer will fail with an error message.
|
||||
**
|
||||
** When the callback returns [SQLITE_OK], that means the operation
|
||||
** requested is ok. ^When the callback returns [SQLITE_DENY], the
|
||||
** [sqlite3_prepare_v3()] or equivalent call that triggered the
|
||||
** [sqlite3_prepare_v2()] or equivalent call that triggered the
|
||||
** authorizer will fail with an error message explaining that
|
||||
** access is denied.
|
||||
**
|
||||
@@ -2757,10 +2757,10 @@ void sqlite3_randomness(int N, void *P);
|
||||
**
|
||||
** The authorizer callback must not do anything that will modify
|
||||
** the database connection that invoked the authorizer callback.
|
||||
** Note that [sqlite3_prepare_v3()] and [sqlite3_step()] both modify their
|
||||
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
|
||||
** database connections for the meaning of "modify" in this paragraph.
|
||||
**
|
||||
** ^When [sqlite3_prepare_v3()] is used to prepare a statement, the
|
||||
** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the
|
||||
** statement might be re-prepared during [sqlite3_step()] due to a
|
||||
** schema change. Hence, the application should ensure that the
|
||||
** correct authorizer callback remains in place during the [sqlite3_step()].
|
||||
@@ -2769,7 +2769,7 @@ void sqlite3_randomness(int N, void *P);
|
||||
** [sqlite3_prepare()] or its variants. Authorization is not
|
||||
** performed during statement evaluation in [sqlite3_step()], unless
|
||||
** as stated in the previous paragraph, sqlite3_step() invokes
|
||||
** sqlite3_prepare_v3() to reprepare a statement after a schema change.
|
||||
** sqlite3_prepare_v2() to reprepare a statement after a schema change.
|
||||
*/
|
||||
int sqlite3_set_authorizer(
|
||||
sqlite3*,
|
||||
@@ -3005,7 +3005,7 @@ int sqlite3_trace_v2(
|
||||
**
|
||||
** The progress handler callback must not do anything that will modify
|
||||
** the database connection that invoked the progress handler.
|
||||
** Note that [sqlite3_prepare_v3()] and [sqlite3_step()] both modify their
|
||||
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
|
||||
** database connections for the meaning of "modify" in this paragraph.
|
||||
**
|
||||
*/
|
||||
@@ -3359,7 +3359,7 @@ const char *sqlite3_errstr(int);
|
||||
** The life-cycle of a prepared statement object usually goes like this:
|
||||
**
|
||||
** <ol>
|
||||
** <li> Create the prepared statement object using [sqlite3_prepare_v3()].
|
||||
** <li> Create the prepared statement object using [sqlite3_prepare_v2()].
|
||||
** <li> Bind values to [parameters] using the sqlite3_bind_*()
|
||||
** interfaces.
|
||||
** <li> Run the SQL by calling [sqlite3_step()] one or more times.
|
||||
@@ -3441,7 +3441,7 @@ int sqlite3_limit(sqlite3*, int id, int newVal);
|
||||
**
|
||||
** [[SQLITE_LIMIT_VDBE_OP]] ^(<dt>SQLITE_LIMIT_VDBE_OP</dt>
|
||||
** <dd>The maximum number of instructions in a virtual machine program
|
||||
** used to implement an SQL statement. If [sqlite3_prepare_v3()] or
|
||||
** used to implement an SQL statement. If [sqlite3_prepare_v2()] or
|
||||
** the equivalent tries to allocate space for more than this many opcodes
|
||||
** in a single prepared statement, an SQLITE_NOMEM error is returned.</dd>)^
|
||||
**
|
||||
@@ -3492,13 +3492,15 @@ int sqlite3_limit(sqlite3*, int id, int newVal);
|
||||
**
|
||||
** <dl>
|
||||
** [[SQLITE_PREPARE_PERSISTENT]] ^(<dt>SQLITE_PREPARE_PERSISTENT</dt>
|
||||
** <dd>The SQLITE_PREPARE_PERSISTENT flag causes [sqlite3_prepare_v3()]
|
||||
** and [sqlite3_prepare16_v3()]
|
||||
** to optimize the resulting prepared statement to be retained for a
|
||||
** relatively long amount of time.)^ ^Without this flag,
|
||||
** [sqlite3_prepare_v3()] and [sqlite3_prepare16_v3()] assume that
|
||||
** the prepared statement will be used just once or at most a few times
|
||||
** and then destroyed using [sqlite3_finalize()] relatively soon.
|
||||
** <dd>The SQLITE_PREPARE_PERSISTENT flag is a hint to the query planner
|
||||
** that the prepared statement will be retained for a long time and
|
||||
** probably reused many times.)^ ^Without this flag, [sqlite3_prepare_v3()]
|
||||
** and [sqlite3_prepare16_v3()] assume that the prepared statement will
|
||||
** be used just once or at most a few times and then destroyed using
|
||||
** [sqlite3_finalize()] relatively soon. The current implementation acts
|
||||
** on this hint by avoiding the use of [lookaside memory] so as not to
|
||||
** deplete the limited store of lookaside memory. Future versions of
|
||||
** SQLite may act on this hint differently.
|
||||
** </dl>
|
||||
*/
|
||||
#define SQLITE_PREPARE_PERSISTENT 0x01
|
||||
@@ -3801,7 +3803,7 @@ typedef struct sqlite3_context sqlite3_context;
|
||||
** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}
|
||||
** METHOD: sqlite3_stmt
|
||||
**
|
||||
** ^(In the SQL statement text input to [sqlite3_prepare_v3()] and its variants,
|
||||
** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
|
||||
** literals may be replaced by a [parameter] that matches one of following
|
||||
** templates:
|
||||
**
|
||||
@@ -3820,7 +3822,7 @@ typedef struct sqlite3_context sqlite3_context;
|
||||
**
|
||||
** ^The first argument to the sqlite3_bind_*() routines is always
|
||||
** a pointer to the [sqlite3_stmt] object returned from
|
||||
** [sqlite3_prepare_v3()] or its variants.
|
||||
** [sqlite3_prepare_v2()] or its variants.
|
||||
**
|
||||
** ^The second argument is the index of the SQL parameter to be set.
|
||||
** ^The leftmost SQL parameter has an index of 1. ^When the same named
|
||||
@@ -3881,9 +3883,9 @@ typedef struct sqlite3_context sqlite3_context;
|
||||
** [sqlite3_blob_open | incremental BLOB I/O] routines.
|
||||
** ^A negative value for the zeroblob results in a zero-length BLOB.
|
||||
**
|
||||
** ^The sqlite3_bind_pointer(S,I,P) routine causes the I-th parameter in
|
||||
** ^The sqlite3_bind_pointer(S,I,P,T) routine causes the I-th parameter in
|
||||
** [prepared statement] S to have an SQL value of NULL, but to also be
|
||||
** associated with the pointer P.
|
||||
** associated with the pointer P of type T.
|
||||
** ^The sqlite3_bind_pointer() routine can be used to pass
|
||||
** host-language pointers into [application-defined SQL functions].
|
||||
** ^A parameter that is initialized using [sqlite3_bind_pointer()] appears
|
||||
@@ -3923,7 +3925,7 @@ int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
|
||||
int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
|
||||
void(*)(void*), unsigned char encoding);
|
||||
int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
|
||||
int sqlite3_bind_pointer(sqlite3_stmt*, int, void*);
|
||||
int sqlite3_bind_pointer(sqlite3_stmt*, int, void*, const char*);
|
||||
int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
|
||||
int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
|
||||
|
||||
@@ -4303,7 +4305,7 @@ int sqlite3_data_count(sqlite3_stmt *pStmt);
|
||||
** ^These routines return information about a single column of the current
|
||||
** result row of a query. ^In every case the first argument is a pointer
|
||||
** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
|
||||
** that was returned from [sqlite3_prepare_v3()] or one of its variants)
|
||||
** that was returned from [sqlite3_prepare_v2()] or one of its variants)
|
||||
** and the second argument is the index of the column for which information
|
||||
** should be returned. ^The leftmost column of the result set has the index 0.
|
||||
** ^The number of columns in the result can be determined using
|
||||
@@ -4717,6 +4719,7 @@ SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
|
||||
** <tr><td><b>sqlite3_value_double</b><td>→<td>REAL value
|
||||
** <tr><td><b>sqlite3_value_int</b><td>→<td>32-bit INTEGER value
|
||||
** <tr><td><b>sqlite3_value_int64</b><td>→<td>64-bit INTEGER value
|
||||
** <tr><td><b>sqlite3_value_pointer</b><td>→<td>Pointer value
|
||||
** <tr><td><b>sqlite3_value_text</b><td>→<td>UTF-8 TEXT value
|
||||
** <tr><td><b>sqlite3_value_text16</b><td>→<td>UTF-16 TEXT value in
|
||||
** the native byteorder
|
||||
@@ -4736,7 +4739,7 @@ SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
|
||||
**
|
||||
** <b>Details:</b>
|
||||
**
|
||||
** This routine extract type, size, and content information from
|
||||
** These routines extract type, size, and content information from
|
||||
** [protected sqlite3_value] objects. Protected sqlite3_value objects
|
||||
** are used to pass parameter information into implementation of
|
||||
** [application-defined SQL functions] and [virtual tables].
|
||||
@@ -4755,9 +4758,10 @@ SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
|
||||
** extract UTF-16 strings as big-endian and little-endian respectively.
|
||||
**
|
||||
** ^If [sqlite3_value] object V was initialized
|
||||
** using [sqlite3_bind_pointer(S,I,P)] or [sqlite3_result_pointer(C,P)], then
|
||||
** sqlite3_value_pointer(V) will return the pointer P. Otherwise,
|
||||
** sqlite3_value_pointer(V) returns a NULL.
|
||||
** using [sqlite3_bind_pointer(S,I,P,X)] or [sqlite3_result_pointer(C,P,X)]
|
||||
** and if X and Y are strings that compare equal according to strcmp(X,Y),
|
||||
** then sqlite3_value_pointer(V,Y) will return the pointer P. ^Otherwise,
|
||||
** sqlite3_value_pointer(V,Y) returns a NULL.
|
||||
**
|
||||
** ^(The sqlite3_value_type(V) interface returns the
|
||||
** [SQLITE_INTEGER | datatype code] for the initial datatype of the
|
||||
@@ -4791,11 +4795,11 @@ const void *sqlite3_value_blob(sqlite3_value*);
|
||||
double sqlite3_value_double(sqlite3_value*);
|
||||
int sqlite3_value_int(sqlite3_value*);
|
||||
sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
|
||||
void *sqlite3_value_pointer(sqlite3_value*, const char*);
|
||||
const unsigned char *sqlite3_value_text(sqlite3_value*);
|
||||
const void *sqlite3_value_text16(sqlite3_value*);
|
||||
const void *sqlite3_value_text16le(sqlite3_value*);
|
||||
const void *sqlite3_value_text16be(sqlite3_value*);
|
||||
void *sqlite3_value_pointer(sqlite3_value*);
|
||||
int sqlite3_value_bytes(sqlite3_value*);
|
||||
int sqlite3_value_bytes16(sqlite3_value*);
|
||||
int sqlite3_value_type(sqlite3_value*);
|
||||
@@ -5079,7 +5083,7 @@ typedef void (*sqlite3_destructor_type)(void*);
|
||||
** when it has finished using that result.
|
||||
** ^If the 4th parameter to the sqlite3_result_text* interfaces
|
||||
** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
|
||||
** then SQLite makes a copy of the result into space obtained from
|
||||
** then SQLite makes a copy of the result into space obtained
|
||||
** from [sqlite3_malloc()] before it returns.
|
||||
**
|
||||
** ^The sqlite3_result_value() interface sets the result of
|
||||
@@ -5092,10 +5096,10 @@ typedef void (*sqlite3_destructor_type)(void*);
|
||||
** [unprotected sqlite3_value] object is required, so either
|
||||
** kind of [sqlite3_value] object can be used with this interface.
|
||||
**
|
||||
** ^The sqlite3_result_pointer(C,P) interface sets the result to an
|
||||
** ^The sqlite3_result_pointer(C,P,T) interface sets the result to an
|
||||
** SQL NULL value, just like [sqlite3_result_null(C)], except that it
|
||||
** also associates the host-language pointer P with that NULL value such
|
||||
** that the pointer can be retrieved within an
|
||||
** also associates the host-language pointer P or type T with that
|
||||
** NULL value such that the pointer can be retrieved within an
|
||||
** [application-defined SQL function] using [sqlite3_value_pointer()].
|
||||
** This mechanism can be used to pass non-SQL values between
|
||||
** application-defined functions.
|
||||
@@ -5123,7 +5127,7 @@ void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
|
||||
void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
|
||||
void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
|
||||
void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
|
||||
void sqlite3_result_pointer(sqlite3_context*, void*);
|
||||
void sqlite3_result_pointer(sqlite3_context*, void*, const char*);
|
||||
void sqlite3_result_zeroblob(sqlite3_context*, int n);
|
||||
int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
|
||||
|
||||
@@ -5484,7 +5488,7 @@ int sqlite3_get_autocommit(sqlite3*);
|
||||
** to which a [prepared statement] belongs. ^The [database connection]
|
||||
** returned by sqlite3_db_handle is the same [database connection]
|
||||
** that was the first argument
|
||||
** to the [sqlite3_prepare_v3()] call (or its variants) that was used to
|
||||
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
|
||||
** create the statement in the first place.
|
||||
*/
|
||||
sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
||||
@@ -5560,7 +5564,7 @@ sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
|
||||
** completion of the [sqlite3_step()] call that triggered the commit
|
||||
** or rollback hook in the first place.
|
||||
** Note that running any other SQL statements, including SELECT statements,
|
||||
** or merely calling [sqlite3_prepare_v3()] and [sqlite3_step()] will modify
|
||||
** or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify
|
||||
** the database connections for the meaning of "modify" in this paragraph.
|
||||
**
|
||||
** ^Registering a NULL function disables the callback.
|
||||
@@ -5620,7 +5624,7 @@ void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
|
||||
** the database connection that invoked the update hook. Any actions
|
||||
** to modify the database connection must be deferred until after the
|
||||
** completion of the [sqlite3_step()] call that triggered the update hook.
|
||||
** Note that [sqlite3_prepare_v3()] and [sqlite3_step()] both modify their
|
||||
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
|
||||
** database connections for the meaning of "modify" in this paragraph.
|
||||
**
|
||||
** ^The sqlite3_update_hook(D,C,P) function
|
||||
|
||||
+3
-3
@@ -289,9 +289,9 @@ struct sqlite3_api_routines {
|
||||
sqlite3_stmt**,const char**);
|
||||
int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int,
|
||||
sqlite3_stmt**,const void**);
|
||||
int (*bind_pointer)(sqlite3_stmt*,int,void*);
|
||||
void (*result_pointer)(sqlite3_context*,void*);
|
||||
void *(*value_pointer)(sqlite3_value*);
|
||||
int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*);
|
||||
void (*result_pointer)(sqlite3_context*,void*,const char*);
|
||||
void *(*value_pointer)(sqlite3_value*,const char*);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -476,7 +476,7 @@ void sqlite3VdbeMemSetInt64(Mem*, i64);
|
||||
#else
|
||||
void sqlite3VdbeMemSetDouble(Mem*, double);
|
||||
#endif
|
||||
void sqlite3VdbeMemSetPointer(Mem*, void*);
|
||||
void sqlite3VdbeMemSetPointer(Mem*, void*, const char*);
|
||||
void sqlite3VdbeMemInit(Mem*,sqlite3*,u16);
|
||||
void sqlite3VdbeMemSetNull(Mem*);
|
||||
void sqlite3VdbeMemSetZeroBlob(Mem*,int);
|
||||
|
||||
+10
-6
@@ -199,9 +199,13 @@ unsigned int sqlite3_value_subtype(sqlite3_value *pVal){
|
||||
Mem *pMem = (Mem*)pVal;
|
||||
return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0);
|
||||
}
|
||||
void *sqlite3_value_pointer(sqlite3_value *pVal){
|
||||
void *sqlite3_value_pointer(sqlite3_value *pVal, const char *zPType){
|
||||
Mem *p = (Mem*)pVal;
|
||||
if( (p->flags & MEM_TypeMask)==(MEM_Null|MEM_Subtype) && p->eSubtype=='p' ){
|
||||
if( p->flags==(MEM_Null|MEM_Subtype|MEM_Term|MEM_Static)
|
||||
&& p->eSubtype=='p'
|
||||
&& zPType!=0
|
||||
&& strcmp(p->z, zPType)==0
|
||||
){
|
||||
return p->u.pPtr;
|
||||
}else{
|
||||
return 0;
|
||||
@@ -385,11 +389,11 @@ void sqlite3_result_null(sqlite3_context *pCtx){
|
||||
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
||||
sqlite3VdbeMemSetNull(pCtx->pOut);
|
||||
}
|
||||
void sqlite3_result_pointer(sqlite3_context *pCtx, void *pPtr){
|
||||
void sqlite3_result_pointer(sqlite3_context *pCtx, void *pPtr, const char *zPT){
|
||||
Mem *pOut = pCtx->pOut;
|
||||
assert( sqlite3_mutex_held(pOut->db->mutex) );
|
||||
sqlite3VdbeMemSetNull(pOut);
|
||||
sqlite3VdbeMemSetPointer(pOut, pPtr);
|
||||
sqlite3VdbeMemSetPointer(pOut, pPtr, zPT);
|
||||
}
|
||||
void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
|
||||
Mem *pOut = pCtx->pOut;
|
||||
@@ -1394,12 +1398,12 @@ int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
int sqlite3_bind_pointer(sqlite3_stmt *pStmt, int i, void *pPtr){
|
||||
int sqlite3_bind_pointer(sqlite3_stmt *pStmt, int i, void *pPtr,const char *zT){
|
||||
int rc;
|
||||
Vdbe *p = (Vdbe*)pStmt;
|
||||
rc = vdbeUnbind(p, i);
|
||||
if( rc==SQLITE_OK ){
|
||||
sqlite3VdbeMemSetPointer(&p->aVar[i-1], pPtr);
|
||||
sqlite3VdbeMemSetPointer(&p->aVar[i-1], pPtr, zT);
|
||||
sqlite3_mutex_leave(p->db->mutex);
|
||||
}
|
||||
return rc;
|
||||
|
||||
+7
-4
@@ -709,11 +709,14 @@ void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){
|
||||
** Set the value stored in *pMem should already be a NULL.
|
||||
** Also store a pointer to go with it.
|
||||
*/
|
||||
void sqlite3VdbeMemSetPointer(Mem *pMem, void *pPtr){
|
||||
void sqlite3VdbeMemSetPointer(Mem *pMem, void *pPtr, const char *zPType){
|
||||
assert( pMem->flags==MEM_Null );
|
||||
pMem->flags = MEM_Null|MEM_Subtype;
|
||||
pMem->u.pPtr = pPtr;
|
||||
pMem->eSubtype = 'p';
|
||||
if( zPType ){
|
||||
pMem->flags = MEM_Null|MEM_Subtype|MEM_Term|MEM_Static;
|
||||
pMem->u.pPtr = pPtr;
|
||||
pMem->eSubtype = 'p';
|
||||
pMem->z = (char*)zPType;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_FLOATING_POINT
|
||||
|
||||
@@ -870,5 +870,21 @@ do_execsql_test attach-11.1 {
|
||||
SELECT * FROM aux1.t1;
|
||||
} {1 2 3 4}
|
||||
|
||||
# Ticket https://sqlite.org/src/tktview/a4e06e75a9ab61a1 2017-07-15
|
||||
# False positive when running integrity_check on a connection with
|
||||
# attached databases.
|
||||
#
|
||||
db close
|
||||
sqlite3 db :memory:
|
||||
do_execsql_test attach-12.1 {
|
||||
CREATE TABLE Table1 (col TEXT NOT NULL PRIMARY KEY);
|
||||
ATTACH ':memory:' AS db2;
|
||||
CREATE TABLE db2.Table2(col1 INTEGER, col2 INTEGER, col3 INTEGER, col4);
|
||||
CREATE UNIQUE INDEX db2.idx_col1_unique ON Table2 (col1);
|
||||
CREATE UNIQUE INDEX db2.idx_col23_unique ON Table2 (col2, col3);
|
||||
CREATE INDEX db2.idx_col2 ON Table2 (col2);
|
||||
INSERT INTO Table2 VALUES(1,2,3,4);
|
||||
PRAGMA integrity_check;
|
||||
} {ok}
|
||||
|
||||
finish_test
|
||||
|
||||
+3
-2
@@ -254,13 +254,14 @@ foreach {tn a b} {
|
||||
#-------------------------------------------------------------------------
|
||||
# Test the % operator.
|
||||
#
|
||||
# EVIDENCE-OF: R-08914-63790 The operator % outputs the value of its
|
||||
# left operand modulo its right operand.
|
||||
# EVIDENCE-OF: R-04223-04352 The operator % outputs the integer value of
|
||||
# its left operand modulo its right operand.
|
||||
#
|
||||
do_execsql_test e_expr-6.1 {SELECT 72%5} {2}
|
||||
do_execsql_test e_expr-6.2 {SELECT 72%-5} {2}
|
||||
do_execsql_test e_expr-6.3 {SELECT -72%-5} {-2}
|
||||
do_execsql_test e_expr-6.4 {SELECT -72%5} {-2}
|
||||
do_execsql_test e_expr-6.5 {SELECT 72.35%5} {2.0}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Test that the results of all binary operators are either numeric or
|
||||
|
||||
+9
-9
@@ -729,15 +729,15 @@ do_test e_fkey-19.5 {
|
||||
# foreign key DML errors is usually "foreign key mismatch" but can also
|
||||
# be "no such table" if the parent table does not exist.
|
||||
#
|
||||
# EVIDENCE-OF: R-60781-26576 Foreign key DML errors are may be reported
|
||||
# if: The parent table does not exist, or The parent key columns named
|
||||
# in the foreign key constraint do not exist, or The parent key columns
|
||||
# named in the foreign key constraint are not the primary key of the
|
||||
# parent table and are not subject to a unique constraint using
|
||||
# collating sequence specified in the CREATE TABLE, or The child table
|
||||
# references the primary key of the parent without specifying the
|
||||
# primary key columns and the number of primary key columns in the
|
||||
# parent do not match the number of child key columns.
|
||||
# EVIDENCE-OF: R-35763-48267 Foreign key DML errors are reported if: The
|
||||
# parent table does not exist, or The parent key columns named in the
|
||||
# foreign key constraint do not exist, or The parent key columns named
|
||||
# in the foreign key constraint are not the primary key of the parent
|
||||
# table and are not subject to a unique constraint using collating
|
||||
# sequence specified in the CREATE TABLE, or The child table references
|
||||
# the primary key of the parent without specifying the primary key
|
||||
# columns and the number of primary key columns in the parent do not
|
||||
# match the number of child key columns.
|
||||
#
|
||||
do_test e_fkey-20.1 {
|
||||
execsql {
|
||||
|
||||
+4
-3
@@ -348,9 +348,10 @@ do_insert_tests e_insert-3.2 {
|
||||
6.2 "SELECT * FROM a1" {{} {} {} {}}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-03235-45250 The "REPLACE" and "INSERT OR action" forms
|
||||
# specify an alternative constraint conflict resolution algorithm to use
|
||||
# during this one INSERT command.
|
||||
# EVIDENCE-OF: R-00267-47727 The initial "INSERT" keyword can be
|
||||
# replaced by "REPLACE" or "INSERT OR action" to specify an alternative
|
||||
# constraint conflict resolution algorithm to use during that one INSERT
|
||||
# command.
|
||||
#
|
||||
# EVIDENCE-OF: R-23110-47146 the parser allows the use of the single
|
||||
# keyword REPLACE as an alias for "INSERT OR REPLACE".
|
||||
|
||||
+17
-11
@@ -213,17 +213,23 @@ do_test like-3.3.101 {
|
||||
|
||||
# The like optimization works even when the pattern is a bound parameter
|
||||
#
|
||||
do_test like-3.3.102 {
|
||||
set sqlite_like_count 0
|
||||
unset -nocomplain ::likepat
|
||||
set ::likepat abc%
|
||||
queryplan {
|
||||
SELECT x FROM t1 WHERE x LIKE $::likepat ORDER BY 1;
|
||||
}
|
||||
} {abc abcd nosort {} i1}
|
||||
do_test like-3.3.103 {
|
||||
set sqlite_like_count
|
||||
} 0
|
||||
# Exception: It does not work if sqlite3_prepare() is used instead of
|
||||
# sqlite3_prepare_v2(), as in that case the statement cannot be reprepared
|
||||
# after the parameter is bound.
|
||||
#
|
||||
unset -nocomplain ::likepat
|
||||
set ::likepat abc%
|
||||
if {[permutation]!="prepare"} {
|
||||
do_test like-3.3.102 {
|
||||
set sqlite_like_count 0
|
||||
queryplan {
|
||||
SELECT x FROM t1 WHERE x LIKE $::likepat ORDER BY 1;
|
||||
}
|
||||
} {abc abcd nosort {} i1}
|
||||
do_test like-3.3.103 {
|
||||
set sqlite_like_count
|
||||
} 0
|
||||
}
|
||||
|
||||
# Except, the like optimization does not work for bound parameters if
|
||||
# the query planner stability guarantee is active.
|
||||
|
||||
@@ -89,7 +89,8 @@ foreach f [glob $testdir/*.test] { lappend alltests [file tail $f] }
|
||||
foreach f [glob -nocomplain \
|
||||
$testdir/../ext/rtree/*.test \
|
||||
$testdir/../ext/fts5/test/*.test \
|
||||
] {
|
||||
$testdir/../ext/lsm1/test/*.test \
|
||||
] {
|
||||
lappend alltests $f
|
||||
}
|
||||
foreach f [glob -nocomplain $testdir/../ext/session/*.test] {
|
||||
@@ -281,6 +282,10 @@ test_suite "fts5-light" -prefix "" -description {
|
||||
-exclude *corrupt* *fault* *big* *fts5aj*
|
||||
]
|
||||
|
||||
test_suite "lsm1" -prefix "" -description {
|
||||
All LSM1 tests.
|
||||
} -files [glob -nocomplain $::testdir/../ext/lsm1/test/*.test]
|
||||
|
||||
test_suite "nofaultsim" -prefix "" -description {
|
||||
"Very" quick test suite. Runs in less than 5 minutes on a workstation.
|
||||
This test suite is the same as the "quick" tests, except that some files
|
||||
@@ -1043,7 +1048,8 @@ test_suite "prepare" -description {
|
||||
db_use_legacy_prepare $::dbhandle 1
|
||||
#$::dbhandle cache size 0
|
||||
} -files [
|
||||
test_set $allquicktests -exclude *malloc* *ioerr* *fault*
|
||||
test_set $allquicktests -exclude *malloc* *ioerr* *fault* \
|
||||
stmtvtab1.test index9.test
|
||||
]
|
||||
|
||||
# End of tests
|
||||
|
||||
+2
-1
@@ -188,7 +188,8 @@ do_test shell5-1.4.10.2 {
|
||||
#
|
||||
do_test shell5-1.4.11 {
|
||||
set in [open shell5.csv wb]
|
||||
puts $in "\xef\xbb\xbf2|3"
|
||||
puts -nonewline $in "\xef\xbb\xbf"
|
||||
puts $in "2|3"
|
||||
puts $in "4|5"
|
||||
close $in
|
||||
set res [catchcmd "test.db" {CREATE TABLE t2(x INT, y INT);
|
||||
|
||||
+10
-9
@@ -23,6 +23,7 @@ ifcapable !stmtvtab {
|
||||
return
|
||||
}
|
||||
|
||||
db cache flush
|
||||
db cache size 20
|
||||
unset -nocomplain x y z
|
||||
set x giraffe
|
||||
@@ -32,21 +33,21 @@ do_execsql_test stmtvtab1-100 {
|
||||
CREATE TABLE t1(a,b,c);
|
||||
INSERT INTO t1 VALUES($a,$b,$c);
|
||||
CREATE INDEX t1a ON t1(a);
|
||||
SELECT run, sql FROM stmt ORDER BY 1;
|
||||
} {1 {SELECT run, sql FROM stmt ORDER BY 1;} 1 {CREATE INDEX t1a ON t1(a);} 1 {INSERT INTO t1 VALUES($a,$b,$c);} 1 {CREATE TABLE t1(a,b,c);}}
|
||||
SELECT run, sql FROM sqlite_stmt ORDER BY 1;
|
||||
} {1 {SELECT run, sql FROM sqlite_stmt ORDER BY 1;} 1 {CREATE INDEX t1a ON t1(a);} 1 {INSERT INTO t1 VALUES($a,$b,$c);} 1 {CREATE TABLE t1(a,b,c);}}
|
||||
set x neon
|
||||
set y event
|
||||
set z future
|
||||
do_execsql_test stmtvtab1-110 {
|
||||
INSERT INTO t1 VALUES($a,$b,$c);
|
||||
SELECT reprep,run,SQL FROM stmt WHERE sql LIKE '%INSERT%' AND NOT busy;
|
||||
SELECT reprep,run,SQL FROM sqlite_stmt WHERE sql LIKE '%INSERT%' AND NOT busy;
|
||||
} {1 2 {INSERT INTO t1 VALUES($a,$b,$c);}}
|
||||
set x network
|
||||
set y fit
|
||||
set z metal
|
||||
do_execsql_test stmtvtab1-120 {
|
||||
INSERT INTO t1 VALUES($a,$b,$c);
|
||||
SELECT reprep,run,SQL FROM stmt WHERE sql LIKE '%INSERT%' AND NOT busy;
|
||||
SELECT reprep,run,SQL FROM sqlite_stmt WHERE sql LIKE '%INSERT%' AND NOT busy;
|
||||
} {1 3 {INSERT INTO t1 VALUES($a,$b,$c);}}
|
||||
set x history
|
||||
set y detail
|
||||
@@ -54,26 +55,26 @@ set z grace
|
||||
do_execsql_test stmtvtab1-130 {
|
||||
CREATE INDEX t1b ON t1(b);
|
||||
INSERT INTO t1 VALUES($a,$b,$c);
|
||||
SELECT reprep,run,SQL FROM stmt WHERE sql LIKE '%INSERT%' AND NOT busy;
|
||||
SELECT reprep,run,SQL FROM sqlite_stmt WHERE sql LIKE '%INSERT%' AND NOT busy;
|
||||
} {2 4 {INSERT INTO t1 VALUES($a,$b,$c);}}
|
||||
|
||||
# All statements are still in cache
|
||||
#
|
||||
do_execsql_test stmtvtab1-140 {
|
||||
SELECT count(*) FROM stmt WHERE NOT busy;
|
||||
SELECT count(*) FROM sqlite_stmt WHERE NOT busy;
|
||||
} {6}
|
||||
|
||||
# None of the prepared statements should use more than a couple thousand
|
||||
# bytes of memory
|
||||
#
|
||||
#db eval {SELECT mem, sql FROM stmt} {puts [format {%5d %s} $mem $sql]}
|
||||
#db eval {SELECT mem, sql FROM sqlite_stmt} {puts [format {%5d %s} $mem $sql]}
|
||||
do_execsql_test stmtvtab1-150 {
|
||||
SELECT count(*) FROM stmt WHERE mem>5000;
|
||||
SELECT count(*) FROM sqlite_stmt WHERE mem>5000;
|
||||
} {0}
|
||||
|
||||
# Flushing the cache clears all of the prepared statements.
|
||||
#
|
||||
db cache flush
|
||||
do_execsql_test stmtvtab1-160 {
|
||||
SELECT * FROM stmt WHERE NOT busy;
|
||||
SELECT * FROM sqlite_stmt WHERE NOT busy;
|
||||
} {}
|
||||
|
||||
+17
-9
@@ -192,11 +192,13 @@ for {set i 0} {$i<$nOp} {incr i} {
|
||||
set def($cnt) $name
|
||||
}
|
||||
}
|
||||
set max $cnt
|
||||
for {set i 0} {$i<$nOp} {incr i} {
|
||||
|
||||
set max [lindex [lsort -decr -integer [array names used]] 0]
|
||||
for {set i 0} {$i<=$max} {incr i} {
|
||||
if {![info exists used($i)]} {
|
||||
set def($i) "OP_NotUsed_$i"
|
||||
}
|
||||
if {$i>$max} {set max $i}
|
||||
set name $def($i)
|
||||
puts -nonewline [format {#define %-16s %3d} $name $i]
|
||||
set com {}
|
||||
@@ -217,18 +219,24 @@ for {set i 0} {$i<$nOp} {incr i} {
|
||||
puts ""
|
||||
}
|
||||
|
||||
if {$max>255} {
|
||||
error "More than 255 opcodes - VdbeOp.opcode is of type u8!"
|
||||
}
|
||||
|
||||
# Generate the bitvectors:
|
||||
#
|
||||
set bv(0) 0
|
||||
for {set i 0} {$i<=$max} {incr i} {
|
||||
set name $def($i)
|
||||
set x 0
|
||||
if {$jump($name)} {incr x 1}
|
||||
if {$in1($name)} {incr x 2}
|
||||
if {$in2($name)} {incr x 4}
|
||||
if {$in3($name)} {incr x 8}
|
||||
if {$out2($name)} {incr x 16}
|
||||
if {$out3($name)} {incr x 32}
|
||||
set name $def($i)
|
||||
if {[string match OP_NotUsed* $name]==0} {
|
||||
if {$jump($name)} {incr x 1}
|
||||
if {$in1($name)} {incr x 2}
|
||||
if {$in2($name)} {incr x 4}
|
||||
if {$in3($name)} {incr x 8}
|
||||
if {$out2($name)} {incr x 16}
|
||||
if {$out3($name)} {incr x 32}
|
||||
}
|
||||
set bv($i) $x
|
||||
}
|
||||
puts ""
|
||||
|
||||
+4
-1
@@ -118,8 +118,11 @@ int main(int argc, char **argv){
|
||||
}
|
||||
if( iVal==7 ){
|
||||
double r;
|
||||
char *z;
|
||||
memcpy(&r, &v, sizeof(r));
|
||||
printf("%s%#g", zSep, r);
|
||||
z = sqlite3_mprintf("%s%!.15g", zSep, r);
|
||||
printf("%s", z);
|
||||
sqlite3_free(z);
|
||||
}else{
|
||||
printf("%s%lld", zSep, v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user