File: bug-232816-support-for-socket-connection.patch

package info (click to toggle)
wwwconfig-common 0.3.0
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 488 kB
  • sloc: sh: 952; makefile: 5
file content (41 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Package: wwwconfig-common
Version: 0.0.33
Severity: normal
Tags: patch

The mysql-server package out of the box only supports socket
connections; mysql.set doesn't know how to deal with this.  This patch
uses the same convention as php's mysql_connect function, so that a
"server" of the form :/path/to/socket will use a socket to connect to
the mysql server.

--- mysql.get.dpkg-dist	2004-02-14 19:04:08.000000000 -0500
+++ mysql.get	2004-02-14 18:41:30.000000000 -0500
@@ -16,7 +16,15 @@
     dbserver=localhost
 fi
 if [ "$dbserver" != "localhost" ] ; then
-    hostopt="-h '$dbserver'"
+    case "$dbserver" in
+	:*)
+		dbsocket=`echo $dbserver | sed -e 's/^://'`
+		hostopt="-S '$dbsocket'"
+		;;
+	*)
+		hostopt="-h '$dbserver'"
+		;;
+    esac
 fi
 if [ -z "$dbadmpass" ] ; then
     log="${log}No password used."


-- System Information:
Debian Release: testing/unstable
Architecture: sparc
Kernel: Linux pulse-plasma-gun 2.4.21 #1 Thu Aug 7 20:30:12 EDT 2003 sparc64
Locale: LANG=C, LC_CTYPE=C

-- no debconf information