aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2007-05-10 10:46:56 +0000
committerdanielk1977 <danielk1977@noemail.net>2007-05-10 10:46:56 +0000
commitfc9760654ae33e2385d15fef23a77de0ce7ed05f (patch)
tree424facab1d365a44d7575058432716dfb4d17233 /src/sqliteInt.h
parente305f43f1782896906e699fd67c2559daeca09a9 (diff)
downloadsqlite-fc9760654ae33e2385d15fef23a77de0ce7ed05f.tar.gz
sqlite-fc9760654ae33e2385d15fef23a77de0ce7ed05f.zip
Add code to enforce the MAX_EXPR_DEPTH limit. (CVS 3968)
FossilOrigin-Name: 2c9c94a24d52a1c9f5d1b32cbdff794a2dd74126
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 8daf349ba..fc2525f8f 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.562 2007/05/08 21:45:28 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.563 2007/05/10 10:46:57 danielk1977 Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -998,6 +998,9 @@ struct Expr {
** right side of "<expr> IN (<select>)" */
Table *pTab; /* Table for OP_Column expressions. */
Schema *pSchema;
+#if SQLITE_MAX_EXPR_DEPTH>0
+ int nHeight; /* Height of the tree headed by this node */
+#endif
};
/*
@@ -1343,6 +1346,9 @@ struct Parse {
u8 declareVtab; /* True if inside sqlite3_declare_vtab() */
Table *pVirtualLock; /* Require virtual table lock on this table */
#endif
+#if SQLITE_MAX_EXPR_DEPTH>0
+ int nHeight; /* Expression tree height of current sub-select */
+#endif
};
#ifdef SQLITE_OMIT_VIRTUALTABLE
@@ -1878,6 +1884,13 @@ void sqlite3InvalidFunction(sqlite3_context*,int,sqlite3_value**);
int sqlite3Reprepare(Vdbe*);
void sqlite3ExprListCheckLength(Parse*, ExprList*, int, const char*);
+#if SQLITE_MAX_EXPR_DEPTH>0
+ void sqlite3ExprSetHeight(Expr *);
+ int sqlite3SelectExprHeight(Select *);
+#else
+ #define sqlite3ExprSetHeight(x)
+#endif
+
u32 sqlite3Get2byte(const u8*);
u32 sqlite3Get4byte(const u8*);
void sqlite3Put2byte(u8*, u32);