1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

bugfix: update-behind-insert

sql_insert.cc calls handler->ha_update_row() for
REPLACE and INSERT... ON DUPLICATE KEY UPDATE
This commit is contained in:
Sergei Golubchik
2016-11-16 19:26:55 +01:00
parent 54ab7db733
commit b8f51c04d3
3 changed files with 23 additions and 0 deletions

View File

@@ -1696,6 +1696,12 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
HA_READ_KEY_EXACT))))
goto err;
}
if (table->vfield)
{
table->move_fields(table->field, table->record[1], table->record[0]);
table->update_virtual_fields(VCOL_UPDATE_INDEXED);
table->move_fields(table->field, table->record[0], table->record[1]);
}
if (info->handle_duplicates == DUP_UPDATE)
{
int res= 0;