Merge "ThreadItemStore: Omit redundant updates to avoid warnings"

This commit is contained in:
jenkins-bot 2023-12-14 11:06:45 +00:00 committed by Gerrit Code Review
commit 797bd2ea0b

View file

@ -680,7 +680,11 @@ class ThreadItemStore {
// which are causing conflicts (T339882, T343859#9185559) // which are causing conflicts (T339882, T343859#9185559)
->onDuplicateKeyUpdate() ->onDuplicateKeyUpdate()
->uniqueIndexFields( [ 'itr_itemid_id', 'itr_revision_id' ] ) ->uniqueIndexFields( [ 'itr_itemid_id', 'itr_revision_id' ] )
->set( $newOrUpdateRevRow ) // Omit redundant updates to avoid warnings (T353432)
->set( array_diff_key(
$newOrUpdateRevRow,
[ 'itr_itemid_id' => true, 'itr_revision_id' => true ]
) )
->caller( $method ) ->caller( $method )
->execute(); ->execute();
return $dbw->affectedRows() ? $dbw->insertId() : null; return $dbw->affectedRows() ? $dbw->insertId() : null;