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

Loop optimization in the OP_MakeRecord opcode.

FossilOrigin-Name: 47a61fbd63928021098fbe492283f1afda7c293b3b2706c001192ae4ff1b2cbe
This commit is contained in:
drh
2022-04-01 20:39:40 +00:00
parent 3b8b5be3b7
commit 759e507ce5
3 changed files with 11 additions and 9 deletions

View File

@@ -3377,7 +3377,7 @@ case OP_MakeRecord: {
zHdr += putVarint32(zHdr, nHdr);
assert( pData0<=pLast );
pRec = pData0;
do{
while( 1 /*exit-by-break*/ ){
serial_type = pRec->uTemp;
/* EVIDENCE-OF: R-06529-47362 Following the size varint are one or more
** additional varints, one per column. */
@@ -3385,7 +3385,9 @@ case OP_MakeRecord: {
/* EVIDENCE-OF: R-64536-51728 The values for each column in the record
** immediately follow the header. */
zPayload += sqlite3VdbeSerialPut(zPayload, pRec, serial_type); /* content */
}while( (++pRec)<=pLast );
if( pRec==pLast ) break;
pRec++;
}
assert( nHdr==(int)(zHdr - (u8*)pOut->z) );
assert( nByte==(int)(zPayload - (u8*)pOut->z) );