Skip to content

Commit 9e10fd8

Browse files
committed
xPrepareSql: require iVersion >= 700
Following @psarna's advice, use iVersion >= 700 for community-contributed methods.
1 parent 86826ae commit 9e10fd8

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/sqlite.h.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7076,7 +7076,8 @@ struct sqlite3_module {
70767076
/* The methods above are in versions 1 and 2 of the sqlite_module object.
70777077
** Those below are for version 3 and greater. */
70787078
int (*xShadowName)(const char*);
7079-
/** The methods below are for version 4 and greater. */
7079+
/* The methods below relate to features contributed by the community and
7080+
** are available for version 700 and greater. */
70807081
int (*xPrepareSql)(sqlite3_vtab_cursor*, const char*);
70817082
};
70827083

src/test8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ static sqlite3_module echoModule = {
13321332
};
13331333

13341334
static sqlite3_module echoModuleV2 = {
1335-
4, /* iVersion */
1335+
700, /* iVersion */
13361336
echoCreate,
13371337
echoConnect,
13381338
echoBestIndex,

src/vdbe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8095,7 +8095,7 @@ case OP_VPrepareSql: {
80958095
pModule = pVtab->pModule;
80968096

80978097
/* Invoke the xPrepareSql method */
8098-
if( pModule->iVersion>=4 ){
8098+
if( pModule->iVersion>=700 ){
80998099
if( pModule->xPrepareSql && p->zSql ){
81008100
rc = pModule->xPrepareSql(pVCur, p->zSql);
81018101
if( rc ) goto abort_due_to_error;

0 commit comments

Comments
 (0)