diff options
author | drh <drh@noemail.net> | 2014-12-04 16:27:17 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-12-04 16:27:17 +0000 |
commit | 72673a24e2d38c1699d911cfca0203f5e545f78c (patch) | |
tree | 90f4ce666016c55d5f17f3b409f4c1240611e298 /src/resolve.c | |
parent | d8922052b27a3d2d62ccf3cf0ef1ea9b7272124d (diff) | |
download | sqlite-72673a24e2d38c1699d911cfca0203f5e545f78c.tar.gz sqlite-72673a24e2d38c1699d911cfca0203f5e545f78c.zip |
If a table is the right operand of a LEFT JOIN, then any column of that
table can be NULL even if that column as a NOT NULL constraint.
Fix for ticket [6f2222d550f5b0ee7ed].
FossilOrigin-Name: 6f6fcbe4736b9468a495c684d5eebc8bfe5c566a
Diffstat (limited to 'src/resolve.c')
-rw-r--r-- | src/resolve.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolve.c b/src/resolve.c index 8fb580b3a..d4bd548c9 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -320,6 +320,10 @@ static int lookupName( if( pMatch ){ pExpr->iTable = pMatch->iCursor; pExpr->pTab = pMatch->pTab; + assert( (pMatch->jointype & JT_RIGHT)==0 ); /* RIGHT JOIN not (yet) supported */ + if( (pMatch->jointype & JT_LEFT)!=0 ){ + ExprSetProperty(pExpr, EP_CanBeNull); + } pSchema = pExpr->pTab->pSchema; } } /* if( pSrcList ) */ |