1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Fix for CONC-604 and CONC-605:

This patch fixes a crash when reconnectiong via TLS.
This commit is contained in:
Georg Richter
2022-07-18 11:41:46 +02:00
parent dac298de61
commit 9a572bc548
8 changed files with 72 additions and 67 deletions

View File

@@ -1830,6 +1830,11 @@ my_bool STDCALL mariadb_reconnect(MYSQL *mysql)
mysql_close(mysql);
*mysql=tmp_mysql;
mysql->net.pvio->mysql= mysql;
#ifdef HAVE_TLS
/* CONC-604: Set new connection handle */
if (mysql_get_ssl_cipher(mysql))
ma_pvio_tls_set_connection(mysql);
#endif
ma_net_clear(&mysql->net);
mysql->affected_rows= ~(unsigned long long) 0;
mysql->info= 0;