summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-01-04 18:41:16 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-01-04 18:41:16 +0000
commitf07297e82d56d3ea155578ecff9cdae691b95de5 (patch)
tree4a80cacd764dc3ffdf7ddec7e671c67e3d1c8c3a /lib/sqlalchemy
parente6ba4d94264974ac0832fc24db4a48f928965fc4 (diff)
downloadsqlalchemy-f07297e82d56d3ea155578ecff9cdae691b95de5.tar.gz
- fix mysqlconnector import
- mysqlconnector returns get_server_version() as a tuple-ready structure
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/dialects/mysql/__init__.py2
-rw-r--r--lib/sqlalchemy/dialects/mysql/mysqlconnector.py8
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/__init__.py b/lib/sqlalchemy/dialects/mysql/__init__.py
index 168529516..e4ecccdfc 100644
--- a/lib/sqlalchemy/dialects/mysql/__init__.py
+++ b/lib/sqlalchemy/dialects/mysql/__init__.py
@@ -1,4 +1,4 @@
-from sqlalchemy.dialects.mysql import base, mysqldb, oursql, pyodbc, zxjdbc, myconnpy
+from sqlalchemy.dialects.mysql import base, mysqldb, oursql, pyodbc, zxjdbc, mysqlconnector
# default dialect
base.dialect = mysqldb.dialect
diff --git a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py
index ac102f94a..3ac207109 100644
--- a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py
+++ b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py
@@ -57,13 +57,7 @@ class MySQL_mysqlconnector(MySQLDialect):
def _get_server_version_info(self, connection):
dbapi_con = connection.connection
- version = []
- r = re.compile('[.\-]')
- for n in r.split(dbapi_con.get_server_version()):
- try:
- version.append(int(n))
- except ValueError:
- version.append(n)
+ version = dbapi_con.get_server_version()
return tuple(version)
def _detect_charset(self, connection):