diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-21 17:23:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-21 17:23:03 -0400 |
commit | e79fd50e586a4dcdefcd1181d726f47a713d02d3 (patch) | |
tree | 05251ee0efa04b1d1b2c5f590fdf6ce8d7b4a482 | |
parent | e4c50c07bb67f30d9e67167c34cfcae9d50ad360 (diff) | |
download | sqlalchemy-e79fd50e586a4dcdefcd1181d726f47a713d02d3.tar.gz |
- changelog
- just do a fetchone() here, no need for len() etc.
-rw-r--r-- | doc/build/changelog/changelog_08.rst | 7 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst index a232499d6..7f98c4b0b 100644 --- a/doc/build/changelog/changelog_08.rst +++ b/doc/build/changelog/changelog_08.rst @@ -8,6 +8,13 @@ .. change:: :tags: bug, mysql + :pullreq: 55 + + Fixes to support the latest cymysql DBAPI, courtesy + Hajime Nakagami. + + .. change:: + :tags: bug, mysql :tickets: 2663 Improvements to the operation of the pymysql dialect on diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index d56ab137c..38c86b116 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -2042,7 +2042,7 @@ class MySQLDialect(default.DefaultDialect): try: try: rs = connection.execute(st) - have = len(rs.fetchall()) > 0 + have = rs.fetchone() is not None rs.close() return have except exc.DBAPIError, e: |