1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-19 21:43:15 +03:00

Do not continue an ALTER TABLE tree walk of a subquery if a prior error

is seen in the tree.  Report the problem immediately, without continuing.

FossilOrigin-Name: 01ca865f31c0c817ede7f357401ef76cf311ae662397908464f53e1c147f5b6b
This commit is contained in:
drh
2019-12-20 12:55:21 +00:00
parent 0e5ce8029d
commit 1548d5276f
4 changed files with 13 additions and 10 deletions

View File

@@ -1527,8 +1527,11 @@ static void renameTableFunc(
assert( pSelect->selFlags & SF_View );
pSelect->selFlags &= ~SF_View;
sqlite3SelectPrep(&sParse, pTab->pSelect, &sNC);
if( sParse.nErr ) rc = sParse.rc;
sqlite3WalkSelect(&sWalker, pTab->pSelect);
if( sParse.nErr ){
rc = sParse.rc;
}else{
sqlite3WalkSelect(&sWalker, pTab->pSelect);
}
}
}else{
/* Modify any FK definitions to point to the new table. */