/ View Ticket
Ticket Hash: 367a86e28859f1ffe2af239a4f02752cf8687b78
Title: Incorrect result for predicate on rtree table
Status: Fixed Type: Feature_Request
Severity: Minor Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-12-06 13:12:17
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-12-06 11:17:10: (text/x-fossil-wiki)
Consider the following test case:

CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
SELECT * FROM rt0 WHERE rt0.c1 > '-1'; -- unexpected: row is fetched

The row is fetched, even though the predicate should evaluate to FALSE:

SELECT rt0.c1 > '-1' FROM rt0; -- 0

I think that this worked previously.

drh added on 2019-12-06 13:12:17: (text/x-fossil-wiki)
In addition to code changes to be more pedantic about type affinity in
rtree, the documentation has been updated.