Hello,
I've encountered an error running 3.7.8 and 3.7.7.1 that seems rather strange.
It's reproducible so far as I know.
CREATE VIRTUAL TABLE fts USING fts3( tags TEXT);
INSERT INTO fts (tags) VALUES ('tag1');
SELECT * FROM fts WHERE tags MATCH 'tag1';
You can run an UPDATE to change the value in the tags field and rerun that
SELECT statement without error. Do not create a second row, as this error
seems to appear only when there is a single row in the virtual table. Now
close the database and reopen it, then try the following statements.
UPDATE fts SET tags = 'tag1' WHERE rowid = 1;
SELECT * FROM fts WHERE tags MATCH 'tag1';
That SELECT returns "Error: database disk image is malformed". Taking a dump
before and after the UPDATE shows that a segdir entry is being assigned a
different value despite the tags entry remaining exactly the same. Changing
the value further does not rectify the situation, nor does using a different
string. Running a "PRAGMA integrity_check" returns "ok", so the underlying
database is fine (and you can use other tables and any rows you insert after
just fine). Inserting a new row and then changing the value rectifies the
problem. Tests seem to indicate that it doesn't matter what the rowid is (or
the sequence of inserts and deletes have been run on the virtual table
beforehand), the problem appears when changing the only row in the virtual
table.
I've reproduced this using a CLI compiled from the autoconf source amalgamation
on RHEL 5.5 (in a VM) and the precompiled Windows CLI.
Is anyone able to help? (I haven't accidentally posted this to the wrong list
have I?)
- Michael
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users