summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-03-27 19:18:06 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-03-27 19:18:06 -0400
commit50576a01eb39742632268fe1e595a554625171eb (patch)
treedfdc8410792c9b20786349f77026fbb8f7e6b500 /lib/sqlalchemy/dialects/mysql
parent460139f630a8db71f2a12eae0b95c75c858210f8 (diff)
downloadsqlalchemy-50576a01eb39742632268fe1e595a554625171eb.tar.gz
- Tweaked the settings for mysql-connector-python; in Py2K, the
"supports unicode statements" flag is now False, so that SQLAlchemy will encode the *SQL string* (note: *not* the parameters) to bytes before sending to the database. This seems to allow all unicode-related tests to pass for mysql-connector, including those that use non-ascii table/column names, as well as some tests for the TEXT type using unicode under cursor.executemany(). - other mysql-connector fixes; latest version seems to do better on function call counts
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql')
-rw-r--r--lib/sqlalchemy/dialects/mysql/mysqlconnector.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py
index 408bc41dd..3536c3ad8 100644
--- a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py
+++ b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py
@@ -52,8 +52,11 @@ class _myconnpyBIT(BIT):
class MySQLDialect_mysqlconnector(MySQLDialect):
driver = 'mysqlconnector'
- supports_unicode_statements = True
+
+ if util.py2k:
+ supports_unicode_statements = False
supports_unicode_binds = True
+
supports_sane_rowcount = True
supports_sane_multi_rowcount = True