buggins / ddbc

DDBC is DB Connector for D language (similar to JDBC)
78 stars 45 forks source link

Bug: Closing connection closes already closed PGSQLPreparedStatement #125

Closed vnayar closed 7 months ago

vnayar commented 7 months ago

Remove flawed PGSQLPreparedStatement::close() method. This method is nearly identical to PGSQLStatement::close(), however, it lacks a call to conn.onStatementClosed(this). Due to this deficiency, the connection will attempt to close the statement a 2nd time when it is closed, resulting in an exception being thrown.

By erasing the implementation in PGSQLPreparedStatement, the correct implemention in PGSQLStatement can be used.