diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-08-28 16:57:01 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-08-28 16:57:01 +0000 |
commit | bb3801714270de37f05383214aadfb09006113ea (patch) | |
tree | 2549f7b9f0563bb3e88cc95f80ce1692d3e89f69 /ext/pdo_sqlite/sqlite/src/vdbeInt.h | |
parent | 4509fb9d5d9bc423e34f6a944191b6309e9d0b74 (diff) | |
download | php-git-bb3801714270de37f05383214aadfb09006113ea.tar.gz |
Upgrade sqlite lib to 3.2.5
Diffstat (limited to 'ext/pdo_sqlite/sqlite/src/vdbeInt.h')
-rw-r--r-- | ext/pdo_sqlite/sqlite/src/vdbeInt.h | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/ext/pdo_sqlite/sqlite/src/vdbeInt.h b/ext/pdo_sqlite/sqlite/src/vdbeInt.h index 1feb9bab45..7bf2a0ec5d 100644 --- a/ext/pdo_sqlite/sqlite/src/vdbeInt.h +++ b/ext/pdo_sqlite/sqlite/src/vdbeInt.h @@ -260,17 +260,29 @@ struct Set { }; /* -** A Keylist is a bunch of keys into a table. The keylist can -** grow without bound. The keylist stores the ROWIDs of database -** records that need to be deleted or updated. +** A FifoPage structure holds a single page of valves. Pages are arranged +** in a list. */ -typedef struct Keylist Keylist; -struct Keylist { - int nKey; /* Number of slots in aKey[] */ - int nUsed; /* Next unwritten slot in aKey[] */ - int nRead; /* Next unread slot in aKey[] */ - Keylist *pNext; /* Next block of keys */ - i64 aKey[1]; /* One or more keys. Extra space allocated as needed */ +typedef struct FifoPage FifoPage; +struct FifoPage { + int nSlot; /* Number of entries aSlot[] */ + int iWrite; /* Push the next value into this entry in aSlot[] */ + int iRead; /* Read the next value from this entry in aSlot[] */ + FifoPage *pNext; /* Next page in the fifo */ + i64 aSlot[1]; /* One or more slots for rowid values */ +}; + +/* +** The Fifo structure is typedef-ed in vdbeInt.h. But the implementation +** of that structure is private to this file. +** +** The Fifo structure describes the entire fifo. +*/ +typedef struct Fifo Fifo; +struct Fifo { + int nEntry; /* Total number of entries */ + FifoPage *pFirst; /* First page on the list */ + FifoPage *pLast; /* Last page on the list */ }; /* @@ -286,7 +298,7 @@ typedef struct Context Context; struct Context { int lastRowid; /* Last insert rowid (sqlite3.lastRowid) */ int nChange; /* Statement changes (Vdbe.nChanges) */ - Keylist *pList; /* Records that will participate in a DELETE or UPDATE */ + Fifo sFifo; /* Records that will participate in a DELETE or UPDATE */ }; /* @@ -325,7 +337,7 @@ struct Vdbe { Agg *apAgg; /* Array of aggregate contexts */ Agg *pAgg; /* Current aggregate context */ int nCallback; /* Number of callbacks invoked so far */ - Keylist *pList; /* A list of ROWIDs */ + Fifo sFifo; /* A list of ROWIDs */ int contextStackTop; /* Index of top element in the context stack */ int contextStackDepth; /* The size of the "context" stack */ Context *contextStack; /* Stack used by opcodes ContextPush & ContextPop*/ @@ -362,7 +374,6 @@ struct Vdbe { void sqlite3VdbeFreeCursor(Cursor*); void sqlite3VdbeSorterReset(Vdbe*); int sqlite3VdbeAggReset(sqlite3*, Agg *, KeyInfo *); -void sqlite3VdbeKeylistFree(Keylist*); void sqliteVdbePopStack(Vdbe*,int); int sqlite3VdbeCursorMoveto(Cursor*); #if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE) @@ -411,3 +422,7 @@ int sqlite3VdbeOpcodeNoPush(u8); int sqlite3VdbeMemTranslate(Mem*, u8); void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf, int nBuf); int sqlite3VdbeMemHandleBom(Mem *pMem); +void sqlite3VdbeFifoInit(Fifo*); +int sqlite3VdbeFifoPush(Fifo*, i64); +int sqlite3VdbeFifoPop(Fifo*, i64*); +void sqlite3VdbeFifoClear(Fifo*); |