Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schema mismatch error on db.execute() #161

Open
GoogleCodeExporter opened this issue Sep 2, 2015 · 2 comments
Open

schema mismatch error on db.execute() #161

GoogleCodeExporter opened this issue Sep 2, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Here is the repro for Firefox:

var f = new GearsFactory();
var db = f.create("beta.database", "1.0");
db.open("foo");
var db2 = f.create("beta.database", "1.0");
db2.open("foo");
var t = new Date().getTime();
db.execute("create table t" + t + "(id int)");

// causes error "schema has changed"
var rs = db2.execute("select * from t" + t);

My understanding is that this should succeed?

Original issue reported on code.google.com by [email protected] on 11 Jul 2007 at 12:28

@GoogleCodeExporter
Copy link
Author

Unfortunately, this is a by-design thing.  See
http://www.sqlite.org/cvstrac/tktview?tn=2486 and also the thread running at
http://article.gmane.org/gmane.comp.db.sqlite.general/30228 .  I can understand 
the
rational of why things are this way, but I'm still pondering on whether there's 
a
slick solution we can apply within Gears.

The best workaround for now is to force the handle to read the database.  This 
works:

  db.execute('select * from sqlite_master').close();

Original comment by Scott.Hess on 11 Jul 2007 at 11:11

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 5 Sep 2007 at 7:56

  • Added labels: Version-later
  • Removed labels: Milestone-M3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant