Ticket Hash: | 002caede898aee4dc531ae9995281c2b8b03a1c6 | |||
Title: | LEFT JOIN with OR terms in WHERE clause causes assertion fault | |||
Status: | Closed | Type: | Code_Defect | |
Severity: | Critical | Priority: | Immediate | |
Subsystem: | Unknown | Resolution: | Fixed | |
Last Modified: | 2011-09-19 17:37:54 | |||
Version Found In: | 3.7.7.1 | |||
Description: | ||||
The following SQL code causes an assertion fault in the VDBE:
CREATE TABLE t1(a,b,c,d); CREATE TABLE t2(e,f); INSERT INTO t1 VALUES(1,2,3,4); INSERT INTO t2 VALUES(10,-8); CREATE INDEX t1a ON t1(a); CREATE UNIQUE INDEX t1b ON t1(b); CREATE TABLE t3(g); INSERT INTO t3 VALUES(4); CREATE TABLE t4(h); INSERT INTO t4 VALUES(5); It appears that both LEFT JOINs, the OR operator using indices in the WHERE clause, and the IN operator with unflattenable nested subqueries and located on the right-hand side of the OR are all necessary conditions for this problem to occur. In other words, the problem is very obscure. The problem appears to have been introduced by check-in [2c2de25266] which was a bug-fix for a similar problem described by ticket [31338dca7e3d]. This problem might be considered a particular case of the prior ticket [31338dca7e3d] that was never fixed. The problem first appeared in release 3.6.22. |