iliaa           Sun Jan 11 16:18:31 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/pgsql  pgsql.c 
  Log:
  MFH: Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option).
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.520 php-src/NEWS:1.1247.2.521
--- php-src/NEWS:1.1247.2.520   Thu Jan  8 20:35:57 2004
+++ php-src/NEWS        Sun Jan 11 16:18:28 2004
@@ -10,6 +10,7 @@
 - Added a warning when creating temp stream fails with ftp_(n)list(). (Sara)
 - Fixed header handler in NSAPI SAPI module (header->replace was ignored,
   send_default_content_type now sends value from php.ini). (Uwe Schindler)
+- Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option). (Ilia)
 - Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces).
   (Ilia)
 - Fixed bug #26777 (ext/interbase: Let DB handle NULL params). (Ard)
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.244.2.31 php-src/ext/pgsql/pgsql.c:1.244.2.32
--- php-src/ext/pgsql/pgsql.c:1.244.2.31        Mon Dec 22 10:56:52 2003
+++ php-src/ext/pgsql/pgsql.c   Sun Jan 11 16:18:29 2004
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: pgsql.c,v 1.244.2.31 2003/12/22 15:56:52 iliaa Exp $ */
+/* $Id: pgsql.c,v 1.244.2.32 2004/01/11 21:18:29 iliaa Exp $ */
 
 #include <stdlib.h>
 
@@ -4283,8 +4283,11 @@
        smart_str_appendc(&querystr, ';');      
        smart_str_0(&querystr);
 
-       if (do_exec(&querystr, PGRES_COMMAND_OK, pg_link, opt TSRMLS_CC) == 0)
+       if ((opt & PGSQL_DML_EXEC) && do_exec(&querystr, PGRES_COMMAND_OK, pg_link, 
opt TSRMLS_CC) == 0) {
                ret = SUCCESS;
+       } else if (opt & PGSQL_DML_STRING) {
+               ret = SUCCESS;
+       }
 
 cleanup:
        if (var_converted) {
@@ -4376,8 +4379,11 @@
        smart_str_appendc(&querystr, ';');
        smart_str_0(&querystr);
 
-       if (do_exec(&querystr, PGRES_COMMAND_OK, pg_link, opt TSRMLS_CC) == 0)
+       if ((opt & PGSQL_DML_EXEC) && do_exec(&querystr, PGRES_COMMAND_OK, pg_link, 
opt TSRMLS_CC) == 0) {
                ret = SUCCESS;
+       } else if (opt & PGSQL_DML_STRING) {
+               ret = SUCCESS;
+       }
 
 cleanup:
        if (!(opt & PGSQL_DML_NO_CONV)) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to