Tito Ciuro wrote:
Hi Ben,

What do you mean? Try to reopen the database after VACUUM. That should do it...

The posting seemed to indicate a user was experiencing the 'database schema has changed' during the first INSERT after a VACUUM.

The suggested solution was to close/open the db after the VACUUM.

I've tried creating tables with millions of rows, deleting various amounts of data, VACUUM and then INSERT. I cannot replicate this error. It always works. Possible this was related to an older version of SQLite, or there is some special case of VACUUM which I am not encountering.

The only time I get this message is when another thread executes a query during a VACUUM. I use the 'prepare statement' method, and my guess is that the prepare and execute on one thread, straddle the VACUUM from another, and hence fail.

But maybe I am missing something... :)

Ben




-- Tito

On 02/06/2005, at 9:36, Ben Clewett wrote:

Ben Clewett wrote:

So as I understand the posting. After each VACUUM it is advisable to shutdown and restart SQLite, or run a single INSERT to clear the error...


After a lot of testing, I can find no instance of where SQLite needs restarting, or anything else after a VACUUM. Although maybe some locking may be needed during the VACUUM in a multi-thread scenario.

Ben



I'll do some testing :)
Ben
Tito Ciuro wrote:

Hi Ben,

Check this post and see if it helps: http://www.mail-archive.com/ sqlite-users@sqlite.org/msg04887.html

Regards,

-- Tito

On 01/06/2005, at 12:16, Ben Clewett wrote:


Some extra information:

I also note I run a VACUUM every 50 minutes. Could this result in the "database schema has changed" message I sometimes see? Possibly one thread accessing database during VACUUM?

Kind regards,

Ben Clewett.

Ben Clewett wrote:


Dear SQLite,
I am experiencing a problem. Every so often, say one in 100,000 'SELECT' queries, I get this error:
"database schema has changed"
This is false, the schema has not changed.
Can any person offer a reason why this might be, and possibly a solution to this problem?
I am using SQLite 3.1.6 and storing my database on /dev/shm.
Kind regards,
Ben Clewett.






______________________________________

Tito Ciuro
http://www.webbo.com





______________________________________

Tito Ciuro
http://www.webbo.com


Reply via email to