Attempt to remove UPDATE IGNORE+Delete & just use reliable update
authoreileen <emcnaughton@wikimedia.org>
Tue, 14 Apr 2020 01:04:12 +0000 (13:04 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 5 May 2020 04:09:53 +0000 (16:09 +1200)
Now we are no longer doing weird stuff with custom fields this should suffice

CRM/Dedupe/Merger.php

index c19ed52f2add10bc34337bcd4e8a4172f38347e6..851a1287dd7b1ed6e16195745877313f5ff059b0 100644 (file)
@@ -543,8 +543,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
 
           $preOperationSqls = self::operationSql($mainId, $otherId, $table, $tableOperations);
           $sqls = array_merge($sqls, $preOperationSqls);
-          $sqls[] = "UPDATE IGNORE $table SET $field = $mainId WHERE $field = $otherId";
-          $sqls[] = "DELETE FROM $table WHERE $field = $otherId";
+          $sqls[] = "UPDATE $table SET $field = $mainId WHERE $field = $otherId";
         }
       }