mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
into moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql mysql-test/r/gis.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/t/gis.test: Auto merged mysql-test/t/subselect.test: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/sql_insert.cc: Auto merged mysql-test/include/mix1.inc: Manually merged mysql-test/r/innodb_mysql.result: Manually merged mysql-test/r/type_datetime.result: Manually merged mysql-test/t/type_datetime.test: Manually merged sql/field.h: Manually merged sql/sql_select.cc: Manually merged sql/sql_yacc.yy: Manually merged tests/mysql_client_test.c: Manually merged
This commit is contained in:
@@ -932,20 +932,24 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
if (values_list.elements == 1 && (!(thd->options & OPTION_WARNINGS) ||
|
||||
!thd->cuted_fields))
|
||||
{
|
||||
thd->row_count_func= info.copied+info.deleted+info.updated;
|
||||
thd->row_count_func= info.copied + info.deleted +
|
||||
((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
|
||||
info.touched : info.updated);
|
||||
send_ok(thd, (ulong) thd->row_count_func, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
char buff[160];
|
||||
ha_rows updated=((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
|
||||
info.touched : info.updated);
|
||||
if (ignore)
|
||||
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
|
||||
(lock_type == TL_WRITE_DELAYED) ? (ulong) 0 :
|
||||
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
|
||||
else
|
||||
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
|
||||
(ulong) (info.deleted+info.updated), (ulong) thd->cuted_fields);
|
||||
thd->row_count_func= info.copied+info.deleted+info.updated;
|
||||
(ulong) (info.deleted + updated), (ulong) thd->cuted_fields);
|
||||
thd->row_count_func= info.copied + info.deleted + updated;
|
||||
::send_ok(thd, (ulong) thd->row_count_func, id, buff);
|
||||
}
|
||||
thd->abort_on_warning= 0;
|
||||
@@ -3136,7 +3140,9 @@ bool select_insert::send_eof()
|
||||
else
|
||||
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
|
||||
(ulong) (info.deleted+info.updated), (ulong) thd->cuted_fields);
|
||||
thd->row_count_func= info.copied+info.deleted+info.updated;
|
||||
thd->row_count_func= info.copied + info.deleted +
|
||||
((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
|
||||
info.touched : info.updated);
|
||||
|
||||
id= (thd->first_successful_insert_id_in_cur_stmt > 0) ?
|
||||
thd->first_successful_insert_id_in_cur_stmt :
|
||||
|
Reference in New Issue
Block a user