From: drh Date: Thu, 29 Jun 2017 14:33:51 +0000 (+0000) Subject: Rename the "stmts" virtual table to just "stmt" without the final "s". X-Git-Tag: version-3.20.0~161 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6603af755324118913836cad2e202c725b69ee8;p=thirdparty%2Fsqlite.git Rename the "stmts" virtual table to just "stmt" without the final "s". FossilOrigin-Name: adfdb80105c46ac42b71132c80a91dbd5b1c9ff241fb4fbb5d04641a88898d90 --- diff --git a/Makefile.in b/Makefile.in index 4a5c8b21c8..2f3312c716 100644 --- a/Makefile.in +++ b/Makefile.in @@ -181,7 +181,7 @@ LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \ notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \ pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \ random.lo resolve.lo rowset.lo rtree.lo \ - sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmts.lo \ + sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \ table.lo threads.lo tokenize.lo treeview.lo trigger.lo \ update.lo util.lo vacuum.lo \ vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \ @@ -351,7 +351,7 @@ SRC += \ $(TOP)/ext/rbu/sqlite3rbu.c SRC += \ $(TOP)/ext/misc/json1.c \ - $(TOP)/ext/misc/stmts.c + $(TOP)/ext/misc/stmt.c # Generated source code files # @@ -565,7 +565,7 @@ SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 # SHELL_OPT += -DSQLITE_ENABLE_FTS5 SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -SHELL_OPT += -DSQLITE_ENABLE_STMTSVTAB +SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ FUZZCHECK_OPT += -DSQLITE_MAX_MEMORY=50000000 @@ -1036,8 +1036,8 @@ sqlite3session.lo: $(TOP)/ext/session/sqlite3session.c $(HDR) $(EXTHDR) json1.lo: $(TOP)/ext/misc/json1.c $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c -stmts.lo: $(TOP)/ext/misc/stmts.c - $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/misc/stmts.c +stmt.lo: $(TOP)/ext/misc/stmt.c + $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/misc/stmt.c # FTS5 things # @@ -1088,7 +1088,7 @@ TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE TESTFIXTURE_FLAGS += -DBUILD_sqlite TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024 -TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_STMTSVTAB +TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_STMTVTAB TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la TESTFIXTURE_SRC1 = sqlite3.c diff --git a/Makefile.msc b/Makefile.msc index a50eac02a6..9026c38dea 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1295,7 +1295,7 @@ SRC07 = \ $(TOP)\ext\session\sqlite3session.c \ $(TOP)\ext\rbu\sqlite3rbu.c \ $(TOP)\ext\misc\json1.c \ - $(TOP)\ext\misc\stmts.c + $(TOP)\ext\misc\stmt.c # Extension header files, part 1. # @@ -1506,7 +1506,7 @@ FUZZDATA = \ # when the shell is not being dynamically linked. # !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0 -SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTSVTAB +SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB !ENDIF # <> @@ -2090,7 +2090,7 @@ TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN) TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024 -TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTSVTAB +TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS) TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) diff --git a/ext/misc/stmts.c b/ext/misc/stmt.c similarity index 56% rename from ext/misc/stmts.c rename to ext/misc/stmt.c index 3c564bef5d..533642837e 100644 --- a/ext/misc/stmts.c +++ b/ext/misc/stmt.c @@ -15,12 +15,12 @@ ** ** Usage example: ** -** .load ./stmts +** .load ./stmt ** .mode line ** .header on -** SELECT * FROM stmts; +** SELECT * FROM stmt; */ -#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTSVTAB) +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) #if !defined(SQLITEINT_H) #include "sqlite3ext.h" #endif @@ -47,21 +47,21 @@ SQLITE_EXTENSION_INIT1 #endif -/* stmts_vtab is a subclass of sqlite3_vtab which will -** serve as the underlying representation of a stmts virtual table +/* stmt_vtab is a subclass of sqlite3_vtab which will +** serve as the underlying representation of a stmt virtual table */ -typedef struct stmts_vtab stmts_vtab; -struct stmts_vtab { +typedef struct stmt_vtab stmt_vtab; +struct stmt_vtab { sqlite3_vtab base; /* Base class - must be first */ - sqlite3 *db; /* Database connection for this stmts vtab */ + sqlite3 *db; /* Database connection for this stmt vtab */ }; -/* stmts_cursor is a subclass of sqlite3_vtab_cursor which will +/* stmt_cursor is a subclass of sqlite3_vtab_cursor which will ** serve as the underlying representation of a cursor that scans ** over rows of the result */ -typedef struct stmts_cursor stmts_cursor; -struct stmts_cursor { +typedef struct stmt_cursor stmt_cursor; +struct stmt_cursor { sqlite3_vtab_cursor base; /* Base class - must be first */ sqlite3 *db; /* Database connection for this cursor */ sqlite3_stmt *pStmt; /* Statement cursor is currently pointing at */ @@ -69,41 +69,41 @@ struct stmts_cursor { }; /* -** The stmtsConnect() method is invoked to create a new -** stmts_vtab that describes the generate_stmts virtual table. +** The stmtConnect() method is invoked to create a new +** stmt_vtab that describes the generate_stmt virtual table. ** -** Think of this routine as the constructor for stmts_vtab objects. +** Think of this routine as the constructor for stmt_vtab objects. ** ** All this routine needs to do is: ** -** (1) Allocate the stmts_vtab object and initialize all fields. +** (1) Allocate the stmt_vtab object and initialize all fields. ** ** (2) Tell SQLite (via the sqlite3_declare_vtab() interface) what the -** result set of queries against generate_stmts will look like. +** result set of queries against generate_stmt will look like. */ -static int stmtsConnect( +static int stmtConnect( sqlite3 *db, void *pAux, int argc, const char *const*argv, sqlite3_vtab **ppVtab, char **pzErr ){ - stmts_vtab *pNew; + stmt_vtab *pNew; int rc; /* Column numbers */ -#define STMTS_COLUMN_PTR 0 /* Numeric value of the statement pointer */ -#define STMTS_COLUMN_SQL 1 /* SQL for the statement */ -#define STMTS_COLUMN_NCOL 2 /* Number of result columns */ -#define STMTS_COLUMN_RO 3 /* True if read-only */ -#define STMTS_COLUMN_BUSY 4 /* True if currently busy */ -#define STMTS_COLUMN_NSCAN 5 /* SQLITE_STMTSTATUS_FULLSCAN_STEP */ -#define STMTS_COLUMN_NSORT 6 /* SQLITE_STMTSTATUS_SORT */ -#define STMTS_COLUMN_NAIDX 7 /* SQLITE_STMTSTATUS_AUTOINDEX */ -#define STMTS_COLUMN_NSTEP 8 /* SQLITE_STMTSTATUS_VM_STEP */ -#define STMTS_COLUMN_REPREP 9 /* SQLITE_STMTSTATUS_REPREPARE */ -#define STMTS_COLUMN_RUN 10 /* SQLITE_STMTSTATUS_RUN */ -#define STMTS_COLUMN_MEM 11 /* SQLITE_STMTSTATUS_MEMUSED */ +#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 */ rc = sqlite3_declare_vtab(db, @@ -120,89 +120,89 @@ static int stmtsConnect( } /* -** This method is the destructor for stmts_cursor objects. +** This method is the destructor for stmt_cursor objects. */ -static int stmtsDisconnect(sqlite3_vtab *pVtab){ +static int stmtDisconnect(sqlite3_vtab *pVtab){ sqlite3_free(pVtab); return SQLITE_OK; } /* -** Constructor for a new stmts_cursor object. +** Constructor for a new stmt_cursor object. */ -static int stmtsOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){ - stmts_cursor *pCur; +static int stmtOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){ + stmt_cursor *pCur; pCur = sqlite3_malloc( sizeof(*pCur) ); if( pCur==0 ) return SQLITE_NOMEM; memset(pCur, 0, sizeof(*pCur)); - pCur->db = ((stmts_vtab*)p)->db; + pCur->db = ((stmt_vtab*)p)->db; *ppCursor = &pCur->base; return SQLITE_OK; } /* -** Destructor for a stmts_cursor. +** Destructor for a stmt_cursor. */ -static int stmtsClose(sqlite3_vtab_cursor *cur){ +static int stmtClose(sqlite3_vtab_cursor *cur){ sqlite3_free(cur); return SQLITE_OK; } /* -** Advance a stmts_cursor to its next row of output. +** Advance a stmt_cursor to its next row of output. */ -static int stmtsNext(sqlite3_vtab_cursor *cur){ - stmts_cursor *pCur = (stmts_cursor*)cur; +static int stmtNext(sqlite3_vtab_cursor *cur){ + stmt_cursor *pCur = (stmt_cursor*)cur; pCur->iRowid++; pCur->pStmt = sqlite3_next_stmt(pCur->db, pCur->pStmt); return SQLITE_OK; } /* -** Return values of columns for the row at which the stmts_cursor +** Return values of columns for the row at which the stmt_cursor ** is currently pointing. */ -static int stmtsColumn( +static int stmtColumn( sqlite3_vtab_cursor *cur, /* The cursor */ sqlite3_context *ctx, /* First argument to sqlite3_result_...() */ int i /* Which column to return */ ){ - stmts_cursor *pCur = (stmts_cursor*)cur; + stmt_cursor *pCur = (stmt_cursor*)cur; switch( i ){ - case STMTS_COLUMN_PTR: { + case STMT_COLUMN_PTR: { sqlite3_result_int64(ctx, SQLITE_PTR_TO_INT64(pCur->pStmt)); break; } - case STMTS_COLUMN_SQL: { + case STMT_COLUMN_SQL: { sqlite3_result_text(ctx, sqlite3_sql(pCur->pStmt), -1, SQLITE_TRANSIENT); break; } - case STMTS_COLUMN_NCOL: { + case STMT_COLUMN_NCOL: { sqlite3_result_int(ctx, sqlite3_column_count(pCur->pStmt)); break; } - case STMTS_COLUMN_RO: { + case STMT_COLUMN_RO: { sqlite3_result_int(ctx, sqlite3_stmt_readonly(pCur->pStmt)); break; } - case STMTS_COLUMN_BUSY: { + case STMT_COLUMN_BUSY: { sqlite3_result_int(ctx, sqlite3_stmt_busy(pCur->pStmt)); break; } - case STMTS_COLUMN_MEM: { + case STMT_COLUMN_MEM: { i = SQLITE_STMTSTATUS_MEMUSED + - STMTS_COLUMN_NSCAN - SQLITE_STMTSTATUS_FULLSCAN_STEP; + STMT_COLUMN_NSCAN - SQLITE_STMTSTATUS_FULLSCAN_STEP; /* Fall thru */ } - case STMTS_COLUMN_NSCAN: - case STMTS_COLUMN_NSORT: - case STMTS_COLUMN_NAIDX: - case STMTS_COLUMN_NSTEP: - case STMTS_COLUMN_REPREP: - case STMTS_COLUMN_RUN: { + case STMT_COLUMN_NSCAN: + case STMT_COLUMN_NSORT: + case STMT_COLUMN_NAIDX: + case STMT_COLUMN_NSTEP: + case STMT_COLUMN_REPREP: + case STMT_COLUMN_RUN: { sqlite3_result_int(ctx, sqlite3_stmt_status(pCur->pStmt, - i-STMTS_COLUMN_NSCAN+SQLITE_STMTSTATUS_FULLSCAN_STEP, 0)); + i-STMT_COLUMN_NSCAN+SQLITE_STMTSTATUS_FULLSCAN_STEP, 0)); break; } } @@ -213,8 +213,8 @@ static int stmtsColumn( ** Return the rowid for the current row. In this implementation, the ** rowid is the same as the output value. */ -static int stmtsRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){ - stmts_cursor *pCur = (stmts_cursor*)cur; +static int stmtRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){ + stmt_cursor *pCur = (stmt_cursor*)cur; *pRowid = pCur->iRowid; return SQLITE_OK; } @@ -223,35 +223,35 @@ static int stmtsRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){ ** Return TRUE if the cursor has been moved off of the last ** row of output. */ -static int stmtsEof(sqlite3_vtab_cursor *cur){ - stmts_cursor *pCur = (stmts_cursor*)cur; +static int stmtEof(sqlite3_vtab_cursor *cur){ + stmt_cursor *pCur = (stmt_cursor*)cur; return pCur->pStmt==0; } /* -** This method is called to "rewind" the stmts_cursor object back +** This method is called to "rewind" the stmt_cursor object back ** to the first row of output. This method is always called at least -** once prior to any call to stmtsColumn() or stmtsRowid() or -** stmtsEof(). +** once prior to any call to stmtColumn() or stmtRowid() or +** stmtEof(). */ -static int stmtsFilter( +static int stmtFilter( sqlite3_vtab_cursor *pVtabCursor, int idxNum, const char *idxStr, int argc, sqlite3_value **argv ){ - stmts_cursor *pCur = (stmts_cursor *)pVtabCursor; + stmt_cursor *pCur = (stmt_cursor *)pVtabCursor; pCur->pStmt = 0; pCur->iRowid = 0; - return stmtsNext(pVtabCursor); + return stmtNext(pVtabCursor); } /* ** SQLite will invoke this method one or more times while planning a query -** that uses the generate_stmts virtual table. This routine needs to create +** that uses the generate_stmt virtual table. This routine needs to create ** a query plan for each invocation and compute an estimated cost for that ** plan. */ -static int stmtsBestIndex( +static int stmtBestIndex( sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo ){ @@ -262,22 +262,22 @@ static int stmtsBestIndex( /* ** This following structure defines all the methods for the -** generate_stmts virtual table. +** generate_stmt virtual table. */ -static sqlite3_module stmtsModule = { +static sqlite3_module stmtModule = { 0, /* iVersion */ 0, /* xCreate */ - stmtsConnect, /* xConnect */ - stmtsBestIndex, /* xBestIndex */ - stmtsDisconnect, /* xDisconnect */ + stmtConnect, /* xConnect */ + stmtBestIndex, /* xBestIndex */ + stmtDisconnect, /* xDisconnect */ 0, /* xDestroy */ - stmtsOpen, /* xOpen - open a cursor */ - stmtsClose, /* xClose - close a cursor */ - stmtsFilter, /* xFilter - configure scan constraints */ - stmtsNext, /* xNext - advance a cursor */ - stmtsEof, /* xEof - check for end of scan */ - stmtsColumn, /* xColumn - read data */ - stmtsRowid, /* xRowid - read data */ + stmtOpen, /* xOpen - open a cursor */ + stmtClose, /* xClose - close a cursor */ + stmtFilter, /* xFilter - configure scan constraints */ + stmtNext, /* xNext - advance a cursor */ + stmtEof, /* xEof - check for end of scan */ + stmtColumn, /* xColumn - read data */ + stmtRowid, /* xRowid - read data */ 0, /* xUpdate */ 0, /* xBegin */ 0, /* xSync */ @@ -289,10 +289,10 @@ static sqlite3_module stmtsModule = { #endif /* SQLITE_OMIT_VIRTUALTABLE */ -int sqlite3StmtsVtabInit(sqlite3 *db){ +int sqlite3StmtVtabInit(sqlite3 *db){ int rc = SQLITE_OK; #ifndef SQLITE_OMIT_VIRTUALTABLE - rc = sqlite3_create_module(db, "stmts", &stmtsModule, 0); + rc = sqlite3_create_module(db, "stmt", &stmtModule, 0); #endif return rc; } @@ -301,7 +301,7 @@ int sqlite3StmtsVtabInit(sqlite3 *db){ #ifdef _WIN32 __declspec(dllexport) #endif -int sqlite3_stmts_init( +int sqlite3_stmt_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi @@ -309,14 +309,9 @@ int sqlite3_stmts_init( int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); #ifndef SQLITE_OMIT_VIRTUALTABLE - if( sqlite3_libversion_number()<3008012 ){ - *pzErrMsg = sqlite3_mprintf( - "generate_stmts() requires SQLite 3.8.12 or later"); - return SQLITE_ERROR; - } - rc = sqlite3StmtsVtabInit(db); + rc = sqlite3StmtVtabInit(db); #endif return rc; } #endif /* SQLITE_CORE */ -#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTSVTAB) */ +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ diff --git a/main.mk b/main.mk index b91770f70f..ae45ddbe95 100644 --- a/main.mk +++ b/main.mk @@ -69,7 +69,7 @@ LIBOBJ+= vdbe.o parse.o \ notify.o opcodes.o os.o os_unix.o os_win.o \ pager.o pcache.o pcache1.o pragma.o prepare.o printf.o \ random.o resolve.o rowset.o rtree.o \ - select.o sqlite3rbu.o status.o stmts.o \ + select.o sqlite3rbu.o status.o stmt.o \ table.o threads.o tokenize.o treeview.o trigger.o \ update.o userauth.o util.o vacuum.o \ vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbesort.o \ @@ -236,7 +236,7 @@ SRC += \ $(TOP)/ext/rbu/sqlite3rbu.h SRC += \ $(TOP)/ext/misc/json1.c \ - $(TOP)/ext/misc/stmts.c + $(TOP)/ext/misc/stmt.c # FTS5 things @@ -477,7 +477,7 @@ TESTOPTS = --verbose=file --output=test-out.txt SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -SHELL_OPT += -DSQLITE_ENABLE_STMTSVTAB +SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 FUZZCHECK_OPT += -DSQLITE_MAX_MEMORY=50000000 @@ -721,8 +721,8 @@ fts5.o: fts5.c json1.o: $(TOP)/ext/misc/json1.c $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c -stmts.o: $(TOP)/ext/misc/stmts.c - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/misc/stmts.c +stmt.o: $(TOP)/ext/misc/stmt.c + $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/misc/stmt.c rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR) $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c @@ -777,7 +777,7 @@ TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024 -TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_STMTSVTAB +TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_STMTVTAB testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ diff --git a/manifest b/manifest index ef9237407f..9879fe10ff 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C A\scouple\sfixes\sfor\sthe\sWin32\sinterface\sfor\slsm1. -D 2017-06-29T14:17:48.990 -F Makefile.in 2fde386bd3fca21b89a5f64eaa0c580b25079cd10f6eb9692987a70b7709edc0 +C Rename\sthe\s"stmts"\svirtual\stable\sto\sjust\s"stmt"\swithout\sthe\sfinal\s"s". +D 2017-06-29T14:33:51.582 +F Makefile.in 081e48dfe7f995d57ce1a88ddf4d2917b4349158648a6cd45b42beae30de3a12 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc 822979c692e9f1004c3ac36802ad2c130709fe4d111c272d55b8bdeb0261070a +F Makefile.msc 4ebb1d257cac7fb1bcb4ba59278416d410ff1c4bf59447a9c37a415f3516056a F README.md 2b15fae33852f2f53996774c21fb41e1d94181c4401a0e43ac93e11f2cc901b9 F VERSION 87f1498f27e398bce3da2fa8125c9879a38ed9d87e4b5fb922b351de1e25cadb F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -276,7 +276,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/stmts.c a537a976bb901ebfb0f5e3bfe72f3e6d76f30186d4b29fb9c9bc68f145a33050 +F ext/misc/stmt.c 619222bc1752a7a8412bda2d9b97337c4bc67a1ddee0efcba0eb6f439f25ce5a w ext/misc/stmts.c F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95 F ext/misc/vfsstat.c bf10ef0bc51e1ad6756629e1edb142f7a8db1178 @@ -372,7 +372,7 @@ F ext/userauth/userauth.c 3410be31283abba70255d71fd24734e017a4497f F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk 91132b69fc5e2c03ba83fdd0f1ee2cdd6a8e18397dfa097ec84dfa522803c100 +F main.mk b57f019e6cd9d8770b019726c544098fe38f3b5db997d2af739352bbd7c7a14c F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 @@ -397,7 +397,7 @@ F src/btreeInt.h a392d353104b4add58b4a59cb185f5d5693dde832c565b77d8d4c343ed98f61 F src/build.c b24e0889ba18ba0e93e03e2ef5c9f1a2ca043d77c5abbd3d333858a76b795da3 F src/callback.c 2e76147783386374bf01b227f752c81ec872d730 F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e -F src/ctime.c 0dbb6af8bb0829f5db1e2b7ef34df081d8e41d5295eb6dddddd48a705db741ec +F src/ctime.c 928954802b1397d9fb1378c7eb702c94b4735bbab1d5793e21b6a77734f56a1b F src/date.c cc42a41c7422389860d40419a5e3bce5eaf6e7835c3ba2677751dc653550a5c7 F src/dbstat.c 19ee7a4e89979d4df8e44cfac7a8f905ec89b77d F src/delete.c 3213547e97b676c6fa79948b7a9ede4801ea04a01a2043241deafedf132ecf5d @@ -413,7 +413,7 @@ F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71 F src/insert.c bb70abf32c7c926745eb550938db9132309584a667a44c2db0e5fa3207600391 F src/legacy.c 134ab3e3fae00a0f67a5187981d6935b24b337bcf0f4b3e5c9fa5763da95bf4e F src/loadext.c a72909474dadce771d3669bf84bf689424f6f87d471fee898589c3ef9b2acfd9 -F src/main.c aaf24be7e2354b6f9f5fecd5c1627e6e5dd8b1825a91e013f1eb7c5d3bc051b1 +F src/main.c 0ed4383f4de08ac1a808c45666743c6352dfee87adf4557e99bf2a954b31bdf6 F src/malloc.c e20bb2b48abec52d3faf01cce12e8b4f95973755fafec98d45162dfdab111978 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de @@ -473,7 +473,7 @@ F src/test_backup.c bf5da90c9926df0a4b941f2d92825a01bbe090a0 F src/test_bestindex.c d23f80d334c59662af69191854c76b8d3d0c8c96 F src/test_blob.c f65ac717da2618691cf9dad094e6da0219dcd208 F src/test_btree.c 8b2dc8b8848cf3a4db93f11578f075e82252a274 -F src/test_config.c 15b06083a05b608464e1cd8b6d1a2fc97aa2948cd250c584f8ec564e0de71b14 +F src/test_config.c abf6fc1fe9d041b699578c42e3db81f8831c4f5b804f1927958102ee8f2b773e F src/test_delete.c e2fe07646dff6300b48d49b2fee2fe192ed389e834dd635e3b3bac0ce0bf9f8f F src/test_demovfs.c a0c3bdd45ed044115c2c9f7779e56eafff18741e F src/test_devsym.c 4e58dec2602d8e139ca08659f62a62450587cb58 @@ -1568,7 +1568,7 @@ F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e F tool/mkpragmatab.tcl aa94395a91b5bd47022b7db0c08126f047887e0d299cc19ec1c23a9e5b136961 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 F tool/mksqlite3c-noext.tcl fef88397668ae83166735c41af99d79f56afaabb -F tool/mksqlite3c.tcl 4b5c48a98dc8cc3bd6aa3e5388be1fff308e4eac4fe1f01b4546413d8ee2847f +F tool/mksqlite3c.tcl f6214285bec900d28441366ca31af327aade18bbc424b0480497966ec05bc43c F tool/mksqlite3h.tcl 51bd5e7e840a920388a5966c9f2ccc618f434c57bd68c1bab4085b2553e1e237 F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b F tool/mkvsix.tcl b9e0777a213c23156b6542842c238479e496ebf5 @@ -1627,7 +1627,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 60c628293a1d8a1505e1a36dbd01b1f62bcfd7915e144044c92385423cbf8e07 -R 6b1172fa5df14c2da55cdce2ba904e67 -U mistachkin -Z b1cb3cacab6d77553cd0c3ad7148e349 +P ebbd98e941d8a8ea97b434c29b70095515af0adab1977aa4d37fe74a7401f846 +R 227414f0a87c66eaa518fb66692c2aa3 +U drh +Z 4008bc0c583622d13bed9769f9852f41 diff --git a/manifest.uuid b/manifest.uuid index 4922e01ded..a708900239 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ebbd98e941d8a8ea97b434c29b70095515af0adab1977aa4d37fe74a7401f846 \ No newline at end of file +adfdb80105c46ac42b71132c80a91dbd5b1c9ff241fb4fbb5d04641a88898d90 \ No newline at end of file diff --git a/src/ctime.c b/src/ctime.c index 8a5185c6bb..ef2523a9b2 100644 --- a/src/ctime.c +++ b/src/ctime.c @@ -291,8 +291,8 @@ static const char * const sqlite3azCompileOpt[] = { #elif defined(SQLITE_ENABLE_STAT3) "ENABLE_STAT3", #endif -#if SQLITE_ENABLE_STMTSVTAB - "ENABLE_STMTSVTAB", +#if SQLITE_ENABLE_STMTVTAB + "ENABLE_STMTVTAB", #endif #if SQLITE_ENABLE_STMT_SCANSTATUS "ENABLE_STMT_SCANSTATUS", diff --git a/src/main.c b/src/main.c index d02c02cfcf..14f3ce9467 100644 --- a/src/main.c +++ b/src/main.c @@ -28,8 +28,8 @@ #ifdef SQLITE_ENABLE_JSON1 int sqlite3Json1Init(sqlite3*); #endif -#ifdef SQLITE_ENABLE_STMTSVTAB -int sqlite3StmtsVtabInit(sqlite3*); +#ifdef SQLITE_ENABLE_STMTVTAB +int sqlite3StmtVtabInit(sqlite3*); #endif #ifdef SQLITE_ENABLE_FTS5 int sqlite3Fts5Init(sqlite3*); @@ -3061,9 +3061,9 @@ static int openDatabase( } #endif -#ifdef SQLITE_ENABLE_STMTSVTAB +#ifdef SQLITE_ENABLE_STMTVTAB if( !db->mallocFailed && rc==SQLITE_OK){ - rc = sqlite3StmtsVtabInit(db); + rc = sqlite3StmtVtabInit(db); } #endif diff --git a/src/test_config.c b/src/test_config.c index aeec31ef83..9ff84dcec0 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -561,10 +561,10 @@ Tcl_SetVar2(interp, "sqlite_options", "mergesort", "1", TCL_GLOBAL_ONLY); Tcl_SetVar2(interp, "sqlite_options", "stat3", "0", TCL_GLOBAL_ONLY); #endif -#if defined(SQLITE_ENABLE_STMTSVTAB) && !defined(SQLITE_OMIT_VIRTUALTABLE) - Tcl_SetVar2(interp, "sqlite_options", "stmtsvtab", "1", TCL_GLOBAL_ONLY); +#if defined(SQLITE_ENABLE_STMTVTAB) && !defined(SQLITE_OMIT_VIRTUALTABLE) + Tcl_SetVar2(interp, "sqlite_options", "stmtvtab", "1", TCL_GLOBAL_ONLY); #else - Tcl_SetVar2(interp, "sqlite_options", "stmtsvtab", "0", TCL_GLOBAL_ONLY); + Tcl_SetVar2(interp, "sqlite_options", "stmtvtab", "0", TCL_GLOBAL_ONLY); #endif #ifdef SQLITE_ENABLE_STMT_SCANSTATUS diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index 6df181563d..596787d4fd 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -389,7 +389,7 @@ foreach file { sqlite3session.c json1.c fts5.c - stmts.c + stmt.c } { copy_file tsrc/$file }