I testad on sqlite and sorry you was corrent i got en error messages.
// Anders
George Mavroudes skrev:
I was with the impression that you cannot call VACUUM from within a
Transaction. I conclude this by reading the code.
Will this work?
GM
-----Original Message-----
From: Anders Persson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 02, 2006 10:33 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Vacuum Command
I am new to SQLITE but in some other database vacuum want to have full
controll test with
Transaction as
BEGIN EXCLUSIVE TRANSACTION test
VACUUM [tableName]
END TRANSACTION test
// Anders
George Mavroudes skrev:
Sorry for the omission and thanks for the quick response.
-We are using sqlite 2.8.16
-In all other cases I can get a human readable message but with this case
the error message is blank
More info to the Original Question:
- The VACUUM command returns asynchronously success but later on other
threads return the database error 1.
- Tracing back I find another thread accessing record in a different table
causing this error.
- If I remove the VACUUM command and simply do the DELETE only, the error
is
not observed
Addition to the original Question:
If I delete all records from a [tableName] and then execute the VACUUM
command, will this temporarily delete the table (causing a SCHEMA_CHANGE)
and then add this table back into the db?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 02, 2006 10:08 AM
To: George Mavroudes
Subject: Re: [sqlite] Vacuum Command
GM> hi,
GM> - I am pretty new to SQLITE and I am having a problem with
the
GM> following sequence of commands:
GM> - DELETE FROM [tableName]
GM> - VACUUM [tableName]
GM> The project I am working on has multiple threads Reading / Writing to
this
GM> table and other tables, and after inserting the VACUUM command to
reclaim
GM> space I get an SQLITE_ERROR 0x00001.
GM> Any suggestions why I get this error?
First you could try calling sqlite3_errmsg() to get a "human readable"
error message which might contain useful information.
Second i'd try without the tablename, i think that's not used any
longer (assuming you're using a 3.x version)
Eric