support for driver mysql.connector, thank you Josiel Santos

This commit is contained in:
mdipierro
2013-09-19 21:44:12 -05:00
parent 860f40ca63
commit d3ab2e73d5
2 changed files with 7 additions and 2 deletions

View File

@@ -1 +1 @@
Version 2.6.3-stable+timestamp.2013.09.19.21.32.38
Version 2.6.3-stable+timestamp.2013.09.19.21.43.19

View File

@@ -310,6 +310,11 @@ if not 'google' in DRIVERS:
except ImportError:
LOGGER.debug('no MySQL driver MySQLDB')
try:
import mysql.connector as mysqlconnector
DRIVERS.append("MySQL(mysqlconnector)")
except ImportError:
LOGGER.debug("no driver mysql.connector")
try:
import psycopg2
@@ -2445,7 +2450,7 @@ class JDBCSQLiteAdapter(SQLiteAdapter):
class MySQLAdapter(BaseAdapter):
drivers = ('MySQLdb','pymysql')
drivers = ('MySQLdb','pymysql', 'mysqlconnector')
commit_on_alter_table = True
support_distributed_transaction = True