Django DB strange behavior

2009-04-25 Thread Aaron Lee
Today I just stumble upon a very strange bug and I am not sure if that's Django bug or not. Here's the context: I have a model Job which has a status field. For debugging, I run python manage.py shell and do jobs = Job.objects.filter(status__in=['A']) *I am using MySQL 5.0 InnoDb* Re-running t

Re: Django DB strange behavior

2009-04-25 Thread James Bennett
On Sat, Apr 25, 2009 at 5:07 AM, Aaron Lee wrote: > So is there some InnoDB specific thing in Django that does some "smart" > caching? Unless you explicitly enable Django's caching system, and explicitly make use of it, Django does no caching of any sort whatsoever. Personally I would suspect t

Re: Django DB strange behavior

2009-04-25 Thread Karen Tracey
On Sat, Apr 25, 2009 at 5:07 AM, Aaron Lee wrote: > Today I just stumble upon a very strange bug and I am not sure if that's > Django bug or not. > > Here's the context: > I have a model Job which has a status field. > > For debugging, I run python manage.py shell and do > > jobs = Job.objects.fi

Re: Django DB strange behavior

2009-04-25 Thread Aaron Lee
Thanks James and Karen, Yes indeed it was the problem, I updated the my.cnf to have transaction_isolation set to READ-COMMITTED and it works fine now. Is there any benefit of this approach of the other (connection autocommit) i.e. performance-wise ? -Aaron On Sat, Apr 25, 2009 at 7:24 AM, Karen T