Browse Source

Added documentation notes about lack of database savepoints support when using MySQL+MyISAM.

Refs #15507, #18116 and r17341, r17921.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17923 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Ramiro Morales 13 years ago
parent
commit
83fc965171
2 changed files with 21 additions and 4 deletions
  1. 18 1
      docs/ref/databases.txt
  2. 3 3
      docs/topics/db/transactions.txt

+ 18 - 1
docs/ref/databases.txt

@@ -128,7 +128,7 @@ Version support
 Django supports MySQL 5.0.3 and higher.
 
 `MySQL 5.0`_ adds the ``information_schema`` database, which contains detailed
-data on all database schema. Django's ``inspectdb`` feature uses this feature.
+data on all database schema. Django's ``inspectdb`` feature uses it.
 
 .. versionchanged:: 1.5
     The minimum version requirement of MySQL 5.0.3 was set in Django 1.5.
@@ -141,6 +141,8 @@ MySQL when using the MyISAM storage engine, see the next section.
 .. _MySQL: http://www.mysql.com/
 .. _MySQL 5.0: http://dev.mysql.com/doc/refman/5.0/en/index.html
 
+.. _mysql-storage-engines:
+
 Storage engines
 ---------------
 
@@ -353,6 +355,21 @@ via the :class:`~django.db.models.Options.db_table` parameter.
 
 .. _known issues: http://bugs.mysql.com/bug.php?id=48875
 
+Savepoints
+----------
+
+Both the Django ORM and MySQL (when using the InnoDB :ref:`storage engine
+<mysql-storage-engines>`) support database :ref:`savepoints
+<topics-db-transactions-savepoints>`, but this feature wasn't available in
+Django until version 1.4 when such supports was added.
+
+If you use the MyISAM storage engine please be aware of the fact that you will
+receive database-generated errors if you try to use the :ref:`savepoint-related
+methods of the transactions API <topics-db-transactions-savepoints>`. The reason
+for this is that detecting the storage engine of a MySQL database/table is an
+expensive operation so it was decided it isn't worth to dynamically convert
+these methods in no-op's based in the results of such detection.
+
 Notes on specific fields
 ------------------------
 

+ 3 - 3
docs/topics/db/transactions.txt

@@ -225,9 +225,9 @@ Savepoints
 
 A savepoint is a marker within a transaction that enables you to roll back part
 of a transaction, rather than the full transaction. Savepoints are available
-with the PostgreSQL 8, Oracle and MySQL (version 5.0.3 and newer, when using
-the InnoDB storage engine) backends. Other backends provide the savepoint
-functions, but they're empty operations -- they don't actually do anything.
+with the PostgreSQL 8, Oracle and MySQL (when using the InnoDB storage engine)
+backends. Other backends provide the savepoint functions, but they're empty
+operations -- they don't actually do anything.
 
 .. versionchanged:: 1.4
    Savepoint support for the MySQL backend was added in Django 1.4.