Fix GH-9411: PgSQL large object resource is incorrectly closed

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-9411.
This commit is contained in:
Yurun 2022-09-05 14:53:33 +02:00 committed by Christoph M. Becker
parent 81cb005ef7
commit 6ac3f7c84d
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
5 changed files with 95 additions and 5 deletions

View file

@ -45,6 +45,7 @@ typedef struct {
zend_bool emulate_prepares;
zend_bool disable_native_prepares; /* deprecated since 5.6 */
zend_bool disable_prepares;
HashTable *lob_streams;
} pdo_pgsql_db_handle;
typedef struct {
@ -109,5 +110,6 @@ php_stream *pdo_pgsql_create_lob_stream(zval *pdh, int lfd, Oid oid);
extern const php_stream_ops pdo_pgsql_lob_stream_ops;
void pdo_libpq_version(char *buf, size_t len);
void pdo_pgsql_close_lob_streams(pdo_dbh_t *dbh);
#endif /* PHP_PDO_PGSQL_INT_H */