SQLite
View Ticket
Not logged in
Ticket UUID: 094d39a4c95ee4abbc417f04214617675ba15c63
Title: Assertion fault on CREATE TABLE ... AS SELECT ...
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2014-11-05 15:57:49
Version Found In: 3.8.7.1
User Comments:
drh added on 2014-11-05 14:53:49: (text/x-fossil-wiki)
The following SQL gives an assertion fault while
running the SELECT in the CREATE TABLE statement:

<blockquote><verbatim>
CREATE TABLE t1(a TEXT);
INSERT INTO t1(a) VALUES(1),(2);
CREATE TABLE t2(x TEXT, y TEXT);
INSERT INTO t2(x,y) VALUES(3,4);
CREATE TEMP TABLE t3 AS
  SELECT a AS p, coalesce(y,a) AS q FROM t1 LEFT JOIN t2 ON a=x;
</verbatim></blockquote>

This problem was reported on the sqlite-users@sqlite.org mailing list by
Nissl Reinhard.  Bisecting shows that the problem was introduced by
check-in [36b613ccf0ddb764a].

drh added on 2014-11-05 15:44:20: (text/x-fossil-wiki)
This appears to be the same underlying problem as 
ticket [43107840f1c02], just in a different spot in the code.