Re: [sqlite] add column creating null columns even with default?

2009-05-29 Thread Damien Elmes
May 2009, at 9:00am, Damien Elmes wrote: >> >>> alter table cardModels add column allowEmptyAnswer boolean not null >>> default 1 >> >>> sqlite> update cardModels set allowEmptyAnswer = 0; >> >> You're obviously used to other implementations of SQ

[sqlite] add column creating null columns even with default?

2009-05-28 Thread Damien Elmes
Hi, My application issues an 'add column' statement to an sqlite database, like: alter table cardModels add column allowEmptyAnswer boolean not null default 1 alter table cardModels add column typeAnswer text not null default Most of the time this works, but sometimes users send me a database

Re: [sqlite] Can the page size cause bugs? (was Re: problems with shared cache?)

2009-04-17 Thread Damien Elmes
, and occasionally a once-a-minute timer was firing in that repaint call, which selected from the database. It would be nice if sqlite noticed a query was being run in the progress handler and pointed out the operator error. Cheers, Damien On Fri, Apr 3, 2009 at 8:21 AM, Damien Elmes <reso...@ichi2.

Re: [sqlite] Subselects negating benefit of index?

2009-04-05 Thread Damien Elmes
>> So it seems that the subselect is preventing the ordering index from >> being used. What's interesting is that if I select the ids in a >> different sql statement, concatenate them together in a big list of >> numbers, and supply that in the extra statement,  the ordering index >> is still not

[sqlite] Subselects negating benefit of index?

2009-04-04 Thread Damien Elmes
Hi folks, I have the following query: > explain query plan select id from cards where id in (select cardId from > cardTags where cardTags.tagId in (246)) order by cards.question collate nocase order fromdetail 0 0 TABLE cards USING PRIMARY KEY 0 0 TABLE cardTags

Re: [sqlite] problems with shared cache?

2009-03-24 Thread Damien Elmes
allows using multiple nulls for the primary key, but > according to their docs, it is non-standard and it says something > about "this may change in the future".  Maybe you are getting caught > in the middle of a change that is going to occur across multiple > revisions of SQLite. >

Re: [sqlite] problems with shared cache?

2009-03-24 Thread Damien Elmes
;>>>> integrity_check >>>>>>>> --- >>>>>>>> ok >>>>>>>> sqlite> select id, count(id) from cards group by id having >>>>>>>> count(id) >>>>>>>>> 1; >>>

Re: [sqlite] problems with shared cache?

2009-03-24 Thread Damien Elmes
Sorry, my application's files are called decks, and I unwittingly used the wrong terminology. Any ideas about the problem? On Sat, Mar 21, 2009 at 2:27 AM, Griggs, Donald wrote: > >> However, when I ask the user to send me their deck, I find that: >>

Re: [sqlite] problems with shared cache?

2009-03-20 Thread Damien Elmes
)s .. etc On Fri, Mar 20, 2009 at 8:16 PM, Dan <danielk1...@gmail.com> wrote: > > Does the "undolog" table, or whatever you're using in its place, have > a primary key? > > On Mar 20, 2009, at 1:20 PM, Damien Elmes wrote: > >> Well, those 3 x the number of

Re: [sqlite] problems with shared cache?

2009-03-20 Thread Damien Elmes
Well, those 3 x the number of tables in the Db. On Fri, Mar 20, 2009 at 3:17 PM, Damien Elmes <reso...@ichi2.net> wrote: > Yep - but only the three listed on this page: > > http://www.sqlite.org/cvstrac/wiki?p=UndoRedo > > So they shouldn't be modifying anything in the main D

Re: [sqlite] problems with shared cache?

2009-03-20 Thread Damien Elmes
Yep - but only the three listed on this page: http://www.sqlite.org/cvstrac/wiki?p=UndoRedo So they shouldn't be modifying anything in the main DB, only the temporary DB. On Fri, Mar 20, 2009 at 3:13 PM, Dan <danielk1...@gmail.com> wrote: > > On Mar 20, 2009, at 8:10 AM, Damien

Re: [sqlite] problems with shared cache?

2009-03-19 Thread Damien Elmes
ite> select id, count(id) from cards group by id having count(id) > 1; sqlite> Any ideas? On Fri, Mar 20, 2009 at 10:00 AM, Damien Elmes <reso...@ichi2.net> wrote: > Hi all, > > Some of my users have been reporting strange database problems > recently, which seem to have g

[sqlite] problems with shared cache?

2009-03-19 Thread Damien Elmes
Hi all, Some of my users have been reporting strange database problems recently, which seem to have gone away when I removed a call to enable_shared_cache(). The problems were noticeable in at least 3.6.1 and 3.6.11, when using databases of 30MB+, and doing large updates using pysqlite. There