1
0
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:
drh
2019-04-09 21:32:46 +00:00
parent 25050f2620
commit c3dcdba387
6 changed files with 26 additions and 11 deletions

View File

@@ -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