Closed marcioAlmada closed 7 years ago
@marcioAlmada, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bwoebi and @rdlowrey to be potential reviewers.
Relates to #30
@bwoebi perhaps you could give me a hint here.
MySQL should handle that transparently.
Yes, amp/mysql should handle that transparently. You do not really want, in a long running application take care yourself at every statement invocation whether connection has been lost or not.
I've managed to fix these 2 little issues in the call graph related to connection pool recovery, which is good enough for 90% use cases.
But I still could not handle the situation when prepared statements were prepared before the database was restarted.
Scenario:
Error:
But then I wonder if it should be really possible to reuse a prepared statement after mysql is restarted or if Amp\Mysql should handle this transparently so users won't need to 🤔