mirror of
https://github.com/django/django.git
synced 2025-01-03 06:55:47 +00:00
Fixed #1121 -- Changed MySQL backend to use correct character set in MySQL 4.1x/5.x on Win32. Thanks, hipertracker@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9f0deae249
commit
11bcc7969d
1
AUTHORS
1
AUTHORS
@ -52,6 +52,7 @@ answer newbie questions, and generally made Django that much better:
|
|||||||
Espen Grindhaug <http://grindhaug.org/>
|
Espen Grindhaug <http://grindhaug.org/>
|
||||||
Gustavo Picon
|
Gustavo Picon
|
||||||
Brant Harris
|
Brant Harris
|
||||||
|
hipertracker@gmail.com
|
||||||
Ian Holsman <http://feh.holsman.net/>
|
Ian Holsman <http://feh.holsman.net/>
|
||||||
Kieran Holland <http://www.kieranholland.com>
|
Kieran Holland <http://www.kieranholland.com>
|
||||||
Robert Rock Howard <http://djangomojo.com/>
|
Robert Rock Howard <http://djangomojo.com/>
|
||||||
|
@ -65,9 +65,12 @@ class DatabaseWrapper:
|
|||||||
if DATABASE_PORT:
|
if DATABASE_PORT:
|
||||||
kwargs['port'] = DATABASE_PORT
|
kwargs['port'] = DATABASE_PORT
|
||||||
self.connection = Database.connect(**kwargs)
|
self.connection = Database.connect(**kwargs)
|
||||||
|
cursor = self.connection.cursor()
|
||||||
|
if self.connection.get_server_info() >= '4.1':
|
||||||
|
cursor.execute("SET NAMES utf8")
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
return base.CursorDebugWrapper(MysqlDebugWrapper(self.connection.cursor()), self)
|
return base.CursorDebugWrapper(MysqlDebugWrapper(cursor), self)
|
||||||
return self.connection.cursor()
|
return cursor
|
||||||
|
|
||||||
def commit(self):
|
def commit(self):
|
||||||
self.connection.commit()
|
self.connection.commit()
|
||||||
|
Loading…
Reference in New Issue
Block a user