summaryrefslogtreecommitdiff
path: root/docs/ref/databases.txt
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-01-17 11:16:15 -0500
committerGitHub <noreply@github.com>2017-01-17 11:16:15 -0500
commitf01ad1cb6a27669fd44b2079089e14f9dc4d3ca3 (patch)
treeba35dc08d5d474e7b14682ff34863deb67cb5e43 /docs/ref/databases.txt
parent46e0335583661507f1c10adb97fbd9dcfbb9b787 (diff)
Refs #27683 -- Allowed setting isolation level in DATABASES ['OPTIONS'] on MySQL.
Diffstat (limited to 'docs/ref/databases.txt')
-rw-r--r--docs/ref/databases.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index 16addc52bc..0c2465a9af 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -492,6 +492,32 @@ like other MySQL options: either in a config file or with the entry
``'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"`` in the
:setting:`OPTIONS` part of your database configuration in :setting:`DATABASES`.
+.. _mysql-isolation-level:
+
+Isolation level
+~~~~~~~~~~~~~~~
+
+.. versionadded:: 1.11
+
+When running concurrent loads, database transactions from different sessions
+(say, separate threads handling different requests) may interact with each
+other. These interactions are affected by each session's `transaction isolation
+level`_. You can set a connection's isolation level with an
+``'isolation_level'`` entry in the :setting:`OPTIONS` part of your database
+configuration in :setting:`DATABASES`. Valid values for
+this entry are the four standard isolation levels:
+
+* ``'read uncommitted'``
+* ``'read committed'``
+* ``'repeatable read'``
+* ``'serializable'``
+
+or ``None`` to use the server's configured isolation level. However, Django
+works best with read committed rather than MySQL's default, repeatable read.
+Data loss is possible with repeatable read.
+
+.. _transaction isolation level: https://dev.mysql.com/doc/refman/en/innodb-transaction-isolation-levels.html
+
Creating your tables
--------------------