mirror of
https://github.com/MariaDB/server.git
synced 2025-07-05 12:42:17 +03:00
sql_insert.cc:
Post-merge fix.
This commit is contained in:
@ -1262,6 +1262,8 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
|||||||
compare_record(table))
|
compare_record(table))
|
||||||
{
|
{
|
||||||
info->updated++;
|
info->updated++;
|
||||||
|
info->copied++;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
If ON DUP KEY UPDATE updates a row instead of inserting one, it's
|
If ON DUP KEY UPDATE updates a row instead of inserting one, it's
|
||||||
like a regular UPDATE statement: it should not affect the value of a
|
like a regular UPDATE statement: it should not affect the value of a
|
||||||
@ -1271,12 +1273,11 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
|||||||
*/
|
*/
|
||||||
insert_id_for_cur_row= table->file->insert_id_for_cur_row= 0;
|
insert_id_for_cur_row= table->file->insert_id_for_cur_row= 0;
|
||||||
if (table->next_number_field)
|
if (table->next_number_field)
|
||||||
table->file->adjust_next_insert_id_after_explicit_value(table->next_number_field->val_int());
|
table->file->adjust_next_insert_id_after_explicit_value(
|
||||||
|
table->next_number_field->val_int());
|
||||||
trg_error= (table->triggers &&
|
trg_error= (table->triggers &&
|
||||||
table->triggers->process_triggers(thd, TRG_EVENT_UPDATE,
|
table->triggers->process_triggers(thd, TRG_EVENT_UPDATE,
|
||||||
TRG_ACTION_AFTER, TRUE));
|
TRG_ACTION_AFTER, TRUE));
|
||||||
info->copied++;
|
|
||||||
}
|
|
||||||
goto ok_or_after_trg_err;
|
goto ok_or_after_trg_err;
|
||||||
}
|
}
|
||||||
else /* DUP_REPLACE */
|
else /* DUP_REPLACE */
|
||||||
|
Reference in New Issue
Block a user