cvs: php-src(PHP_5_2) / NEWS /ext/pgsql pgsql.c
| From: | Ilia Alshanetsky | Date: | Sun, 07 Jan 2007 04:36:41 +0000 |
| Subject: | cvs: php-src(PHP_5_2) / NEWS /ext/pgsql pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-42599@lists.php.net to get a copy of this message | ||
iliaa Sun Jan 7 04:36:41 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/pgsql pgsql.c
/php-src NEWS
Log:
Fixed bug #39979 (PGSQL_CONNECT_FORCE_NEW will causes next connect to
establish a new connection).
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.16&r2=1.331.2.13.2.17&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.16 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.17
--- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.16 Fri Jan 5 15:06:55 2007
+++ php-src/ext/pgsql/pgsql.c Sun Jan 7 04:36:40 2007
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.331.2.13.2.16 2007/01/05 15:06:55 iliaa Exp $ */
+/* $Id: pgsql.c,v 1.331.2.13.2.17 2007/01/07 04:36:40 iliaa Exp $ */
#include <stdlib.h>
@@ -629,6 +629,16 @@
smart_str_appends(&str, "pgsql");
for (i = 0; i < ZEND_NUM_ARGS(); i++) {
+ /* make sure that the PGSQL_CONNECT_FORCE_NEW bit is not part of the hash so that subsequent
connections
+ * can re-use this connection. Bug #39979
+ */
+ if (i == 1 && ZEND_NUM_ARGS() == 2 && Z_TYPE_PP(args[i]) == IS_LONG) {
+ if (Z_LVAL_PP(args[1]) == PGSQL_CONNECT_FORCE_NEW) {
+ continue;
+ } else if (Z_LVAL_PP(args[1]) & PGSQL_CONNECT_FORCE_NEW) {
+ smart_str_append_long(&str, Z_LVAL_PP(args[1]) ^ PGSQL_CONNECT_FORCE_NEW);
+ }
+ }
convert_to_string_ex(args[i]);
smart_str_appendc(&str, '_');
smart_str_appendl(&str, Z_STRVAL_PP(args[i]), Z_STRLEN_PP(args[i]));
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.476&r2=1.2027.2.547.2.477&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.476 php-src/NEWS:1.2027.2.547.2.477
--- php-src/NEWS:1.2027.2.547.2.476 Sun Jan 7 03:52:44 2007
+++ php-src/NEWS Sun Jan 7 04:36:40 2007
@@ -5,6 +5,8 @@
CMD.EXE. (Dmitry)
- Fixed bug #40036 (empty() does not work correctly with ArrayObject when using
ARRAY_AS_PROPS). (Ilia)
+- Fixed bug #39979 (PGSQL_CONNECT_FORCE_NEW will causes next connect to
+ establish a new connection). (Ilia)
- Fixed bug #39504 (xmlwriter_write_dtd_entity() creates Attlist tag,
not entity). (Hannes)