1 | Index: django/db/backends/mysql/introspection.py
|
---|
2 | ===================================================================
|
---|
3 | --- django/db/backends/mysql/introspection.py (revision 12655)
|
---|
4 | +++ django/db/backends/mysql/introspection.py (working copy)
|
---|
5 | @@ -1,4 +1,5 @@
|
---|
6 | from django.db.backends import BaseDatabaseIntrospection
|
---|
7 | +from django.db.utils import DatabaseError
|
---|
8 | from MySQLdb import ProgrammingError, OperationalError
|
---|
9 | from MySQLdb.constants import FIELD_TYPE
|
---|
10 | import re
|
---|
11 | @@ -63,7 +64,7 @@
|
---|
12 | AND referenced_table_name IS NOT NULL
|
---|
13 | AND referenced_column_name IS NOT NULL""", [table_name])
|
---|
14 | constraints.extend(cursor.fetchall())
|
---|
15 | - except (ProgrammingError, OperationalError):
|
---|
16 | + except (ProgrammingError, OperationalError, DatabaseError):
|
---|
17 | # Fall back to "SHOW CREATE TABLE", for previous MySQL versions.
|
---|
18 | # Go through all constraints and save the equal matches.
|
---|
19 | cursor.execute("SHOW CREATE TABLE %s" % self.connection.ops.quote_name(table_name))
|
---|