From 6b69fe51debb64a2eb08a03596f1101f3b7b136d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 1 Oct 2006 16:41:49 +0000 Subject: [PATCH] further str() on values that may come back as unicode --- lib/sqlalchemy/databases/mysql.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 0685397d73..ff2007928e 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -327,7 +327,9 @@ class MySQLDialect(ansisql.ANSIDialect): if not found_table: found_table = True - (name, type, nullable, primary_key, default) = (row[0], row[1], row[2] == 'YES', row[3] == 'PRI', row[4]) + # there is a configuration in ticket:318 where everything is coming back as unicode, + # not sure of the reason as of yet + (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) col_type = match.group(1) -- 2.47.2