diff options
author | Anatol Belski <ab@php.net> | 2015-01-15 17:48:11 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-01-15 17:48:11 +0100 |
commit | 3d6a83a7d0e86acd4227586357b5010ebc09ce36 (patch) | |
tree | 96ab65c339e82c2b5e3d9c96fd23246a9ef0253c /ext/pdo_mysql/mysql_driver.c | |
parent | 0579e8278dad43c7ebc070468b56caddf1c660b8 (diff) | |
parent | 0cef7d168dd66df6ec714f1a0dfec2682da26bce (diff) | |
download | php-git-3d6a83a7d0e86acd4227586357b5010ebc09ce36.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
updated NEWS
PDO_MySQL: Differentiate between linux and win32 when passing unix_socket
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rw-r--r-- | ext/pdo_mysql/mysql_driver.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 94a8ec777f..f198753100 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -743,9 +743,14 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ if(vars[3].optval) { port = atoi(vars[3].optval); } - if (vars[2].optval && !strcmp("localhost", vars[2].optval)) { - unix_socket = vars[4].optval; - } + +#ifdef PHP_WIN32 + if (vars[2].optval && !strcmp(".", vars[2].optval)) { +#else + if (vars[2].optval && !strcmp("localhost", vars[2].optval)) { +#endif + unix_socket = vars[4].optval; + } /* TODO: - Check zval cache + ZTS */ #ifdef PDO_USE_MYSQLND |