Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.3.1, 3.1.16
-
None
Description
Both OpenSSL and GnuTLS need to retrieve the MYSQL connection handle in case of an error via gnutls_session_get_ptr() or SSL_get_app_data() api functions.
In case an reconnect occurred, the returned pointer still points to the stack address of tmp_mysql structure, declared in mariadb_reconnect() function. Since the content of tmp_mysql is copied to mysql, it is also necessary to update the mysql handle via gnutls_session_set_ptr() or SSL_set_app_data().