You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Schannel fix for 9ba8e32f6d
When we try to reconnect we need to set CLIENT_REMEMBER_OPTIONS otherwise new connection will not be secure.
This commit is contained in:
@@ -1216,7 +1216,7 @@ mysql_real_connect(MYSQL *mysql, const char *host, const char *user,
|
|||||||
while (ssl_retry)
|
while (ssl_retry)
|
||||||
{
|
{
|
||||||
if ((my= mysql->methods->db_connect(mysql, host, user, passwd,
|
if ((my= mysql->methods->db_connect(mysql, host, user, passwd,
|
||||||
db, port, unix_socket, client_flag)))
|
db, port, unix_socket, client_flag | CLIENT_REMEMBER_OPTIONS)))
|
||||||
return my;
|
return my;
|
||||||
|
|
||||||
switch (mysql->net.extension->extended_errno) {
|
switch (mysql->net.extension->extended_errno) {
|
||||||
@@ -1226,9 +1226,12 @@ mysql_real_connect(MYSQL *mysql, const char *host, const char *user,
|
|||||||
ssl_retry--;
|
ssl_retry--;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
ssl_retry= 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!ny && !(client_flag & CLIENT_REMEMBER_OPTIONS))
|
||||||
|
mysql_close_options(mysql);
|
||||||
return my;
|
return my;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user