Mysql error 1062 duplicate entry for key primary

FYI I've also applied below patch but the error seems to still happen meaning it doesn't look like the read uncommitted is causing this.

diff --git a/core/DataAccess/LogAggregator.php b/core/DataAccess/LogAggregator.php
index cada4b1571..eb2a94611b 100644
--- a/core/DataAccess/LogAggregator.php
+++ b/core/DataAccess/LogAggregator.php
@@ -305,7 +305,7 @@ class LogAggregator
             // set uncommitted is easily noticeable in the code as it could be missed quite easily otherwise
             // we set uncommitted so we don't make the INSERT INTO... SELECT... locking ... we do not want to lock
             // eg the visits table
-            if [!$transactionLevel->setUncommitted[]] {
+            if [0 && !$transactionLevel->setUncommitted[]] {
                 $canSetTransactionLevel = false;
             }
         }

I am getting a MySQL error regarding a duplicate entry when using the following code. 

Bài mới nhất

Chủ Đề