SQLite

View Ticket
Login
Ticket Hash: 7929c1efb2d67e9818ceb65527e318d1ad1098ab
Title: Debug assertion constructAutomaticIndex: Assertion `!ExprHasProperty(pExpr, EP_FromJoin) || pExpr->iRightJoinTable!=pSrc->iCursor || pLoop->prereq!=0' failed
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-12-22 20:03:44
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-12-22 10:16:44: (text/x-fossil-wiki)
Consider the following test case:

<pre>
CREATE VIRTUAL TABLE vt0 USING fts5(c0);
CREATE TABLE t0(c0);
CREATE VIEW v0(c0) AS SELECT 0 GROUP BY 1;
SELECT * FROM v0, t0 LEFT JOIN vt0 ON vt0.c0 MATCH 1 WHERE v0.c0 == 0 -- sqlite3.c:143296: constructAutomaticIndex: Assertion `!ExprHasProperty(pExpr, EP_FromJoin) || pExpr->iRightJoinTable!=pSrc->iCursor || pLoop->prereq!=0' failed.
</pre>

When compiling with -DSQLITE_DEBUG, the SELECT triggers an assertion error.