#13906: REPEATABLE READ (as used by default on MySQL) breaks atleast
QuerySet.get_or_create().
-------------------------------------+-------------------------------------
Reporter: | Owner: graham_king
sebastian_noack | Status: assigned
Type: | Component: Database layer
Cleanup/optimization | (models, ORM)
Milestone: | Severity: Normal
Version: SVN | Keywords: mysql transaction
Resolution: | isolation
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
-------------------------------------+-------------------------------------
Changes (by graham_king):
* status: new => assigned
* severity: => Normal
* cc: graham@… (added)
* owner: nobody => graham_king
* version: 1.2 => SVN
* easy: => 0
* keywords: => mysql transaction isolation
* has_patch: 0 => 1
* type: => Cleanup/optimization
Comment:
As a suggestion, I've attached a patch that adds these two lines to
conf/project_template/settings.py:
{{{
# Recommended for MySQL. See http://www.no-ack.org/2010/07/mysql-
transactions-and-django.html
#'OPTIONS': {'init_command': 'SET SESSION TRANSACTION ISOLATION LEVEL
READ COMMITTED'},
}}}
With it commented in, on MySQL, all the tests still pass.
--
Ticket URL: <http://code.djangoproject.com/ticket/13906#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.