On Tue, 2007-07-24 at 04:22 -0700, scoobyjh wrote:
> With OS_UNIX version 3.4.0 (AMALGAMATION), I do the following:
> 
> a) open a database file, it contains one table with 3 records in it.
> b) insert 9997 records in side a begin/end transaction
> c) delete 9997 records
> d) vacuum the database
> e) close the database file
> 
> Whether I use VACUUM on it's own or VACUUM table-name, I get this error:
> 
> SQL error: SQL logic error or missing database
> 
> I have no views and I havn't changed the schema.
> Any ideas?

What are you doing this with? An application, or via the sqlite
shell?

Vacuum creates a temporary database file, usually in /var/tmp/.
Is there sufficient free space there (and are the permissions
sane)? In this case "sufficient free space" means enough space 
to make a copy of the original db file.

Dan.
 

> 
> 
> Preston Zaugg wrote:
> > 
> > Incase anybody runs into this in the future... I found the cause of this 
> > problem... I had a view that was pointing to a column of the table that no 
> > longer exsists. As soon as i dropped the view i was able to vacuum the 
> > database without error.
> > 
> > --Preston
> > ----- Original Message ----- 
> > From: "Preston Zaugg" <[EMAIL PROTECTED]>
> > To: <sqlite-users@sqlite.org>
> > Sent: Tuesday, October 04, 2005 10:58 AM
> > Subject: RE: [sqlite] SQL logic error when running vacuum;
> > 
> > 
> >> Well, based on your comment i tried a vacuum from the API and i still get 
> >> the error.
> >>
> >> ----Original Message Follows----
> >> From: "Cariotoglou Mike" <[EMAIL PROTECTED]>
> >> Reply-To: sqlite-users@sqlite.org
> >> To: <sqlite-users@sqlite.org>
> >> Subject: RE: [sqlite] SQL logic error when running vacuum;
> >> Date: Tue, 4 Oct 2005 18:46:27 +0300
> >>
> >> as a matter of fact, I have also noticed that using the vaccum command
> >> from the command-line interface does bring this error up sometimes.
> >> however, since I use the graphical UI most of the time (being its
> >> author:) I don't use the command line interface that much.
> >> I suspect it has nothing to do with the engine itself, rather with the
> >> command-line tool.
> >>
> >> > -----Original Message-----
> >> > From: Preston Zaugg [mailto:[EMAIL PROTECTED]
> >> > Sent: Tuesday, October 04, 2005 6:35 PM
> >> > To: sqlite-users@sqlite.org
> >> > Subject: [sqlite] SQL logic error when running vacuum;
> >> >
> >> > I have a database (encrypted w/ encryption extensions from
> >> > drh). After run a sql file on this database it gives the
> >> > error "SQL error: SQL logic error or missing database" after
> >> > running a vacuum. it also seems to give this error
> >> > sporadically on other statements.
> >> >
> >> > the sql file that i run does the following:
> >> > drops a table
> >> > creates a new table (same name different structure from the
> >> > the table that was just dropped) adds a unique constraint
> >> > runs 7000+ insert statements
> >> >
> >> > the file is executed using the .read of the command line
> >> > utility, and runs without error/warning.
> >> >
> >> > As a side note i am able to run this same script against a MS
> >> > SQL Server database without error.
> >> >
> >> > Between the fact that i can run this script on sql server and
> >> > don't get any errors on the .read, makes me think that my
> >> > script is valid/well formed.
> >> >
> >> > Oh.. other important stuff... i was on 3.2.2 when i started
> >> > running into this problem. Upgraded to 3.2.7 with the same
> >> > results. I'm on Windows 2003 and using a local database.
> >> >
> >> > Any suggestions?
> >> > --Preston
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >> 
> > 
> > 
> 


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to