1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Fix an assert() that may fail following an OOM error.

FossilOrigin-Name: 5f592359d6d41708da3b3ac9d987a1631bfa3d88
This commit is contained in:
dan
2015-01-21 17:00:57 +00:00
parent 1b3ee49225
commit ce8f53d447
4 changed files with 21 additions and 10 deletions

View File

@@ -2256,7 +2256,8 @@ void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){
int idxLru;
struct yColCache *p;
assert( iReg>0 ); /* Register numbers are always positive */
/* Unless an error has occurred, register numbers are always positive. */
assert( iReg>0 || pParse->nErr || pParse->db->mallocFailed );
assert( iCol>=-1 && iCol<32768 ); /* Finite column numbers */
/* The SQLITE_ColumnCache flag disables the column cache. This is used