Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
3.1.27, 3.4.4, 3.3.14
-
None
Description
When closing a connection or in case a reconnect occured all statement handles will be invalidated by setting stmt->mysql to NULL. Since applications cannot check if a reconnect has occurred (without tracking change of thread_id) they will crash when calling a prepared statement API function, since stmt->mysql became NULL.
So in the prepared statement API we should always check validity of the connection (stmt->mysql) and return a CR_SERVER_LOST error when the statement was invalidated.