The 2.0 release notes at
https://docs.djangoproject.com/en/2.0/releases/2.0/#default-mysql-
isolation-level-is-read-committed don't mention anything about this
particular problem. Since, as far as I can tell, InnoDB and BINLOG_FORMAT
= STATEMENT are the default values, it would be useful if the
documentation could warn about this problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/28901>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Adam (Chainz) Johnson (added)
* type: Uncategorized => Cleanup/optimization
Comment:
Would you like to draft something?
--
Ticket URL: <https://code.djangoproject.com/ticket/28901#comment:1>
Comment (by Dirkjan Ochtman):
I wouldn't mind typing up the above in a way that is feasible for the
documentation -- however, it would sure be nice if someone with deeper
knowledge of Django and MySQL reviews that what I'm saying is correct and
makes sense, and simply reverting the isolation level is the best solution
here. It sure doesn't feel like the right solution -- but I couldn't
figure out so far what the best alternative is.
--
Ticket URL: <https://code.djangoproject.com/ticket/28901#comment:2>
* stage: Unreviewed => Someday/Maybe
--
Ticket URL: <https://code.djangoproject.com/ticket/28901#comment:3>
Comment (by Nir Izraeli):
Hi, I encountered a related issue and opened (and later answered) a
stackoverflow question I think may be useful for others stumbling upon
this ticket, so I'm linking it here:
https://stackoverflow.com/a/51399292/1146713
The gist of it is I was using an old MariaDB version (10.0) which
defaulted to {{{BINLOG_FORMAT = STATEMENT}}} instead of the more flexible
{{{BINLOG_FORMAT = MIXED}}} that is the default since version 10.2.4.
Django may want to add that as part of the default-override, to avoid this
problem when working with older versions of MariaDB, or include as part of
the documentation section about changing the default transaction isolation
level. I have no opinion on the matter but I'm up to contribute a change
once it's decided.
--
Ticket URL: <https://code.djangoproject.com/ticket/28901#comment:4>
Comment (by Adam (Chainz) Johnson):
Django can't override binlog_format since it is set on the server level
only, which requires either super privilege (django apps shouldn't have
this) or editing the config file. Also it has a huge number of
considerations, see https://mariadb.com/kb/en/library/binary-log-formats/
.
--
Ticket URL: <https://code.djangoproject.com/ticket/28901#comment:5>