mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Correct handling of compound foreign key constraints that include the
integer primary key as one of the columns. Ticket [ce7c133ea6cc9ccdc1] FossilOrigin-Name: 53902f7d4a46aa70ecc5bf180a01ff888d52686a
This commit is contained in:
@@ -500,7 +500,8 @@ static void fkScanChildren(
|
||||
if( pIdx ){
|
||||
Column *pCol;
|
||||
iCol = pIdx->aiColumn[i];
|
||||
pCol = &pIdx->pTable->aCol[iCol];
|
||||
pCol = &pTab->aCol[iCol];
|
||||
if( pTab->iPKey==iCol ) iCol = -1;
|
||||
pLeft->iTable = regData+iCol+1;
|
||||
pLeft->affinity = pCol->affinity;
|
||||
pLeft->pColl = sqlite3LocateCollSeq(pParse, pCol->zColl);
|
||||
|
||||
Reference in New Issue
Block a user