Author: russellm
Date: 2010-08-28 08:20:11 -0500 (Sat, 28 Aug 2010)
New Revision: 13663

Modified:
   django/branches/releases/1.2.X/django/db/backends/mysql/client.py
Log:
[1.2.X] Fixed #12343 -- Added support for connection-by-socket to MySQL using 
the dbshell management command. Thanks to [email protected] for the report, 
and sfllaw for the patch.

Backport of r13660 from trunk.

Modified: django/branches/releases/1.2.X/django/db/backends/mysql/client.py
===================================================================
--- django/branches/releases/1.2.X/django/db/backends/mysql/client.py   
2010-08-28 13:19:49 UTC (rev 13662)
+++ django/branches/releases/1.2.X/django/db/backends/mysql/client.py   
2010-08-28 13:20:11 UTC (rev 13663)
@@ -24,7 +24,10 @@
         if passwd:
             args += ["--password=%s" % passwd]
         if host:
-            args += ["--host=%s" % host]
+            if '/' in host:
+                args += ["--socket=%s" % host]
+            else:
+               args += ["--host=%s" % host]
         if port:
             args += ["--port=%s" % port]
         if db:

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to