diff options
author | dan <dan@noemail.net> | 2018-08-14 21:05:35 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2018-08-14 21:05:35 +0000 |
commit | 356afab163540a40894a7bc8c3f4dc4c409968c9 (patch) | |
tree | f46a39ce59dd7ed9dcf612ea40c92532eecbc5e2 /src | |
parent | 72238130d09e7a50441932fc03ad5bff8bcb5cc0 (diff) | |
parent | f62e8937acff3a51278537015695b1d2654bb79b (diff) | |
download | sqlite-356afab163540a40894a7bc8c3f4dc4c409968c9.tar.gz sqlite-356afab163540a40894a7bc8c3f4dc4c409968c9.zip |
Fix a problem when renaming an IPK column that is also part of a child key.
FossilOrigin-Name: 6e6a2bfdbbfd4ffc14be88962ff97bf3c626fef9d1a337715d2a4be1a657fb0d
Diffstat (limited to 'src')
-rw-r--r-- | src/alter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alter.c b/src/alter.c index 29ef9e602..89be503fc 100644 --- a/src/alter.c +++ b/src/alter.c @@ -1172,7 +1172,7 @@ static void renameColumnFunc( for(pFKey=sParse.pNewTable->pFKey; pFKey; pFKey=pFKey->pNextFrom){ for(i=0; i<pFKey->nCol; i++){ - if( bFKOnly==0 && pFKey->aCol[i].iFrom==sCtx.iCol ){ + if( bFKOnly==0 && pFKey->aCol[i].iFrom==iCol ){ renameTokenFind(&sParse, &sCtx, (void*)&pFKey->aCol[i]); } if( 0==sqlite3_stricmp(pFKey->zTo, zTable) |