You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fix for CONC-179:
- Fixed offset for warning_count in ps protocol - Added new api function mysql_stmt_warning_count - For backwards compatibility we also update the value for mysql_warning_count function
This commit is contained in:
@@ -1183,11 +1183,12 @@ my_bool mthd_stmt_read_prepare_response(MYSQL_STMT *stmt)
|
||||
stmt->field_count= uint2korr(p);
|
||||
p+= 2;
|
||||
stmt->param_count= uint2korr(p);
|
||||
p+= 2;
|
||||
|
||||
/* filler */
|
||||
p++;
|
||||
stmt->upsert_status.warning_count= uint2korr(p);
|
||||
|
||||
/* for backward compatibility we also update mysql->warning_count */
|
||||
stmt->mysql->warning_count= stmt->upsert_status.warning_count= uint2korr(p);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -1216,6 +1217,11 @@ my_bool mthd_stmt_get_result_metadata(MYSQL_STMT *stmt)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int STDCALL mysql_stmt_warning_count(MYSQL_STMT *stmt)
|
||||
{
|
||||
return stmt->upsert_status.warning_count;
|
||||
}
|
||||
|
||||
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, size_t length)
|
||||
{
|
||||
MYSQL *mysql= stmt->mysql;
|
||||
|
Reference in New Issue
Block a user