drh added on 2016-10-03 02:01:43:
The sqlite_sequence entry for table t2 is not initialized by the final
INSERT in the following SQL:
CREATE TABLE t1(a INTEGER PRIMARY KEY AUTOINCREMENT, b UNIQUE);
INSERT INTO t1 VALUES(888,9999);
CREATE TABLE t2(x INTEGER PRIMARY KEY AUTOINCREMENT, y UNIQUE);
INSERT INTO t2 SELECT * FROM t1;
SELECT * FROM sqlite_sequence;
Bisecting shows that the problem was introduced on on 2009-06-23 by
check-in [1330993de8] and first appeared in version 3.6.16.
This problem was reported on the mailing list by Clemens Ladisch.