summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2016-09-29 21:05:35 +0200
committerTim Graham <timograham@gmail.com>2016-10-01 10:01:44 -0400
commit6e4e0f4ce48b80495e89abbee030cf49809a9c54 (patch)
tree1bc4d4bd8afdd75041551605ada544a783586f9c /django
parentfa2f55cfd554c6f99653ffe0d40fd7ca74cb680e (diff)
Fixed #26541 -- Allowed MySQL transaction detection to work without table creation.
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/mysql/features.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py
index 991a064cee..f8c0ddea00 100644
--- a/django/db/backends/mysql/features.py
+++ b/django/db/backends/mysql/features.py
@@ -78,3 +78,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
cursor.execute('SELECT @@SQL_AUTO_IS_NULL')
result = cursor.fetchone()
return result and result[0] == 1
+
+ @cached_property
+ def supports_transactions(self):
+ """
+ All storage engines except MyISAM support transactions.
+ """
+ return self._mysql_storage_engine != 'MyISAM'