1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

[1.2.X] Fixed #12343 -- Added support for connection-by-socket to MySQL using the dbshell management command. Thanks to elyon001@gmail.com for the report, and sfllaw for the patch.

Backport of r13660 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-08-28 13:20:11 +00:00
parent af0e3217ae
commit 6fbd860fa8

View File

@ -24,7 +24,10 @@ class DatabaseClient(BaseDatabaseClient):
if passwd: if passwd:
args += ["--password=%s" % passwd] args += ["--password=%s" % passwd]
if host: if host:
args += ["--host=%s" % host] if '/' in host:
args += ["--socket=%s" % host]
else:
args += ["--host=%s" % host]
if port: if port:
args += ["--port=%s" % port] args += ["--port=%s" % port]
if db: if db: