diff options
| author | Tim Graham <timograham@gmail.com> | 2016-08-02 10:52:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-02 10:52:31 -0400 |
| commit | d95c669c29a0403cd1098664f0ef863fae8b7c98 (patch) | |
| tree | bbcb3a742578c7dab06ddfe3fa471cfdff56a1f2 /django/db | |
| parent | 013ee21cf8e1a4b05589c161039f244e356272ba (diff) | |
Fixed #26991 -- Fixed a crash in MySQL where SQL_AUTO_IS_NULL doesn't return a result.
Diffstat (limited to 'django/db')
| -rw-r--r-- | django/db/backends/mysql/features.py | 3 |
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 |
