#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 Florian Apolloner):
Something is going very wrong here (I enabled mysql query logging):
```
2020-05-28T14:34:26.959959Z 3 Connect [email protected] on mysql
using TCP/IP
2020-05-28T14:34:26.960183Z 3 Query SET autocommit=0
2020-05-28T14:34:26.960334Z 3 Query SELECT @@SQL_AUTO_IS_NULL
2020-05-28T14:34:26.960490Z 3 Query SET SESSION TRANSACTION
ISOLATION LEVEL READ COMMITTED
2020-05-28T14:34:26.960630Z 3 Query SET autocommit=0
2020-05-28T14:34:26.962107Z 3 Query INSERT INTO
`polls_notapoll` (`text`) VALUES (1)
2020-05-28T14:34:26.962351Z 3 Query COMMIT
2020-05-28T14:34:26.977407Z 3 Query UPDATE `polls_notapoll`
SET `text` = 2 WHERE `polls_notapoll`.`id` = 1
2020-05-28T14:34:26.979122Z 3 Query SELECT
`polls_notapoll`.`id`, `polls_notapoll`.`text` FROM `polls_notapoll` WHERE
`polls_notapoll`.`id` = 1
2020-05-28T14:34:26.980213Z 3 Quit
2020-05-28T14:34:26.981963Z 4 Connect [email protected] on mysql
using TCP/IP
2020-05-28T14:34:26.982421Z 4 Query SET autocommit=0
2020-05-28T14:34:26.982909Z 4 Query SET SESSION TRANSACTION
ISOLATION LEVEL READ COMMITTED
2020-05-28T14:34:26.983500Z 4 Query SELECT
`polls_notapoll`.`id`, `polls_notapoll`.`text` FROM `polls_notapoll` WHERE
`polls_notapoll`.`id` = 1
2020-05-28T14:34:27.031868Z 4 Quit
```
Why it sends "SET autocommit=0" is beyond my understanding, but lets see
what I can dig up :)
--
Ticket URL: <https://code.djangoproject.com/ticket/31632#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 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.9d276357360e42727f1ffe1875701679%40djangoproject.com.