1
0
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:
holyfoot/hf@mysql.com/hfmain.(none)
2007-11-30 19:16:13 +04:00
parent 8c3d5135ba
commit 5a6161dea4
4 changed files with 16 additions and 76 deletions

View File

@ -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;