1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

magic-removal: Merged to [1878]

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2006-01-09 01:57:26 +00:00
parent 8b1662a185
commit e9a13940d3
2 changed files with 6 additions and 2 deletions

View File

@@ -64,9 +64,12 @@ class DatabaseWrapper:
if DATABASE_PORT:
kwargs['port'] = DATABASE_PORT
self.connection = Database.connect(**kwargs)
cursor = self.connection.cursor()
if self.connection.get_server_info() >= '4.1':
cursor.execute("SET NAMES utf8")
if DEBUG:
return util.CursorDebugWrapper(MysqlDebugWrapper(self.connection.cursor()), self)
return self.connection.cursor()
return base.CursorDebugWrapper(MysqlDebugWrapper(cursor), self)
return cursor
def commit(self):
self.connection.commit()