1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Enhance ability to debug out-of-memory errors.

FossilOrigin-Name: 6a9c4a3ebfb7cc0738ef6634440ccab44a21ff28
This commit is contained in:
mistachkin
2016-02-13 23:43:46 +00:00
parent e75a9eb9bb
commit fad3039c51
37 changed files with 282 additions and 260 deletions

View File

@@ -101,7 +101,7 @@ static int sqlite3_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
return 0;
malloc_failed:
p->rc = SQLITE_NOMEM;
p->rc = SQLITE_NOMEM_BKPT;
return 1;
}
@@ -142,7 +142,7 @@ int sqlite3_get_table(
res.azResult = sqlite3_malloc64(sizeof(char*)*res.nAlloc );
if( res.azResult==0 ){
db->errCode = SQLITE_NOMEM;
return SQLITE_NOMEM;
return SQLITE_NOMEM_BKPT;
}
res.azResult[0] = 0;
rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
@@ -171,7 +171,7 @@ int sqlite3_get_table(
if( azNew==0 ){
sqlite3_free_table(&res.azResult[1]);
db->errCode = SQLITE_NOMEM;
return SQLITE_NOMEM;
return SQLITE_NOMEM_BKPT;
}
res.azResult = azNew;
}