aboutsummaryrefslogtreecommitdiff
path: root/src/tclsqlite.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2020-01-08 15:44:10 +0000
committerdrh <drh@noemail.net>2020-01-08 15:44:10 +0000
commit15f3eacfc0e9cfe6ebd4e71a342fab18c6d5eee0 (patch)
treeab136f4be16d9a394030a0ef8262d3aaa06adb9c /src/tclsqlite.c
parent6d35956c86834f53da7743b922e4a688643a3467 (diff)
downloadsqlite-15f3eacfc0e9cfe6ebd4e71a342fab18c6d5eee0.tar.gz
sqlite-15f3eacfc0e9cfe6ebd4e71a342fab18c6d5eee0.zip
Provide the -innocuous option to the "db func" method in the TCL interface.
FossilOrigin-Name: 0138652b6c2f21fd67e59a23a396a5b9d6a16ee9b44701cddfc49b23fddfce5b
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r--src/tclsqlite.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index a691898dc..6a8b52b6b 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -2818,6 +2818,7 @@ deserialize_error:
** --argcount N Function has exactly N arguments
** --deterministic The function is pure
** --directonly Prohibit use inside triggers and views
+ ** --innocuous Has no side effects or information leaks
** --returntype TYPE Specify the return type of the function
*/
case DB_FUNCTION: {
@@ -2854,6 +2855,9 @@ deserialize_error:
if( n>1 && strncmp(z, "-directonly",n)==0 ){
flags |= SQLITE_DIRECTONLY;
}else
+ if( n>1 && strncmp(z, "-innocuous",n)==0 ){
+ flags |= SQLITE_INNOCUOUS;
+ }else
if( n>1 && strncmp(z, "-returntype", n)==0 ){
const char *azType[] = {"integer", "real", "text", "blob", "any", 0};
assert( SQLITE_INTEGER==1 && SQLITE_FLOAT==2 && SQLITE_TEXT==3 );
@@ -2870,7 +2874,7 @@ deserialize_error:
}else{
Tcl_AppendResult(interp, "bad option \"", z,
"\": must be -argcount, -deterministic, -directonly,"
- " or -returntype", (char*)0
+ " -innocuous, or -returntype", (char*)0
);
return TCL_ERROR;
}