1
0
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:
drh
2010-07-29 01:50:38 +00:00
parent 078e4084e9
commit 6cbda64d07
4 changed files with 58 additions and 12 deletions

View File

@@ -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);