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

10.2 - integration fixes

- enable data truncation reporting for ps by default
- added plugin protoype definitions to mysql.h10.2 - integration fixes
This commit is contained in:
Georg Richter
2016-02-18 10:45:26 +01:00
parent d303cf76a7
commit 409d673291
7 changed files with 41 additions and 8 deletions

View File

@@ -939,6 +939,7 @@ mysql_init(MYSQL *mysql)
}
else
memset((char*) (mysql), 0, sizeof(*(mysql)));
mysql->options.report_data_truncation= 1;
mysql->options.connect_timeout=CONNECT_TIMEOUT;
mysql->charset= ma_default_charset_info;
mysql->methods= &MARIADB_DEFAULT_METHODS;
@@ -3104,12 +3105,12 @@ my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql)
uint STDCALL mysql_errno(MYSQL *mysql)
{
return (mysql)->net.last_errno;
return mysql ? mysql->net.last_errno : 0;
}
char * STDCALL mysql_error(MYSQL *mysql)
{
return (mysql)->net.last_error;
return mysql ? (mysql)->net.last_error : "";
}
char *STDCALL mysql_info(MYSQL *mysql)