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

Small size reduction and performance improvement in the

sqlite3VdbeMemFromBtree() interface used to pull content out of the b-tree
and into an sqlite3_value object.

FossilOrigin-Name: ae6dd8d3e921670ee6450453b54245dd71bcfff3fd1bc7fdb7cf4cf9585c3375
This commit is contained in:
drh
2020-02-05 18:28:17 +00:00
parent 3cdc820544
commit 2a74006087
6 changed files with 22 additions and 24 deletions

View File

@@ -2713,7 +2713,7 @@ case OP_Column: {
/* Make sure zData points to enough of the record to cover the header. */
if( pC->aRow==0 ){
memset(&sMem, 0, sizeof(sMem));
rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, 0, aOffset[0], &sMem);
rc = sqlite3VdbeMemFromBtreeZeroOffset(pC->uc.pCursor,aOffset[0],&sMem);
if( rc!=SQLITE_OK ) goto abort_due_to_error;
zData = (u8*)sMem.z;
}else{
@@ -5209,7 +5209,7 @@ case OP_RowData: {
goto too_big;
}
testcase( n==0 );
rc = sqlite3VdbeMemFromBtree(pCrsr, 0, n, pOut);
rc = sqlite3VdbeMemFromBtreeZeroOffset(pCrsr, n, pOut);
if( rc ) goto abort_due_to_error;
if( !pOp->p3 ) Deephemeralize(pOut);
UPDATE_MAX_BLOBSIZE(pOut);