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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user