diff options
Diffstat (limited to 'django/db/backends/mysql')
| -rw-r--r-- | django/db/backends/mysql/base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 04e5814988..e7e060e6c2 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -65,10 +65,11 @@ except ImportError: from django.utils._threading_local import local class DatabaseWrapper(local): - def __init__(self): + def __init__(self, **kwargs): self.connection = None self.queries = [] self.server_version = None + self.options = kwargs def _valid_connection(self): if self.connection is not None: @@ -95,6 +96,7 @@ class DatabaseWrapper(local): kwargs['host'] = settings.DATABASE_HOST if settings.DATABASE_PORT: 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': |
