mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Improved reporting of SQLITE_TOOBIG errors while parsing.
FossilOrigin-Name: ea2d4b65e20e44e19219c821bf68e97ff3af1760b3b4762250d020ba2a5a6343
This commit is contained in:
13
src/util.c
13
src/util.c
@@ -233,6 +233,19 @@ void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** If database connection db is currently parsing SQL, then transfer
|
||||
** error code errCode to that parser if the parser has not already
|
||||
** encountered some other kind of error.
|
||||
*/
|
||||
int sqlite3ErrorToParser(sqlite3 *db, int errCode){
|
||||
Parse *pParse;
|
||||
if( db==0 || (pParse = db->pParse)==0 ) return errCode;
|
||||
pParse->rc = errCode;
|
||||
pParse->nErr++;
|
||||
return errCode;
|
||||
}
|
||||
|
||||
/*
|
||||
** Convert an SQL-style quoted string into a normal string by removing
|
||||
** the quote characters. The conversion is done in-place. If the
|
||||
|
||||
Reference in New Issue
Block a user