summaryrefslogtreecommitdiff
path: root/src/vdbesort.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2012-09-20 18:34:42 -0400
committerHans-Christoph Steiner <hans@eds.org>2012-09-20 18:34:42 -0400
commit734b4f890763e4efafe865ba476c43cc8d1a2214 (patch)
treed561d2fad0788619f4b8e230073f6af1d416934e /src/vdbesort.c
parent396b08286e7bb56e0e6440aaf1345c18e72ee22e (diff)
parent487e15dc239ccdb3344d1c99ce120e872bab4a74 (diff)
Merge tag 'upstream/2.0.6'
Upstream version 2.0.6
Diffstat (limited to 'src/vdbesort.c')
-rw-r--r--src/vdbesort.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vdbesort.c b/src/vdbesort.c
index c449997..afea1f5 100644
--- a/src/vdbesort.c
+++ b/src/vdbesort.c
@@ -93,17 +93,17 @@ typedef struct SorterRecord SorterRecord;
** being merged (rounded up to the next power of 2).
*/
struct VdbeSorter {
+ i64 iWriteOff; /* Current write offset within file pTemp1 */
+ i64 iReadOff; /* Current read offset within file pTemp1 */
int nInMemory; /* Current size of pRecord list as PMA */
int nTree; /* Used size of aTree/aIter (power of 2) */
+ int nPMA; /* Number of PMAs stored in pTemp1 */
+ int mnPmaSize; /* Minimum PMA size, in bytes */
+ int mxPmaSize; /* Maximum PMA size, in bytes. 0==no limit */
VdbeSorterIter *aIter; /* Array of iterators to merge */
int *aTree; /* Current state of incremental merge */
- i64 iWriteOff; /* Current write offset within file pTemp1 */
- i64 iReadOff; /* Current read offset within file pTemp1 */
sqlite3_file *pTemp1; /* PMA file 1 */
- int nPMA; /* Number of PMAs stored in pTemp1 */
SorterRecord *pRecord; /* Head of in-memory record list */
- int mnPmaSize; /* Minimum PMA size, in bytes */
- int mxPmaSize; /* Maximum PMA size, in bytes. 0==no limit */
UnpackedRecord *pUnpacked; /* Used to unpack keys */
};
@@ -114,10 +114,10 @@ struct VdbeSorter {
struct VdbeSorterIter {
i64 iReadOff; /* Current read offset */
i64 iEof; /* 1 byte past EOF for this iterator */
- sqlite3_file *pFile; /* File iterator is reading from */
int nAlloc; /* Bytes of space at aAlloc */
- u8 *aAlloc; /* Allocated space */
int nKey; /* Number of bytes in key */
+ sqlite3_file *pFile; /* File iterator is reading from */
+ u8 *aAlloc; /* Allocated space */
u8 *aKey; /* Pointer to current key */
};