diff options
| author | Alexander Nozdrin <alik@sun.com> | 2010-05-20 16:35:28 +0400 |
|---|---|---|
| committer | Alexander Nozdrin <alik@sun.com> | 2010-05-20 16:35:28 +0400 |
| commit | eff442964a68d63a0ce9fe3e89332e5cc2b623e4 (patch) | |
| tree | 2b0d3650bb46050bc0438cfd5228e52e89aa3895 /sql/sql_insert.cc | |
| parent | a68a68bf45807fc50bf05c2f2e4cde3329755b41 (diff) | |
| parent | d8b33c52b6538e85ab489be8a11ef6f7ebb1205f (diff) | |
| download | mariadb-git-eff442964a68d63a0ce9fe3e89332e5cc2b623e4.tar.gz | |
Manual merge from mysql-trunk.
Conflicts:
- mysql-test/r/partition.result
- mysql-test/r/variables_debug.result
- mysql-test/t/partition.test
- mysql-test/t/variables_debug.test
Diffstat (limited to 'sql/sql_insert.cc')
| -rw-r--r-- | sql/sql_insert.cc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2d2564a515c..d40f0dcb410 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1005,10 +1005,10 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, if (values_list.elements == 1 && (!(thd->variables.option_bits & OPTION_WARNINGS) || !thd->cuted_fields)) { - thd->row_count_func= info.copied + info.deleted + - ((thd->client_capabilities & CLIENT_FOUND_ROWS) ? - info.touched : info.updated); - my_ok(thd, (ulong) thd->row_count_func, id); + my_ok(thd, info.copied + info.deleted + + ((thd->client_capabilities & CLIENT_FOUND_ROWS) ? + info.touched : info.updated), + id); } else { @@ -1024,8 +1024,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records, (ulong) (info.deleted + updated), (ulong) thd->warning_info->statement_warn_count()); - thd->row_count_func= info.copied + info.deleted + updated; - ::my_ok(thd, (ulong) thd->row_count_func, id, buff); + ::my_ok(thd, info.copied + info.deleted + updated, id, buff); } thd->abort_on_warning= 0; DBUG_RETURN(FALSE); @@ -3337,7 +3336,7 @@ bool select_insert::send_eof() { int error; bool const trans_table= table->file->has_transactions(); - ulonglong id; + ulonglong id, row_count; bool changed; THD::killed_state killed_status= thd->killed; DBUG_ENTER("select_insert::send_eof"); @@ -3403,16 +3402,15 @@ bool select_insert::send_eof() sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records, (ulong) (info.deleted+info.updated), (ulong) thd->warning_info->statement_warn_count()); - thd->row_count_func= info.copied + info.deleted + - ((thd->client_capabilities & CLIENT_FOUND_ROWS) ? - info.touched : info.updated); - + row_count= 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 : (thd->arg_of_last_insert_id_function ? thd->first_successful_insert_id_in_prev_stmt : (info.copied ? autoinc_value_of_last_inserted_row : 0)); - ::my_ok(thd, (ulong) thd->row_count_func, id, buff); + ::my_ok(thd, row_count, id, buff); DBUG_RETURN(0); } |
