I confirmed this also is a bug in 3.7.2
 
Interesting thing though....if you add one .schema statement the problem goes 
away.  I wanted to see what it thought about the schema along the way.
So after 
 
With bug:
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select sqlite_source_id();
2010-08-23 18:52:01 42537b60566f288167f1b5864a5435986838e3a3
sqlite> begin;
sqlite> create table t(a);
sqlite> insert into t values (1);
sqlite> savepoint a;
sqlite> insert into t values (2);
sqlite> rollback to savepoint a;
sqlite> select * from t;
1
sqlite> .schema
CREATE TABLE t(a);
sqlite> rollback;
sqlite> begin;
sqlite> create table t(a);
Error: table t already exists

Without bug:
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select sqlite_source_id();
2010-08-23 18:52:01 42537b60566f288167f1b5864a5435986838e3a3
sqlite> begin;
sqlite> create table t(a);
sqlite> insert into t values (1);
sqlite> savepoint a;
sqlite> insert into t values (2);
sqlite> rollback to savepoint a;
sqlite> select * from t;
1
sqlite> .schema
CREATE TABLE t(a);
sqlite> rollback;
sqlite> begin;
sqlite> create table t(a);
Error: table t already exists    < gee -- I thought the rollback should have 
dropped the schema
sqlite> create table t(a);
Error: table t already exists    < try again -- yes, it thinks schema is there
sqlite> .schema                       < schema indeed looks empty
sqlite> create table t(a);          < let's try again -- this time it works!
sqlite> .schema
CREATE TABLE t(a);

 
 
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Northrop Grumman Information Systems
 

________________________________

From: sqlite-users-boun...@sqlite.org on behalf of Simon Davies
Sent: Fri 8/27/2010 8:28 AM
To: General Discussion of SQLite Database
Subject: EXTERNAL:[sqlite] Fwd: Conflicting table existence errors after 
SAVEPOINT & ROLLBACKs



Repost after being bounced - if the moderator hasn't looked at this in
16 days, perhaps he never will...

> Your mail to 'sqlite-users' with the subject
>
>    Conflicting table existence errors after SAVEPOINT & ROLLBACKs
>
> Is being held until the list moderator can review it for approval.
>
> The reason it is being held:
>
>    Post by non-member to a members-only list
>
> Either the message will get posted to the list, or you will receive
> notification of the moderator's decision.  If you would like to cancel
> this posting, please visit the following URL:
>
>    
> http://sqlite.org:8080/cgi-bin/mailman/confirm/sqlite-users/408a0103ea2cc1c97a22f37f83e44678937e4962


---------- Forwarded message ----------
From: Simon Davies <simon.james.dav...@gmail.com>
Date: 11 August 2010 12:38
Subject: Conflicting table existence errors after SAVEPOINT & ROLLBACKs
To: sqlite-users@sqlite.org


Hi Users,

I'm running Windows 7 Pro on a Dell box;

First noticed this in 3.6.11, confirmed it occurs in 3.7.0.1

Built from amalgamation.

C:\> sqlite3
SQLite version 3.7.0.1
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
sqlite> select sqlite_source_id();
2010-08-04 12:31:11 042a1abb030a0711386add7eb6e10832cc8b0f57
sqlite>
sqlite> begin;
sqlite> create table t( a );
sqlite> insert into t values( 1  );
sqlite> savepoint a;
sqlite> insert into t values( 2 );
sqlite> rollback to savepoint a;
sqlite> select * from t;
1
sqlite> rollback;
sqlite>
sqlite> begin;
sqlite> create table t( a );
Error: table t already exists
sqlite> insert into t values( 1 );
Error: no such table: t
sqlite>

Can anybody else reproduce this?

Regards,
Simon
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to