php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60748
Patch mysqlnd-sock.patch revision 2012-01-13 17:27 UTC by fedora at famillecollet dot com
revision 2012-01-13 16:56 UTC by fedora at famillecollet dot com

Patch mysqlnd-sock.patch for MySQL related Bug #60748

Patch version 2012-01-13 17:27 UTC

Return to Bug #60748 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: fedora@famillecollet.com

diff -up php-5.4.0RC5/ext/mysqlnd/mysqlnd.c.sock php-5.4.0RC5/ext/mysqlnd/mysqlnd.c
--- php-5.4.0RC5/ext/mysqlnd/mysqlnd.c.sock	2012-01-01 14:15:04.000000000 +0100
+++ php-5.4.0RC5/ext/mysqlnd/mysqlnd.c	2012-01-13 18:25:59.507030997 +0100
@@ -695,7 +695,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, connec
 		if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
 			DBG_INF_FMT("socket=%s", socket_or_pipe? socket_or_pipe:"n/a");
 			if (!socket_or_pipe) {
+#ifdef PHP_MYSQL_UNIX_SOCK_ADDR
+				socket_or_pipe = PHP_MYSQL_UNIX_SOCK_ADDR;
+#else
 				socket_or_pipe = "/tmp/mysql.sock";
+#endif
 			}
 			transport_len = mnd_sprintf(&transport, 0, "unix://%s", socket_or_pipe);
 			unix_socket = TRUE;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 18:01:31 2024 UTC