mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Always use the symbolic name SQLITE_IDXTYPE_PRIMARYKEY rather than a hard-coded
magic number 2. FossilOrigin-Name: 55d43adc894a6b1e0f77bf481dad6dd604a0dc0022e72bbf2e3037f97351971e
This commit is contained in:
@@ -1669,7 +1669,9 @@ void sqlite3GenerateConstraintChecks(
|
||||
sqlite3VdbeAddOp3(v, OP_MakeRecord, regIdx, pIdx->nColumn, aRegIdx[ix]);
|
||||
VdbeComment((v, "for %s", pIdx->zName));
|
||||
#ifdef SQLITE_ENABLE_NULL_TRIM
|
||||
if( pIdx->idxType==2 ) sqlite3SetMakeRecordP5(v, pIdx->pTable);
|
||||
if( pIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){
|
||||
sqlite3SetMakeRecordP5(v, pIdx->pTable);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* In an UPDATE operation, if this index is the PRIMARY KEY index
|
||||
@@ -2410,7 +2412,7 @@ static int xferOptimization(
|
||||
sqlite3VdbeAddOp1(v, OP_SeekEnd, iDest);
|
||||
}
|
||||
}
|
||||
if( !HasRowid(pSrc) && pDestIdx->idxType==2 ){
|
||||
if( !HasRowid(pSrc) && pDestIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){
|
||||
idxInsFlags |= OPFLAG_NCHANGE;
|
||||
}
|
||||
sqlite3VdbeAddOp2(v, OP_IdxInsert, iDest, regData);
|
||||
|
||||
Reference in New Issue
Block a user