On Fri, Feb 10, 2012 at 5:20 AM, Julien LF <lefoll.jul...@gmail.com> wrote:

> Hello,
>
> I'm testing the fts extensions and experiencing a 'database disk image
> is malformed' problem that I can reproduce the following way:
> - Create a database
> - Open the database to insert/update rows. 'match' queries work at this
> point
> - Close the database
> - Open the database. 'match' queries still work at this point
> - Update a row
> - 'match' queries generate a 'database disk image is malformed'
> message, but normal selects work fine.
>
> This is sqlite 3.7.7.1 on NetBSD 5.1. I tried both fts3 and fts4.
>
> You'll find the schema below, followed by the complete detailed steps
> to produce the error. Is there something I'm missing?
>
> Regards,
> Julien
>
> CREATE VIRTUAL TABLE page USING fts4 (
>    url,
>    title,
>    content
> );
>
> vnetbsd$ sqlite3 wiki.db < ./schema.sql
> vnetbsd$ sqlite3 ./wiki.db
> SQLite version 3.7.7.1 2011-06-28 17:39:05
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> insert into page(url,title,content)
> values("intro","intro","intro");
> sqlite> select * from page where url match 'intro';
> intro|intro|intro
> sqlite> update page set url="intro", title="intro", content="introm"
> where rowid=1;
> sqlite> select * from page where url match 'intro';
> intro|intro|introm
> sqlite> .q
> vnetbsd$ sqlite3 ./wiki.db
> SQLite version 3.7.7.1 2011-06-28 17:39:05
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> select * from page where url match 'intro';
> intro|intro|introm
> sqlite> update page set url="intro", title="intro", content="intro"
> where rowid=1;
> sqlite> select * from page where url match 'intro';
> Error: database disk image is malformed
> sqlite> select * from page;
> intro|intro|intro
>
Did you try surrounding them strings with single quotes, instead ?
--
   --
      --
         --ô¿ô--
        K e V i N
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to