1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

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
This commit is contained in:
drh
2008-07-25 15:39:03 +00:00
parent 1bb14aca96
commit ec424a5be6
10 changed files with 70 additions and 23 deletions

View File

@@ -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 @@ struct Sqlite3Config {
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 sqlite3SelectDestInit(SelectDest*,int,int);
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