This crash (bus error) also occurs when the experiment is done the other way around. A standard sqlite3_sequence table is then renamed and no longer exists as such. And it will not reappear.. It is generous that a pragma writable_schema lets us do these experiments.

$ rm test.db; sqlite3 test.db< test1.sql
CREATE TABLE ttt(id INTEGER PRIMARY KEY AUTOINCREMENT, data TEXT);
INSERT INTO ttt(data) VALUES('xx');
PRAGMA writable_schema=1;
UPDATE sqlite_master
SET name='x_sequence',
    tbl_name='x_sequence',
    sql=REPLACE(sql, 'sqlite_sequence', 'x_sequence')
WHERE name= 'sqlite_sequence';
$
$ sqlite3 test.db< test2.sql
INSERT INTO ttt(data) VALUES('yy');
Bus error
$

Abroży Nieprzełoży wrote:

I'm not working on anything specific, just experimenting, so you don't
have to rush :)


2018-05-20 21:53 GMT+02:00, Richard Hipp:
Thank you for the bug report.

I agree that this is a problem that needs to be fixed, and it will be
fixed before the next release.  However, the problem arises in a part
of the code where we must move cautiously to avoid a performance
regression. Further, your specific problem suggests an entire new
class of problems that need to be investigated and carefully tested.
So fixing this will take some time.

The bug has been in the code since version 3.8.7 (2014-10-17).  I
think you can wait a few days for the fix.



On 5/19/18, Abroży Nieprzełoży <abrozynieprzelozy314...@gmail.com> wrote:
C:\test>sqlite3 test.db
SQLite version 3.24.0 2018-05-18 17:58:33
Enter ".help" for usage hints.
sqlite> .version
SQLite 3.24.0 2018-05-18 17:58:33
c6071ac99cfa4b6272ac4d739fc61a85acb544f6c1c2ae67b31e92aadcc995bd
zlib version 1.2.11
msvc-1912
sqlite> CREATE TABLE xqlite_sequence(name TEXT PRIMARY KEY, seq
INTEGER) WITHOUT ROWID;
sqlite> INSERT INTO xqlite_sequence VALUES('ttt', 1);
sqlite> PRAGMA writable_schema=1;
sqlite> UPDATE sqlite_master SET name='sqlite_sequence',
tbl_name='sqlite_sequence', sql='CREATE TABLE sqlite_sequence(name
TEXT PRIMARY KEY, seq INTEGER) WITHOUT ROWID' WHERE
name='xqlite_sequence';
sqlite> .exit

C:\test>sqlite3 test.db
SQLite version 3.24.0 2018-05-18 17:58:33
Enter ".help" for usage hints.
sqlite> CREATE TABLE ttt(id INTEGER PRIMARY KEY AUTOINCREMENT, data TEXT);
sqlite> .exit

C:\test>sqlite3 test.db
SQLite version 3.24.0 2018-05-18 17:58:33
Enter ".help" for usage hints.
sqlite> INSERT INTO ttt(data) VALUES('xx');



--
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to