1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#44306: Assertion fail on duplicate key error in

'INSERT ... SELECT' statements

Merge
This commit is contained in:
Martin Hansson
2009-05-04 14:57:42 +02:00
3 changed files with 19 additions and 2 deletions

View File

@ -7092,15 +7092,17 @@ return_zero_rows(JOIN *join, select_result *result,TABLE_LIST *tables,
if (!(result->send_fields(fields,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)))
{
bool send_error= FALSE;
if (send_row)
{
List_iterator_fast<Item> it(fields);
Item *item;
while ((item= it++))
item->no_rows_in_result();
result->send_data(fields);
send_error= result->send_data(fields);
}
result->send_eof(); // Should be safe
if (!send_error)
result->send_eof(); // Should be safe
}
/* Update results for FOUND_ROWS */
join->thd->limit_found_rows= join->thd->examined_row_count= 0;