mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option).
This commit is contained in:
parent
ac5d5c7f35
commit
3b7da77480
1 changed files with 8 additions and 2 deletions
|
@ -4424,8 +4424,11 @@ PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *var
|
||||||
smart_str_appendc(&querystr, ';');
|
smart_str_appendc(&querystr, ';');
|
||||||
smart_str_0(&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;
|
ret = SUCCESS;
|
||||||
|
} else if (opt & PGSQL_DML_STRING) {
|
||||||
|
ret = SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (var_converted) {
|
if (var_converted) {
|
||||||
|
@ -4517,8 +4520,11 @@ PHP_PGSQL_API int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids
|
||||||
smart_str_appendc(&querystr, ';');
|
smart_str_appendc(&querystr, ';');
|
||||||
smart_str_0(&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;
|
ret = SUCCESS;
|
||||||
|
} else if (opt & PGSQL_DML_STRING) {
|
||||||
|
ret = SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (!(opt & PGSQL_DML_NO_CONV)) {
|
if (!(opt & PGSQL_DML_NO_CONV)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue