SQLite

View Ticket
Login
2013-08-29
13:15
Cherrypick of [c1152bdcbb] and fix for [9f2eb3abac]: Have the whereShortCut() planner ignore indexes with more than four columns. (check-in: c3f75941e5 user: drh tags: branch-3.8.0)
13:12 Fixed ticket [9f2eb3abac]: A lookup on a primary key or unique index with more than 4 fields can cause a crash plus 5 other changes (artifact: c4f62d4593 user: drh)
10:46
Candidate fix for [9f2eb3abac]: Have the whereShortCut() planner ignore indexes with more than four columns. (check-in: c1152bdcbb user: dan tags: trunk)
08:50 New ticket [9f2eb3abac] A lookup on a primary key or unique index with more than 4 fields can cause a crash. (artifact: 4642c1bd95 user: dan)

Ticket Hash: 9f2eb3abac9b83222f8a469011eb35138c47472c
Title: A lookup on a primary key or unique index with more than 4 fields can cause a crash
Status: Fixed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2013-08-29 13:12:10
11.85 years ago
Created: 2013-08-29 08:50:43
11.85 years ago
Version Found In: 3.8.0
User Comments:
dan added on 2013-08-29 08:50:43:

The following query causes a buffer overflow in the NGQP module. Any query with a single table in the FROM clause that may use more than four fields of a PRIMARY KEY or UNIQUE index is similarly vulnerable.

  CREATE TABLE t1(a,b,c,d,e, PRIMARY KEY(a,b,c,d,e));
  SELECT * FROM t1 WHERE a=? AND b=? AND c=? AND d=? AND e=?;

3.8.0 is the only version with this bug. Earlier versions are Ok.