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

Minor performance enhancements to the OP_Affinity opcode.

FossilOrigin-Name: c45cd3b947c0f03a688f827fddb4629a986788f0dd98d5ef899f11e68ff1c202
This commit is contained in:
drh
2017-04-01 20:14:01 +00:00
parent 96a7e28df6
commit 662c50e067
3 changed files with 11 additions and 11 deletions

View File

@@ -2710,18 +2710,18 @@ op_column_out:
*/
case OP_Affinity: {
const char *zAffinity; /* The affinity to be applied */
char cAff; /* A single character of affinity */
zAffinity = pOp->p4.z;
assert( zAffinity!=0 );
assert( pOp->p2>0 );
assert( zAffinity[pOp->p2]==0 );
pIn1 = &aMem[pOp->p1];
while( (cAff = *(zAffinity++))!=0 ){
do{
assert( pIn1 <= &p->aMem[(p->nMem+1 - p->nCursor)] );
assert( memIsValid(pIn1) );
applyAffinity(pIn1, cAff, encoding);
applyAffinity(pIn1, *(zAffinity++), encoding);
pIn1++;
}
}while( zAffinity[0] );
break;
}