1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-09-09 21:09:38 +03:00

Avoid incorrectly replacing tokens that refer to a column being renamed via an

alias. For example, do not overwrite "xyz" when "a" is renamed in "CREATE VIEW
v1 AS SELECT a AS xyz FROM tbl WHERE xyz=1"

FossilOrigin-Name: ad072a835f97ff418f5919d94f547ce8afb4fc7c7b590deba41f1e62136a79ac
This commit is contained in:
dan
2018-08-24 16:04:26 +00:00
parent 355f2e02e9
commit 1b0c5de434
5 changed files with 31 additions and 11 deletions

View File

@@ -436,6 +436,9 @@ static int lookupName(
cnt = 1;
pMatch = 0;
assert( zTab==0 && zDb==0 );
if( IN_RENAME_COLUMN ){
sqlite3RenameTokenRemap(pParse, 0, (void*)pExpr);
}
goto lookupname_end;
}
}