diff options
| author | Ben Trofatter <trofatter@google.com> | 2013-03-18 17:58:41 -0700 |
|---|---|---|
| committer | Ben Trofatter <trofatter@google.com> | 2013-03-18 17:58:41 -0700 |
| commit | 68299cbd444d4ba1c837b9407faedb5dc42f9d16 (patch) | |
| tree | d4b2f372f14f12764258e0a1eb515bcd4dd11747 /lib/sqlalchemy/dialects/mysql/base.py | |
| parent | 9ad9ccec87b89023db611d70da2c6d455c29ab60 (diff) | |
| download | sqlalchemy-68299cbd444d4ba1c837b9407faedb5dc42f9d16.tar.gz | |
Added workaround for pymysql3 double wrapping ProgrammingErrors to pymysql dialect.
Added workaround for pymysql3 return a bytes object when queried for isolation level.
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 62598ad00..3720c4e62 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1932,6 +1932,11 @@ class MySQLDialect(default.DefaultDialect): cursor.execute('SELECT @@tx_isolation') val = cursor.fetchone()[0] cursor.close() + # Py3K + #if isinstance(val, bytes): + # val = val.decode() + # Py2K + # end Py2K return val.upper().replace("-", " ") def do_commit(self, dbapi_connection): |
