diff options
author | dan <Dan Kennedy> | 2021-03-16 11:11:07 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2021-03-16 11:11:07 +0000 |
commit | 776a578c2162fa3363ea377ffbad45b6e65161cc (patch) | |
tree | f4170cd1cba6cd6bce69b7aa10aed855d7def40b /src | |
parent | a7eaa518f83d1ff4660b720038ccba45c1f4c758 (diff) | |
download | sqlite-776a578c2162fa3363ea377ffbad45b6e65161cc.tar.gz sqlite-776a578c2162fa3363ea377ffbad45b6e65161cc.zip |
Fix a problem with ALTER TABLE RENAME COLUMN when used on a schema that features generated columns.
FossilOrigin-Name: 0e255b26872b50581d470952dd98e21dd82d081885006f58d49daa4b4576b35d
Diffstat (limited to 'src')
-rw-r--r-- | src/alter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/alter.c b/src/alter.c index e28f22d6a..c0797db45 100644 --- a/src/alter.c +++ b/src/alter.c @@ -1436,12 +1436,12 @@ static void renameColumnFunc( for(pIdx=sParse.pNewIndex; pIdx; pIdx=pIdx->pNext){ sqlite3WalkExprList(&sWalker, pIdx->aColExpr); } - } #ifndef SQLITE_OMIT_GENERATED_COLUMNS - for(i=0; i<sParse.pNewTable->nCol; i++){ - sqlite3WalkExpr(&sWalker, sParse.pNewTable->aCol[i].pDflt); - } + for(i=0; i<sParse.pNewTable->nCol; i++){ + sqlite3WalkExpr(&sWalker, sParse.pNewTable->aCol[i].pDflt); + } #endif + } for(pFKey=sParse.pNewTable->pFKey; pFKey; pFKey=pFKey->pNextFrom){ for(i=0; i<pFKey->nCol; i++){ |