1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix a problem with using ALTER TABLE to rename a table or column when the

database schema contains a trigger or view that itself contains an expression
 "<column> AND 0".

FossilOrigin-Name: 908ff7fffa302255a74e2334ca3a1779ed43acb0268fce5a83a56fd16794dc88
This commit is contained in:
dan
2019-01-19 14:07:37 +00:00
parent 225b05795f
commit 93b6c1666d
4 changed files with 18 additions and 9 deletions

View File

@@ -850,7 +850,7 @@ Expr *sqlite3PExpr(
Expr *pRight /* Right operand */
){
Expr *p;
if( op==TK_AND && pParse->nErr==0 ){
if( op==TK_AND && pParse->nErr==0 && !IN_RENAME_OBJECT ){
/* Take advantage of short-circuit false optimization for AND */
p = sqlite3ExprAnd(pParse->db, pLeft, pRight);
}else{