This PR solves double registration of prepared statements. They are registered twice: after Parse and ParseComplete, but because of a race condition, the pending statement can be replaced by another. Then, this triggers registration of a nil value as a statement.
To solve the problem, this PR removes the second registration.
There is one issue though: prepared statements are never cleaned, even ones that contain errors. This requires a large redesigning of the whole packet processing protocol. So, for now, we have a small memory leakage in a connection. But on practice this should not be an issue.
This PR solves double registration of prepared statements. They are registered twice: after
Parse
andParseComplete
, but because of a race condition, the pending statement can be replaced by another. Then, this triggers registration of anil
value as a statement.To solve the problem, this PR removes the second registration.
There is one issue though: prepared statements are never cleaned, even ones that contain errors. This requires a large redesigning of the whole packet processing protocol. So, for now, we have a small memory leakage in a connection. But on practice this should not be an issue.
Checklist