mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Avoid unnecessary calls to applyAffinity() during INSERT and UPDATE
operations, especially for table that have indices and tables for which all columns have affinity "NONE". FossilOrigin-Name: 35b4d6e938164fabaf30b504c54cfd9a69060cee
This commit is contained in:
@@ -2498,7 +2498,6 @@ case OP_Affinity: {
|
||||
while( (cAff = *(zAffinity++))!=0 ){
|
||||
assert( pIn1 <= &p->aMem[(p->nMem-p->nCursor)] );
|
||||
assert( memIsValid(pIn1) );
|
||||
ExpandBlob(pIn1);
|
||||
applyAffinity(pIn1, cAff, encoding);
|
||||
pIn1++;
|
||||
}
|
||||
@@ -2576,8 +2575,9 @@ case OP_MakeRecord: {
|
||||
if( zAffinity ){
|
||||
pRec = pData0;
|
||||
do{
|
||||
applyAffinity(pRec, *(zAffinity++), encoding);
|
||||
}while( (++pRec)<=pLast );
|
||||
applyAffinity(pRec++, *(zAffinity++), encoding);
|
||||
assert( zAffinity[0]==0 || pRec<=pLast );
|
||||
}while( zAffinity[0] );
|
||||
}
|
||||
|
||||
/* Loop through the elements that will make up the record to figure
|
||||
|
Reference in New Issue
Block a user