andrey Mon Oct 27 14:36:02 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mysqli mysqli_api.c mysqli_nonapi.c Log: MFH: Fix an issue with mysql.default_port not being used http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.20&r2=1.118.2.22.2.21&diff_format=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.20 php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.21 --- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.20 Tue Jan 1 16:51:09 2008 +++ php-src/ext/mysqli/mysqli_api.c Mon Oct 27 14:36:02 2008 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c,v 1.118.2.22.2.20 2008/01/01 16:51:09 hholzgra Exp $ + $Id: mysqli_api.c,v 1.118.2.22.2.21 2008/10/27 14:36:02 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -1425,14 +1425,20 @@ /* TODO: safe mode handling */ if (PG(sql_safe_mode)) { } else { + if (!socket_len || !socket) { + socket = MyG(default_socket); + } + if (!port) { + port = MyG(default_port); + } if (!passwd) { passwd = MyG(default_pw); - if (!username){ - username = MyG(default_user); - if (!hostname) { - hostname = MyG(default_host); - } - } + } + if (!username){ + username = MyG(default_user); + } + if (!hostname) { + hostname = MyG(default_host); } } http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.54.2.7.2.6&r2=1.54.2.7.2.7&diff_format=u Index: php-src/ext/mysqli/mysqli_nonapi.c diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.6 php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.7 --- php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.6 Mon Dec 31 07:20:08 2007 +++ php-src/ext/mysqli/mysqli_nonapi.c Mon Oct 27 14:36:02 2008 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_nonapi.c,v 1.54.2.7.2.6 2007/12/31 07:20:08 sebastian Exp $ + $Id: mysqli_nonapi.c,v 1.54.2.7.2.7 2008/10/27 14:36:02 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -56,14 +56,20 @@ /* TODO: safe mode handling */ if (PG(sql_safe_mode)){ } else { + if (!socket_len || !socket) { + socket = MyG(default_socket); + } + if (!port) { + port = MyG(default_port); + } if (!passwd) { passwd = MyG(default_pw); - if (!username){ - username = MyG(default_user); - if (!hostname) { - hostname = MyG(default_host); - } - } + } + if (!username){ + username = MyG(default_user); + } + if (!hostname) { + hostname = MyG(default_host); } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php