summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-10-01 16:53:19 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-10-01 16:53:19 +0000
commita96bbd36abe0b95d7c168e07be3344967cc4d80b (patch)
tree273ff2dfb4e3c37e4fd8e27641c099b0e8fba87d /lib/sqlalchemy/databases/mysql.py
parent6b69fe51debb64a2eb08a03596f1101f3b7b136d (diff)
downloadsqlalchemy-a96bbd36abe0b95d7c168e07be3344967cc4d80b.tar.gz
edits
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index ff2007928..2c29bbe2a 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -327,8 +327,7 @@ class MySQLDialect(ansisql.ANSIDialect):
if not found_table:
found_table = True
- # there is a configuration in ticket:318 where everything is coming back as unicode,
- # not sure of the reason as of yet
+ # these can come back as unicode if use_unicode=1 in the mysql connection
(name, type, nullable, primary_key, default) = (str(row[0]), str(row[1]), row[2] == 'YES', row[3] == 'PRI', row[4])
match = re.match(r'(\w+)(\(.*?\))?\s*(\w+)?\s*(\w+)?', type)
@@ -379,6 +378,8 @@ class MySQLDialect(ansisql.ANSIDialect):
"""
c = connection.execute("SHOW CREATE TABLE " + table.name, {})
desc_fetched = c.fetchone()[1]
+
+ # this can come back as unicode if use_unicode=1 in the mysql connection
if type(desc_fetched) is unicode:
desc_fetched = str(desc_fetched)
elif type(desc_fetched) is not str: