Thanks Karen, I set

DATABASES = {
    'default': {
        'OPTIONS': {'init_command': 'SET SESSION TRANSACTION ISOLATION
LEVEL READ COMMITTED'},
    }
}

At first glance it seemed to do the trick. In fact it seemed to force
the re-query every time I did .filter, without putting the QuerySet
into a list context.

(If it disables QuerySet lazy reads entirely, might not be something
to do in a production Web server without load testing. But on
maintenance jobs I can just use a separate settings.py, and that's
where I'm having the issue.)

Many thanks, I don't think I would have figured that one out!


On Oct 25, 9:10 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Tue, Oct 25, 2011 at 7:39 PM, druce <dru...@gmail.com> wrote:
> > Tried every other way I could think of. Any idea what I have to do to
> > force it to requery the database?
>
> Sounds like you are a victim of the default REPEATABLE READ MySQL/InnoDB
> transaction isolation level.
>
> See this ticket for more details:https://code.djangoproject.com/ticket/13906, 
> including how to specify an
> init command for the DB that can be used to switch it to use READ COMMITTED,
> for example.
>
> Karen
> --http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to