Fix a bug causing ALTER TABLE RENAME COLUMN to fail when renaming an IPK
column that is used in a CHECK constraint. FossilOrigin-Name: 6595c8811f13719d0aed8041abc7e1cade41c57427bcbf3503e2e42408eaa03b
This commit is contained in:
@@ -1023,6 +1023,10 @@ static void renameColumnFunc(
|
||||
&sParse, (void*)sParse.pNewTable->aCol[sCtx.iCol].zName
|
||||
);
|
||||
sCtx.nList = 1;
|
||||
assert( sCtx.iCol>=0 );
|
||||
if( sParse.pNewTable->iPKey==sCtx.iCol ){
|
||||
sCtx.iCol = -1;
|
||||
}
|
||||
sqlite3WalkExprList(&sWalker, sParse.pNewTable->pCheck);
|
||||
for(pIdx=sParse.pNewTable->pIndex; pIdx; pIdx=pIdx->pNext){
|
||||
sqlite3WalkExprList(&sWalker, pIdx->aColExpr);
|
||||
|
||||
Reference in New Issue
Block a user