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

Simplifications to the way UnpackedRecord objects are allocated. Smaller

and faster code that also fixes a subtle (currently unreachable) bug.

FossilOrigin-Name: f7ab01f254cd9d7006b8dec29adb234a671b8e6f
This commit is contained in:
drh
2016-12-21 19:45:54 +00:00
parent f99dd359d0
commit a582b01698
8 changed files with 30 additions and 60 deletions

View File

@@ -1657,10 +1657,9 @@ static UnpackedRecord *vdbeUnpackRecord(
int nKey,
const void *pKey
){
char *dummy; /* Dummy argument for AllocUnpackedRecord() */
UnpackedRecord *pRet; /* Return value */
pRet = sqlite3VdbeAllocUnpackedRecord(pKeyInfo, 0, 0, &dummy);
pRet = sqlite3VdbeAllocUnpackedRecord(pKeyInfo);
if( pRet ){
memset(pRet->aMem, 0, sizeof(Mem)*(pKeyInfo->nField+1));
sqlite3VdbeRecordUnpack(pKeyInfo, nKey, pKey, pRet);