diff options
author | drh <drh@noemail.net> | 2019-04-09 21:32:46 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-04-09 21:32:46 +0000 |
commit | c3dcdba387dc58b26fcc2ad2a68808afd352647d (patch) | |
tree | 39474750f2543044e2d510cd638f95adaf55a40f /src/util.c | |
parent | 25050f26206456c62f400bdd95215701095b00a0 (diff) | |
download | sqlite-c3dcdba387dc58b26fcc2ad2a68808afd352647d.tar.gz sqlite-c3dcdba387dc58b26fcc2ad2a68808afd352647d.zip |
Improved reporting of SQLITE_TOOBIG errors while parsing.
FossilOrigin-Name: ea2d4b65e20e44e19219c821bf68e97ff3af1760b3b4762250d020ba2a5a6343
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c index 1d8699846..81d3bf36b 100644 --- a/src/util.c +++ b/src/util.c @@ -234,6 +234,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 ** input does not begin with a quote character, then this routine |