core/php/mysqlnd_default_port.patch
Phil Miller 89f5fdf6ea * sync repo with chakra-core
- added some makedeps
- fixed some pkgs
- broken pkgs: 7
2010-05-18 14:39:29 +00:00

24 lines
556 B
Diff

--- ext/mysqlnd/mysqlnd.c 2010-03-09 09:39:20.000000000 +0100
+++ ext/mysqlnd/mysqlnd.c 2010-03-09 09:00:40.000000000 +0100
@@ -527,9 +527,6 @@
db = "";
db_len = 0;
}
- if (!port && !socket) {
- port = 3306;
- }
host_len = strlen(host);
#ifndef PHP_WIN32
if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
@@ -541,6 +538,10 @@
} else
#endif
{
+ if (!port) {
+ port = 3306;
+ }
+
transport_len = spprintf(&transport, 0, "tcp://%s:%d", host, port);
}
DBG_INF_FMT("transport=%s", transport);