mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Upgrade SQLite to 3.40 (#699)
This commit is contained in:
parent
bcae817215
commit
0dc0758574
151 changed files with 27917 additions and 22169 deletions
14
third_party/sqlite3/status.c
vendored
14
third_party/sqlite3/status.c
vendored
|
@ -13,9 +13,8 @@
|
|||
** This module implements the sqlite3_status() interface and related
|
||||
** functionality.
|
||||
*/
|
||||
#include "third_party/sqlite3/sqliteInt.inc"
|
||||
#include "third_party/sqlite3/sqliteInt.h"
|
||||
#include "third_party/sqlite3/vdbeInt.inc"
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
** Variables in which to record status information.
|
||||
|
@ -292,6 +291,8 @@ int sqlite3_db_status(
|
|||
|
||||
sqlite3BtreeEnterAll(db);
|
||||
db->pnBytesFreed = &nByte;
|
||||
assert( db->lookaside.pEnd==db->lookaside.pTrueEnd );
|
||||
db->lookaside.pEnd = db->lookaside.pStart;
|
||||
for(i=0; i<db->nDb; i++){
|
||||
Schema *pSchema = db->aDb[i].pSchema;
|
||||
if( ALWAYS(pSchema!=0) ){
|
||||
|
@ -317,6 +318,7 @@ int sqlite3_db_status(
|
|||
}
|
||||
}
|
||||
db->pnBytesFreed = 0;
|
||||
db->lookaside.pEnd = db->lookaside.pTrueEnd;
|
||||
sqlite3BtreeLeaveAll(db);
|
||||
|
||||
*pHighwater = 0;
|
||||
|
@ -334,10 +336,12 @@ int sqlite3_db_status(
|
|||
int nByte = 0; /* Used to accumulate return value */
|
||||
|
||||
db->pnBytesFreed = &nByte;
|
||||
for(pVdbe=db->pVdbe; pVdbe; pVdbe=pVdbe->pNext){
|
||||
sqlite3VdbeClearObject(db, pVdbe);
|
||||
sqlite3DbFree(db, pVdbe);
|
||||
assert( db->lookaside.pEnd==db->lookaside.pTrueEnd );
|
||||
db->lookaside.pEnd = db->lookaside.pStart;
|
||||
for(pVdbe=db->pVdbe; pVdbe; pVdbe=pVdbe->pVNext){
|
||||
sqlite3VdbeDelete(pVdbe);
|
||||
}
|
||||
db->lookaside.pEnd = db->lookaside.pTrueEnd;
|
||||
db->pnBytesFreed = 0;
|
||||
|
||||
*pHighwater = 0; /* IMP: R-64479-57858 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue