diff options
| author | Robin Munn <robin.munn@gmail.com> | 2007-01-31 23:43:09 +0000 |
|---|---|---|
| committer | Robin Munn <robin.munn@gmail.com> | 2007-01-31 23:43:09 +0000 |
| commit | fe361e678a46dc4c717c79c2f12b3ba32293b81a (patch) | |
| tree | 8f42488e7d95244bab3db7b2bf934e006940521a /django/db/backends/mysql | |
| parent | 122426e7453ed638a0c5be7e8b925adcddea3889 (diff) | |
Merged revisions 4186 to 4454 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/sqlalchemy@4455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/mysql')
| -rw-r--r-- | django/db/backends/mysql/base.py | 8 | ||||
| -rw-r--r-- | django/db/backends/mysql/creation.py | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index e7e060e6c2..28c5b1c683 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -98,9 +98,11 @@ class DatabaseWrapper(local): kwargs['port'] = int(settings.DATABASE_PORT) kwargs.update(self.options) self.connection = Database.connect(**kwargs) - cursor = self.connection.cursor() - if self.connection.get_server_info() >= '4.1': - cursor.execute("SET NAMES 'utf8'") + cursor = self.connection.cursor() + if self.connection.get_server_info() >= '4.1': + cursor.execute("SET NAMES 'utf8'") + else: + cursor = self.connection.cursor() if settings.DEBUG: return util.CursorDebugWrapper(MysqlDebugWrapper(cursor), self) return cursor diff --git a/django/db/backends/mysql/creation.py b/django/db/backends/mysql/creation.py index 116b490124..22ed901653 100644 --- a/django/db/backends/mysql/creation.py +++ b/django/db/backends/mysql/creation.py @@ -25,6 +25,5 @@ DATA_TYPES = { 'SmallIntegerField': 'smallint', 'TextField': 'longtext', 'TimeField': 'time', - 'URLField': 'varchar(200)', 'USStateField': 'varchar(2)', } |
