diff options
author | drh <> | 2023-10-12 17:47:50 +0000 |
---|---|---|
committer | drh <> | 2023-10-12 17:47:50 +0000 |
commit | c7ad9f65fa49b67c4ff5491f0231daa18f78afeb (patch) | |
tree | 85634a48d972b1418c492d45a766bbfe0ed682db /src | |
parent | 7d1c9da62dcde30f42f2a1d59aaf466207f922b7 (diff) | |
parent | 5d9a6c6734168c8388eba41270fa4415f4dfee1c (diff) | |
download | sqlite-c7ad9f65fa49b67c4ff5491f0231daa18f78afeb.tar.gz sqlite-c7ad9f65fa49b67c4ff5491f0231daa18f78afeb.zip |
Merge fixes from trunk into the jsonb branch.
FossilOrigin-Name: a760bd7bcc63aac41c989bb5f4fbc927f9a93fe9c0aa18da2f0131483ec3f189
Diffstat (limited to 'src')
-rw-r--r-- | src/malloc.c | 2 | ||||
-rw-r--r-- | src/pager.c | 2 | ||||
-rw-r--r-- | src/shell.c.in | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/malloc.c b/src/malloc.c index 48c460060..356750682 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -896,5 +896,5 @@ int sqlite3ApiExit(sqlite3* db, int rc){ if( db->mallocFailed || rc ){ return apiHandleError(db, rc); } - return rc & db->errMask; + return 0; } diff --git a/src/pager.c b/src/pager.c index af21ad611..1423b6654 100644 --- a/src/pager.c +++ b/src/pager.c @@ -7369,7 +7369,7 @@ int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){ } assert( state==pPager->eState ); } - }else if( eMode==PAGER_JOURNALMODE_OFF ){ + }else if( eMode==PAGER_JOURNALMODE_OFF || eMode==PAGER_JOURNALMODE_MEMORY ){ sqlite3OsClose(pPager->jfd); } } diff --git a/src/shell.c.in b/src/shell.c.in index 1699820a6..beea0f9b0 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -8772,8 +8772,10 @@ static int do_meta_command(char *zLine, ShellState *p){ "SELECT rowid FROM sqlite_schema" " WHERE name GLOB 'sqlite_stat[134]'", -1, &pStmt, 0); - doStats = sqlite3_step(pStmt)==SQLITE_ROW; - sqlite3_finalize(pStmt); + if( rc==SQLITE_OK ){ + doStats = sqlite3_step(pStmt)==SQLITE_ROW; + sqlite3_finalize(pStmt); + } } if( doStats==0 ){ raw_printf(p->out, "/* No STAT tables available */\n"); |