RE: [sqlite] version 3.3.12 -- malformed schema after using "limit 0" ??
regarding: "Problem fixed by check-in [3993] on 2007-05-14 14:05 GMT." Argh! I stupidly had downloaded the current version but somehow was using the old 3.3.12 version when encountering the error. My apologies to the list. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] version 3.3.12 -- malformed schema after using "limit 0" ??
"Griggs, Donald" <[EMAIL PROTECTED]> wrote: > I don't know if the following might be a problem with the new release, > or just something odd on my system. > > > In sqlite 3.3.12, I try to create an empty table copying the schema of > an existing table by using a command such as the following: > CREATE TABLE newtable AS SELECT * FROM oldtable LIMIT 0; > I seem to create an integrity_check failure (and the "newtable" is not > created, btw). > > If I then close the database and re-open it, the "malformed database > schema" error is returned for most any operation, and no table within > the database can be dumped. > Problem fixed by check-in [3993] on 2007-05-14 14:05 GMT. http://www.sqlite.org/cvstrac/chngview?cn=3993 This was in between 3.3.17 and 3.4.0. In other words, the fix first appears in version 3.4.0. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] version 3.3.12 -- malformed schema after using "limit 0" ??
[EMAIL PROTECTED] wrote: > > I don't know if the following might be a problem with the new release, > or just something odd on my system. > > > In sqlite 3.3.12, I try to create an empty table copying the schema of > an existing table by using a command such as the following: > CREATE TABLE newtable AS SELECT * FROM oldtable LIMIT 0; > I seem to create an integrity_check failure (and the "newtable" is not > created, btw). > > If I then close the database and re-open it, the "malformed database > schema" error is returned for most any operation, and no table within > the database can be dumped. > > > I can produce the error with the pre-compiled windows binary sqlite3.exe > (I'm running winXP SP2). > > When I tried an old sqlite 3.4.2 that I had lying around, it *did* > create "newtable" and there was *no* integrity_check failure. Same > with version 2.8.13 (sqlite.exe). > > Is this an easily-repeatible issue, or do I have some corrupted files > somewhere? With your recipe, I can reproduce it on 3.3.10 on Solaris 9/SPARC. Clearly an upgrade is in order where practical. -- James - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] version 3.3.12 -- malformed schema after using "limit 0" ??
I don't know if the following might be a problem with the new release, or just something odd on my system. In sqlite 3.3.12, I try to create an empty table copying the schema of an existing table by using a command such as the following: CREATE TABLE newtable AS SELECT * FROM oldtable LIMIT 0; I seem to create an integrity_check failure (and the "newtable" is not created, btw). If I then close the database and re-open it, the "malformed database schema" error is returned for most any operation, and no table within the database can be dumped. I can produce the error with the pre-compiled windows binary sqlite3.exe (I'm running winXP SP2). When I tried an old sqlite 3.4.2 that I had lying around, it *did* create "newtable" and there was *no* integrity_check failure. Same with version 2.8.13 (sqlite.exe). Is this an easily-repeatible issue, or do I have some corrupted files somewhere? Obviously, try this *only* on a new or expendable database! QUICK TEST PROCEDURE: sqlite3 databasename create table cat ( a, b ); insert into cat values (1, 2); create table badboy as select * from cat limit 0; pragma integrity_check; .quit See if you get an integrity failure. Then open the same database and operate on the database, e.g.: sqlite3 databasename select * from cat; See if you get "SQL error: malformed database schema" * LOG OF TRYING ABOVE ON MY SYSTEM: C:\Data\zip5>sqlite3 newdb.db SQLite version 3.3.12 Enter ".help" for instructions sqlite> create table cat ( a, b); sqlite> insert into cat values (1, 2); sqlite> create table badboy as select * from cat limit 0; sqlite> pragma integrity_check; *** in database main *** Page 3 is never used sqlite> select * from cat; 1|2 sqlite> .quit C:\Data\zip5>sqlite3 newdb.db SQLite version 3.3.12 Enter ".help" for instructions sqlite> select * from cat; SQL error: malformed database schema sqlite> (Possibly related to Check-in 3993??) - To unsubscribe, send email to [EMAIL PROTECTED] -