SQLite

View Ticket
Login
2018-04-09
15:58 Fixed ticket [2b8aed9f]: Misbehavior in the FTS5 xBestIndex method plus 5 other changes (artifact: 89584454 user: drh)
15:57
Enhance the query planner so that it detects when the xBestIndex method of a virtual table gives out-of-sequence argvIndex values and reports an error. Secondary fix for ticket [2b8aed9f7c9e6]. (check-in: 9506ec14 user: drh tags: trunk)
14:26
Fix the fts5 xBestIndex method so that it is not confused by "IS", "!=", "REGEXP", "GLOB" or "LIKE" operators. Fix for ticket [2b8aed9f]. (check-in: a0ca4ddb user: dan tags: trunk)
14:20 New ticket [2b8aed9f] Misbehavior in the FTS5 xBestIndex method. (artifact: e5d67080 user: drh)

Ticket Hash: 2b8aed9f7c9e61e8d417ce1994b7ca75d9eda2cb
Title: Misbehavior in the FTS5 xBestIndex method
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2018-04-09 15:58:07
Version Found In: 3.23.0
User Comments:
drh added on 2018-04-09 14:20:30:

The xBestIndex method of the FTS5 virtual table misbehaves in the following input:

CREATE VIRTUAL TABLE ft USING fts5(x);
SELECT * FROM ft WHERE ft.rowid IS NULL;

The above results in an error: "ft.xBestIndex malfunction". In other queries, this malfunction might result in memory leaks or even NULL pointer dereferences.