(text/x-fossil-wiki)
The following SQL might cause an assertion fault. If it does not, it results
in two rows of the t table having the same rowid, which is database corruption.
<blockquote><pre>
CREATE TABLE t(i INTEGER PRIMARY KEY, a TEXT);
INSERT INTO t VALUES (NULL, 'generates row 1');
REPLACE INTO t VALUES (NULL, 'generates row 2'), (1, 'replaces row 1');
SELECT * FROM t;
</pre></blockquote>
The expected output is:
<blockquote><pre>
1|replaces row 1
2|generates row 2
</pre></blockquote>
The output generated (if there is no assertion fault) is:
<blockquote><pre>
1|generates row 1
1|replaces row 1
</pre></blockquote>
This problem has existed in the code since version 3.8.4 (2014-03-10). The
problem was reported on the mailing list by E. Pasma.
|