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
Fix for CONC-703:
If connect failed and no error was set (apparently this happens sometimes on Mac) we now set error to CR_SERVER_LOST.
This commit is contained in:
@@ -2040,6 +2040,12 @@ error:
|
||||
if (!(client_flag & CLIENT_REMEMBER_OPTIONS) &&
|
||||
!(IS_MYSQL_ASYNC(mysql)))
|
||||
mysql_close_options(mysql);
|
||||
|
||||
/* CONC-703: If no error was set, we set CR_SERVER_LOST by default */
|
||||
if (!mysql_errno(mysql))
|
||||
my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN,
|
||||
"Can't connect to server (%d).",
|
||||
errno);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user