mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Sometimes a TK_COLUMN Expr node can have Expr.pTab==0 if it is a reference
to an expression column in an index on and expression. Fix for ticket [aa98619ad08ddcab]. FossilOrigin-Name: d0da791ba0edfb65186459345e43500d8364a086a5a1651d828fecc1a1dd1edb
This commit is contained in:
@@ -1973,8 +1973,8 @@ int sqlite3ExprCanBeNull(const Expr *p){
|
||||
case TK_BLOB:
|
||||
return 0;
|
||||
case TK_COLUMN:
|
||||
assert( p->pTab!=0 );
|
||||
return ExprHasProperty(p, EP_CanBeNull) ||
|
||||
p->pTab==0 || /* Reference to column of index on expression */
|
||||
(p->iColumn>=0 && p->pTab->aCol[p->iColumn].notNull==0);
|
||||
default:
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user