aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sqliteLimit.h4
-rw-r--r--src/test_config.c1
-rw-r--r--src/vdbe.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/sqliteLimit.h b/src/sqliteLimit.h
index c0244a348..77d78589a 100644
--- a/src/sqliteLimit.h
+++ b/src/sqliteLimit.h
@@ -191,6 +191,10 @@
/*
** Maximum depth of recursion for triggers.
+**
+** A value of 1 means that a trigger program will not be able to itself
+** fire any triggers. A value of 0 means that no trigger programs at all
+** may be executed.
*/
#ifndef SQLITE_MAX_TRIGGER_DEPTH
#if defined(SQLITE_SMALL_STACK)
diff --git a/src/test_config.c b/src/test_config.c
index f1d941387..6340b5e26 100644
--- a/src/test_config.c
+++ b/src/test_config.c
@@ -537,6 +537,7 @@ Tcl_SetVar2(interp, "sqlite_options", "long_double",
LINKVAR( MAX_PAGE_SIZE );
LINKVAR( MAX_PAGE_COUNT );
LINKVAR( MAX_LIKE_PATTERN_LENGTH );
+ LINKVAR( MAX_TRIGGER_DEPTH );
LINKVAR( DEFAULT_TEMP_CACHE_SIZE );
LINKVAR( DEFAULT_CACHE_SIZE );
LINKVAR( DEFAULT_PAGE_SIZE );
diff --git a/src/vdbe.c b/src/vdbe.c
index f5cd7ce77..d0fef80fe 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -4822,7 +4822,7 @@ case OP_Program: { /* jump */
if( pFrame ) break;
}
- if( p->nFrame>db->aLimit[SQLITE_LIMIT_TRIGGER_DEPTH] ){
+ if( p->nFrame>=db->aLimit[SQLITE_LIMIT_TRIGGER_DEPTH] ){
rc = SQLITE_ERROR;
sqlite3SetString(&p->zErrMsg, db, "too many levels of trigger recursion");
break;