From: drh Date: Thu, 21 Nov 2013 00:10:35 +0000 (+0000) Subject: Unpack some fields, adding some space back to the VdbeCursor object, X-Git-Tag: version-3.8.2~69^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fd522ff49b5f889214785301cb08eaedb20682e;p=thirdparty%2Fsqlite.git Unpack some fields, adding some space back to the VdbeCursor object, in order to help the code to run a little faster. FossilOrigin-Name: f8d5efcd7b92492b833b6cd1cb6bec006c6a0809 --- diff --git a/manifest b/manifest index ad39786967..b28f74bcf3 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Reduce\sthe\ssize\sof\sthe\sVdbeCursor\sobject\sfrom\s144\sto\s120\sbytes. -D 2013-11-20T21:51:33.976 +C Unpack\ssome\sfields,\sadding\ssome\sspace\sback\sto\sthe\sVdbeCursor\sobject,\nin\sorder\sto\shelp\sthe\scode\sto\srun\sa\slittle\sfaster. +D 2013-11-21T00:10:35.929 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 8a07bebafbfda0eb67728f4bd15a36201662d1a1 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -280,9 +280,9 @@ F src/update.c c05a0ee658f1a149e0960dfd110f3b8bd846bcb0 F src/utf.c 6fc6c88d50448c469c5c196acf21617a24f90269 F src/util.c 2fa6c821d28bbdbeec1b2a7b091a281c9ef8f918 F src/vacuum.c 3728d74919d4fb1356f9e9a13e27773db60b7179 -F src/vdbe.c b55581dbd26eee6a03a7c673e9080db306fb8113 +F src/vdbe.c fb6007ac59ebebf398ce1709f9cef367bfd15dce F src/vdbe.h c06f0813f853566457ce9cfb1a4a4bc39a5da644 -F src/vdbeInt.h fc6a1ca59e679cb27f55fd2bc7d91cfb963251dd +F src/vdbeInt.h 7cb3c641d42154ea0c66055ca77557005ff4535d F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed F src/vdbeaux.c c592609996435944837b8906fbbcfcfac0714c90 F src/vdbeblob.c 8cd05a5630e6d5563ad017bf82edaf812b28acde @@ -1140,7 +1140,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff -P 0e05679db7aa302a49e087a81f85203844b98cbe -R 25fcd0453526b0fb55425cafc8bedd31 +P 5f9d50688508affd0bc8e4d52e21dacfacdbb5ce +R 11a6306351cf31959d33e284a4627112 U drh -Z 51316cd0cd8c72b5a20c8e69a256a48d +Z 5afd15b6c955a3c65a923acb8d5d260f diff --git a/manifest.uuid b/manifest.uuid index 66bae4760d..b0ba0a8bff 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5f9d50688508affd0bc8e4d52e21dacfacdbb5ce \ No newline at end of file +f8d5efcd7b92492b833b6cd1cb6bec006c6a0809 \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index f01d2cc33c..d50a23fb85 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -3759,7 +3759,7 @@ case OP_Found: { /* jump, in3 */ if( rc!=SQLITE_OK ){ break; } - pC->seekResult = res==0 ? 0 : res<0 ? -1 : +1; + pC->seekResult = res; alreadyExists = (res==0); pC->nullRow = 1-alreadyExists; pC->deferredMoveto = 0; @@ -3813,7 +3813,7 @@ case OP_NotExists: { /* jump, in3 */ pc = pOp->p2 - 1; assert( pC->rowidIsValid==0 ); } - pC->seekResult = res==0 ? 0 : res<0 ? -1 : +1; + pC->seekResult = res; break; } @@ -4036,7 +4036,7 @@ case OP_InsertInt: { i64 iKey; /* The integer ROWID or key for the record to be inserted */ VdbeCursor *pC; /* Cursor to table into which insert is written */ int nZero; /* Number of zero-bytes to append */ - i8 seekResult; /* Result of prior seek or 0 if no USESEEKRESULT flag */ + int seekResult; /* Result of prior seek or 0 if no USESEEKRESULT flag */ const char *zDb; /* database name - used by the update hook */ const char *zTbl; /* Table name - used by the opdate hook */ int op; /* Opcode for update hook: SQLITE_UPDATE or SQLITE_INSERT */ diff --git a/src/vdbeInt.h b/src/vdbeInt.h index 4820df7af6..b1b7f2eacc 100644 --- a/src/vdbeInt.h +++ b/src/vdbeInt.h @@ -61,15 +61,15 @@ struct VdbeCursor { BtCursor *pCursor; /* The cursor structure of the backend */ Btree *pBt; /* Separate file holding temporary table */ KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */ + int seekResult; /* Result of previous sqlite3BtreeMoveto() */ int pseudoTableReg; /* Register holding pseudotable content. */ i16 nField; /* Number of fields in the header */ u16 nHdrParsed; /* Number of header fields parsed so far */ i8 iDb; /* Index of cursor database in db->aDb[] (or -1) */ - i8 seekResult; /* Result of previous sqlite3BtreeMoveto() */ - Bool nullRow:1; /* True if pointing to a row with no data */ - Bool rowidIsValid :1; /* True if lastRowid is valid */ + u8 nullRow; /* True if pointing to a row with no data */ + u8 rowidIsValid; /* True if lastRowid is valid */ + u8 deferredMoveto; /* A call to sqlite3BtreeMoveto() is needed */ Bool useRandomRowid:1;/* Generate new record numbers semi-randomly */ - Bool deferredMoveto:1;/* A call to sqlite3BtreeMoveto() is needed */ Bool isTable:1; /* True if a table requiring integer keys */ Bool isOrdered:1; /* True if the underlying table is BTREE_UNORDERED */ Bool multiPseudo:1; /* Multi-register pseudo-cursor */