Just a follow-up in case anyone else runs into this.

The issue was not related to the page size, though different page
sizes could exacerbate the problem.

The problem turned out to be accidentally issuing a select in the
sqlite progress handler. My progress handler was repainting the GUI,
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.net> wrote:
> Turning off the shared cache seems to have solved the problem for most
> users, but one win32 user continues to report problems. I noticed that
> in 3.6.12 the default page size is automatically calculated on
> Windows. In my application I explicitly set the page size to 4096. Can
> having a page size that doesn't match the disk geometry cause
> problems? That is the only reason I can think of that the user
> continues to report problems that aren't reproducible with the same DB
> file here. To recap, the user gets errors like:
>
> sqlalchemy.exc.IntegrityError: (IntegrityError) PRIMARY KEY must be
> unique u'update cards set priority = ? where id = ?' [[1,
> -9223199285979494924L], [1, -9221822696858457935L], [1,
> -9220362552298800344L], [1, -9218865005459903182L], [1,
> -9218053570259598995L], [1, -9217626953400592469L], [1,
> -9217257525142991358L], [2, -9217039826750418600L], [1,
> -9217011234538438799L], [1, -9216054651420921523L], [1,
> -9215471921529813571L], [3, -9215405945578177558L], [1, <strip a very long 
> list>
>
> But if the user saves the deck and sends it to me, all the ids are unique.
>
> Cheers,
>
> Damien
>
> On Wed, Mar 25, 2009 at 9:38 AM, Damien Elmes <reso...@ichi2.net> wrote:
>> I can define the primary key column as not null if you think that will
>> help, but dumping the table reveals the ids are being assigned
>> sequential integers.
>>
>> On Tue, Mar 24, 2009 at 11:34 PM, Jim Wilcoxson <pri...@gmail.com> wrote:
>>> Not sure if it will make a difference, but in your trigger stuff you
>>> explicitly coded null for the primary key value.  Have you tried
>>> changing that so that you don't specify the primary key field at all?
>>> I can't remember from the previous post, but I think it was (or should
>>> be) set up as autoincrement.
>>>
>>> I think SQLite 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.
>>>
>>> Jim
>>>
>>>
>>> On 3/24/09, Damien Elmes <reso...@ichi2.net> wrote:
>>>> 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
>>>> <donald.gri...@allscripts.com> wrote:
>>>>>>>>>
>>>>>>>>>> However, when I ask the user to send me their deck, I find that:
>>>>>>>>>>
>>>>>>>>>> sqlite> pragma integrity_check;
>>>>>>>>>> integrity_check
>>>>>>>>>> ---------------
>>>>>>>>>> ok
>>>>>>>>>> sqlite> select id, count(id) from cards group by id having
>>>>>>>>>> count(id)
>>>>>>>>>>> 1;
>>>>>>>>>> sqlite>
>>>>>>>>>>
>>>>>>>>>> Any ideas?
>>>>>
>>>>> Obviously, that user is not playing with a full deck.   ;-)
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>
>>>
>>> --
>>> Software first.  Software lasts!
>>> _______________________________________________
>>> 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
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to