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 commands on database schemas that contain expressions of the form "<expr> NOT NULL" or "<expr> IS NULL" that can be evaluated at prepare time.

FossilOrigin-Name: d2630ffafa077b8cfd75110b6b73da30f780edc920d2788769a4dc747f09d3f6
This commit is contained in:
dan
2021-03-03 11:00:31 +00:00
parent bb05976dac
commit 3083d5f5ea
4 changed files with 29 additions and 12 deletions

View File

@@ -807,7 +807,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
anRef[i] = p->nRef;
}
sqlite3WalkExpr(pWalker, pExpr->pLeft);
if( 0==sqlite3ExprCanBeNull(pExpr->pLeft) ){
if( 0==sqlite3ExprCanBeNull(pExpr->pLeft) && !IN_RENAME_OBJECT ){
if( pExpr->op==TK_NOTNULL ){
pExpr->u.zToken = "true";
ExprSetProperty(pExpr, EP_IsTrue);