mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #26921 Problem in mysql_insert_id() Embedded C API function.
client library only sets mysql->insert_id when query returned no recordset. So the embedded library should behave the same way
This commit is contained in:
@ -251,9 +251,11 @@ static my_bool emb_read_query_result(MYSQL *mysql)
|
||||
mysql->warning_count= res->embedded_info->warning_count;
|
||||
mysql->server_status= res->embedded_info->server_status;
|
||||
mysql->field_count= res->fields;
|
||||
mysql->fields= res->embedded_info->fields_list;
|
||||
mysql->affected_rows= res->embedded_info->affected_rows;
|
||||
mysql->insert_id= res->embedded_info->insert_id;
|
||||
if (!(mysql->fields= res->embedded_info->fields_list))
|
||||
{
|
||||
mysql->affected_rows= res->embedded_info->affected_rows;
|
||||
mysql->insert_id= res->embedded_info->insert_id;
|
||||
}
|
||||
mysql->net.last_errno= 0;
|
||||
mysql->net.last_error[0]= 0;
|
||||
mysql->info= 0;
|
||||
|
Reference in New Issue
Block a user