diff --git a/django/db/backends/mysql/validation.py b/django/db/backends/mysql/validation.py
index e62a6e4..c86a082 100644
a
|
b
|
class DatabaseValidation(BaseDatabaseValidation):
|
13 | 13 | with self.connection.cursor() as cursor: |
14 | 14 | cursor.execute("SELECT @@sql_mode") |
15 | 15 | sql_mode = cursor.fetchone() |
16 | | modes = set(sql_mode[0].split(',')) |
| 16 | |
| 17 | if sql_mode: |
| 18 | modes = set(sql_mode[0].split(',')) |
| 19 | else: |
| 20 | modes = set() |
| 21 | |
17 | 22 | if not (modes & {'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES'}): |
18 | 23 | return [checks.Warning( |
19 | 24 | "MySQL Strict Mode is not set for database connection '%s'" % self.connection.alias, |
diff --git a/docs/releases/1.10.2.txt b/docs/releases/1.10.2.txt
index 4154836..f3c574d 100644
a
|
b
|
Django 1.10.2 fixes several bugs in 1.10.1.
|
9 | 9 | Bugfixes |
10 | 10 | ======== |
11 | 11 | |
12 | | * ... |
| 12 | * Fixed a crash in MySQL database validation where ``SELECT @@sql_mode`` |
| 13 | doesn't return a result (:ticket:`27180`). |