mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Fix a problem in fkey.c when a child key is the IPK of its table.
FossilOrigin-Name: 8a000a8aae4d356e68acf2bc1788d2c40279522c
This commit is contained in:
@@ -310,7 +310,7 @@ static void fkLookupParent(
|
||||
if( pIdx==0 ){
|
||||
/* If pIdx is NULL, then the parent key is the INTEGER PRIMARY KEY
|
||||
** column of the parent table (table pTab). */
|
||||
int iReg = pFKey->aCol[0].iFrom + regData + 1;
|
||||
int iReg = aiCol[0] + regData + 1;
|
||||
sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);
|
||||
sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, iReg);
|
||||
sqlite3VdbeAddOp2(v, OP_Goto, 0, iOk);
|
||||
|
||||
Reference in New Issue
Block a user