1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Minor changes to the core of OP_Column for performance and to clarify the

critical path.

FossilOrigin-Name: 868394761e41b7483a5874426ee052dfb3a9e2be
This commit is contained in:
drh
2012-03-28 16:14:50 +00:00
parent dda5c08bf6
commit ac5e749be8
3 changed files with 10 additions and 8 deletions

View File

@@ -2381,11 +2381,12 @@ case OP_Column: {
if( aOffset[p2] ){
assert( rc==SQLITE_OK );
if( zRec ){
/* This is the common case where the whole row fits on a single page */
VdbeMemRelease(pDest);
sqlite3VdbeSerialGet((u8 *)&zRec[aOffset[p2]], aType[p2], pDest);
}else{
/* This branch happens only when the row overflows onto multiple pages */
t = aType[p2];
len = sqlite3VdbeSerialTypeLen(t);
if( (pOp->p5 & (OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG))!=0
&& ((t>=12 && (t&1)==0) || (pOp->p5 & OPFLAG_TYPEOFARG)!=0)
){
@@ -2396,6 +2397,7 @@ case OP_Column: {
** will work for everything else. */
zData = t<12 ? (char*)&payloadSize64 : 0;
}else{
len = sqlite3VdbeSerialTypeLen(t);
sqlite3VdbeMemMove(&sMem, pDest);
rc = sqlite3VdbeMemFromBtree(pCrsr, aOffset[p2], len, pC->isIndex,
&sMem);