Add the capability to track the maximum depth of the LALR(1) parser stack
so that critical applications can check to see if they are getting close
to limits. (CVS 5481)
FossilOrigin-Name: ef0250f3dc769a4acd534f31fa06d90922d4145b
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 45cbdfd..5672394 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.745 2008/07/25 08:49:00 danielk1977 Exp $
+** @(#) $Id: sqliteInt.h,v 1.746 2008/07/25 15:39:04 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -1790,6 +1790,7 @@
int isMallocInit; /* True after malloc is initialized */
sqlite3_mutex *pInitMutex; /* Mutex used by sqlite3_initialize() */
int nSmall; /* alloc size threshold used by mem6.c */
+ int mxParserStack; /* maximum depth of the parser stack */
};
/*
@@ -2195,6 +2196,9 @@
void *sqlite3ParserAlloc(void*(*)(size_t));
void sqlite3ParserFree(void*, void(*)(void*));
void sqlite3Parser(void*, int, Token, Parse*);
+#ifdef YYTRACKMAXSTACKDEPTH
+ int sqlite3ParserStackPeak(void*);
+#endif
int sqlite3AutoLoadExtensions(sqlite3*);
#ifndef SQLITE_OMIT_LOAD_EXTENSION