Browse Source

- Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down)

patch by: gyp at balabit dot hu
PHP-5.2
Felipe Pena 16 years ago
parent
commit
67db416711
  1. 2
      NEWS
  2. 2
      ext/pdo_pgsql/pgsql_statement.c

2
NEWS

@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 5.2.16
- Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down).
(gyp at balabit dot hu)
- Fixed bug #53516 (Regression in open_basedir handling). (Ilia)
09 Dec 2010, PHP 5.2.15

2
ext/pdo_pgsql/pgsql_statement.c

@ -156,7 +156,7 @@ stmt_retry:
* chance to DEALLOCATE the prepared statements it has created. so, if we hit a 42P05 we
* deallocate it and retry ONCE (thies 2005.12.15)
*/
if (!strcmp(sqlstate, "42P05")) {
if (sqlstate && !strcmp(sqlstate, "42P05")) {
char buf[100]; /* stmt_name == "pdo_crsr_%08x" */
PGresult *res;
snprintf(buf, sizeof(buf), "DEALLOCATE %s", S->stmt_name);

Loading…
Cancel
Save