448
448
if (values_list.elements == 1 && (!(session->options & OPTION_WARNINGS) ||
449
449
!session->cuted_fields))
451
session->row_count_func= info.copied + info.deleted +
452
((session->client_capabilities & CLIENT_FOUND_ROWS) ?
453
info.touched : info.updated);
454
session->my_ok((ulong) session->row_count_func, id);
451
session->row_count_func= info.copied + info.deleted + info.updated;
452
session->my_ok((ulong) session->row_count_func,
453
info.copied + info.deleted + info.touched, id);
459
ha_rows updated=((session->client_capabilities & CLIENT_FOUND_ROWS) ?
460
info.touched : info.updated);
462
459
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
463
460
(ulong) (info.records - info.copied), (ulong) session->cuted_fields);
465
462
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
466
(ulong) (info.deleted + updated), (ulong) session->cuted_fields);
467
session->row_count_func= info.copied + info.deleted + updated;
468
session->my_ok((ulong) session->row_count_func, id, buff);
463
(ulong) (info.deleted + info.updated), (ulong) session->cuted_fields);
464
session->row_count_func= info.copied + info.deleted + info.updated;
465
session->my_ok((ulong) session->row_count_func,
466
info.copied + info.deleted + info.touched, id, buff);
470
468
session->abort_on_warning= 0;
471
469
DRIZZLE_INSERT_END();
1348
1346
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
1349
1347
(ulong) (info.deleted+info.updated), (ulong) session->cuted_fields);
1350
session->row_count_func= info.copied + info.deleted +
1351
((session->client_capabilities & CLIENT_FOUND_ROWS) ?
1352
info.touched : info.updated);
1348
session->row_count_func= info.copied + info.deleted + info.updated;
1354
1350
id= (session->first_successful_insert_id_in_cur_stmt > 0) ?
1355
1351
session->first_successful_insert_id_in_cur_stmt :
1356
1352
(session->arg_of_last_insert_id_function ?
1357
1353
session->first_successful_insert_id_in_prev_stmt :
1358
1354
(info.copied ? autoinc_value_of_last_inserted_row : 0));
1359
session->my_ok((ulong) session->row_count_func, id, buff);
1355
session->my_ok((ulong) session->row_count_func,
1356
info.copied + info.deleted + info.touched, id, buff);