1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge commit '10.4' into 10.5

This commit is contained in:
Oleksandr Byelkin
2021-01-06 10:53:00 +01:00
160 changed files with 2757 additions and 1356 deletions

View File

@ -281,7 +281,15 @@ int TABLE::delete_row()
store_record(this, record[1]);
vers_update_end();
return file->ha_update_row(record[1], record[0]);
int err= file->ha_update_row(record[1], record[0]);
/*
MDEV-23644: we get HA_ERR_FOREIGN_DUPLICATE_KEY iff we already got history
row with same trx_id which is the result of foreign key action, so we
don't need one more history row.
*/
if (err == HA_ERR_FOREIGN_DUPLICATE_KEY)
return file->ha_delete_row(record[0]);
return err;
}