mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Fix compilation and testing with OMIT_INCRBLOB defined. (CVS 3923)
FossilOrigin-Name: a0f8adc692839d0645daf0630533a87b0543f6e8
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** A TCL Interface to SQLite. Append this file to sqlite3.c and
|
||||
** compile the whole thing to build a TCL-enabled version of SQLite.
|
||||
**
|
||||
** $Id: tclsqlite.c,v 1.185 2007/05/04 18:36:45 danielk1977 Exp $
|
||||
** $Id: tclsqlite.c,v 1.186 2007/05/04 19:03:03 danielk1977 Exp $
|
||||
*/
|
||||
#include "tcl.h"
|
||||
#include <errno.h>
|
||||
@@ -128,6 +128,7 @@ struct IncrblobChannel {
|
||||
IncrblobChannel *pPrev; /* Linked list of all open incrblob channels */
|
||||
};
|
||||
|
||||
#ifndef SQLITE_OMIT_INCRBLOB
|
||||
/*
|
||||
** Close all incrblob channels opened using database connection pDb.
|
||||
** This is called when shutting down the database connection.
|
||||
@@ -344,6 +345,9 @@ static int createIncrblobChannel(
|
||||
Tcl_SetResult(interp, (char *)Tcl_GetChannelName(p->channel), TCL_VOLATILE);
|
||||
return TCL_OK;
|
||||
}
|
||||
#else /* else clause for "#ifndef SQLITE_OMIT_INCRBLOB" */
|
||||
#define closeIncrblobChannels(pDb)
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Look at the script prefix in pCmd. We will be executing this script
|
||||
@@ -1861,6 +1865,10 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
** $db incrblob ?-readonly? ?DB? TABLE COLUMN ROWID
|
||||
*/
|
||||
case DB_INCRBLOB: {
|
||||
#ifdef SQLITE_OMIT_INCRBLOB
|
||||
Tcl_AppendResult(interp, "incrblob not available in this build", 0);
|
||||
return TCL_ERROR;
|
||||
#else
|
||||
int isReadonly = 0;
|
||||
const char *zDb = "main";
|
||||
const char *zTable;
|
||||
@@ -1889,6 +1897,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
interp, pDb, zDb, zTable, zColumn, iRow, isReadonly
|
||||
);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user