SQLite

View Ticket
Login
Ticket Hash: 5eadca17c4dde90cd72c384fb269ace796163008
Title: Debug assertion rtreeRelease: Assertion `pRtree->nNodeRef==0 || pRtree->bCorrupt' failed
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Extensions Resolution: Fixed
Last Modified: 2019-12-23 20:42:05
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-12-23 20:03:07:

Consider the following test case:

CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
CREATE TABLE t0(c0);
INSERT INTO t0 VALUES (0), (1);
INSERT INTO rt0(c0) VALUES (0), (1);
CREATE VIEW v0 AS SELECT 0 LIMIT 0;
SELECT * FROM t0 LEFT JOIN rt0 INNER JOIN v0; -- sqlite3.c:185720: rtreeRelease: Assertion `pRtree->nNodeRef==0 || pRtree->bCorrupt' failed.

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