mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
There was no way to return an error from the client library if no MYSQL connections was established. So here i added variables to store that king of errors and made functions like mysql_error(NULL) to return these.
This commit is contained in:
@ -1486,7 +1486,7 @@ my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql)
|
||||
|
||||
const char *STDCALL mysql_sqlstate(MYSQL *mysql)
|
||||
{
|
||||
return mysql->net.sqlstate;
|
||||
return mysql ? mysql->net.sqlstate : cant_connect_sqlstate;
|
||||
}
|
||||
|
||||
uint STDCALL mysql_warning_count(MYSQL *mysql)
|
||||
|
Reference in New Issue
Block a user