iliaa Tue Dec 4 13:05:03 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/pdo_pgsql pgsql_driver.c
/php-src NEWS
Log:
MFB: Fixed bug #43493 (pdo_pgsql does not send username on connect when
password is not available)
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.53.2.14.2.9&r2=1.53.2.14.2.10&diff_format=u
Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.9
php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.10
--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.9 Thu Jun 28 03:13:29 2007
+++ php-src/ext/pdo_pgsql/pgsql_driver.c Tue Dec 4 13:05:03 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql_driver.c,v 1.53.2.14.2.9 2007/06/28 03:13:29 iliaa Exp $ */
+/* $Id: pgsql_driver.c,v 1.53.2.14.2.10 2007/12/04 13:05:03 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -692,14 +692,14 @@
}
/* support both full connection string & connection string + login
and/or password */
- if (!dbh->username || !dbh->password) {
- spprintf(&conn_str, 0, "%s connect_timeout=%ld", (char *)
dbh->data_source, connect_timeout);
- } else if (dbh->username && dbh->password) {
+ if (dbh->username && dbh->password) {
spprintf(&conn_str, 0, "%s user=%s password=%s
connect_timeout=%ld", dbh->data_source, dbh->username, dbh->password,
connect_timeout);
} else if (dbh->username) {
spprintf(&conn_str, 0, "%s user=%s connect_timeout=%ld",
dbh->data_source, dbh->username, connect_timeout);
- } else {
+ } else if (dbh->password) {
spprintf(&conn_str, 0, "%s password=%s connect_timeout=%ld",
dbh->data_source, dbh->password, connect_timeout);
+ } else {
+ spprintf(&conn_str, 0, "%s connect_timeout=%ld", (char *)
dbh->data_source, connect_timeout);
}
H->server = PQconnectdb(conn_str);
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1027&r2=1.2027.2.547.2.1028&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1027 php-src/NEWS:1.2027.2.547.2.1028
--- php-src/NEWS:1.2027.2.547.2.1027 Mon Dec 3 16:33:37 2007
+++ php-src/NEWS Tue Dec 4 13:05:03 2007
@@ -3,6 +3,8 @@
?? ??? 2008, PHP 5.2.6
- Fixed weired behavior in CGI parameter parsing. (Dmitry, Hannes Magnusson)
+- Fixed bug #43493 (pdo_pgsql does not send username on connect when password
+ is not available). (Ilia)
- Fixed bug #43482 (array_pad() does not warn on very small pad numbers).
(Ilia)
- Fixed bug #43457 (Prepared statement with incorrect parms doesn't throw
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php