#31632: Single queries without transaction do not follow AUTOCOMMIT
-------------------------------------+-------------------------------------
Reporter: Filipe Pina | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Filipe Pina):
Replying to [comment:1 Simon Charette]:
> The documentation is also pretty clear about why
[https://docs.djangoproject.com/en/3.0/topics/db/transactions/#why-django-
uses-autocommit this setup is not recommended].
Yes, autocommit in DB is off and autocommit in Django is ON. Could you
highlight where does it state this setup is not recommended?
The only comment I see is saying that `Django overrides database default
autocommit behavior` which was indeed true until this PR: as everything
was wrapped in a transaction by the ORM itself, it didn't matter what was
the db backend configuration.
I don't see any highlight mentioning weird behavior coming from unaligned
settings. The only warning is if disabling Django AUTOCOMMIT you'll leave
it up to the db backend, but that's not the case.
And, once again, if every query was wrapped in a transaction before 2.2,
this setting in MySQL is completely ignored.
Plus statements like
https://docs.djangoproject.com/en/3.0/topics/db/transactions/#django-s
-default-transaction-behavior are confusing as it states `uses autocommit
by default` but apparently doesn't, because `single queries` are not
committed anymore, unless the database (not Django) commits them.
--
Ticket URL: <https://code.djangoproject.com/ticket/31632#comment:2>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.acd8c4cdd484bb1a9e27dd11a62b929f%40djangoproject.com.