summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/mysql/features.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py
index ea5fd0d9e9..64ed8c2602 100644
--- a/django/db/backends/mysql/features.py
+++ b/django/db/backends/mysql/features.py
@@ -75,4 +75,5 @@ class DatabaseFeatures(BaseDatabaseFeatures):
def is_sql_auto_is_null_enabled(self):
with self.connection.cursor() as cursor:
cursor.execute('SELECT @@SQL_AUTO_IS_NULL')
- return cursor.fetchone()[0] == 1
+ result = cursor.fetchone()
+ return result and result[0] == 1