]> git.mxchange.org Git - friendica.git/commitdiff
Should fix "DB Error 1205: Lock wait timeout exceeded; try restarting transaction"
authorMichael <heluecht@pirati.ca>
Tue, 12 Feb 2019 21:10:45 +0000 (21:10 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 12 Feb 2019 21:10:45 +0000 (21:10 +0000)
src/Model/Item.php

index 54bd4a0ef7fe9db03e47079ec3cac5f781d0ab17..475f9131fd2bfb227b375f7c09c6fb6e0723e2f9 100644 (file)
@@ -1609,7 +1609,7 @@ class Item extends BaseObject
                        $item["global"] = true;
 
                        // Set the global flag on all items if this was a global item entry
-                       self::update(['global' => true], ['uri' => $item["uri"]]);
+                       DBA::update('item', ['global' => true], ['uri' => $item["uri"]]);
                } else {
                        $item["global"] = self::exists(['uid' => 0, 'uri' => $item["uri"]]);
                }
@@ -1765,7 +1765,7 @@ class Item extends BaseObject
                }
 
                // Set parent id
-               self::update(['parent' => $parent_id], ['id' => $current_post]);
+               DBA::update('item', ['parent' => $parent_id], ['id' => $current_post]);
 
                $item['id'] = $current_post;
                $item['parent'] = $parent_id;
@@ -1773,9 +1773,9 @@ class Item extends BaseObject
                // update the commented timestamp on the parent
                // Only update "commented" if it is really a comment
                if (($item['gravity'] != GRAVITY_ACTIVITY) || !Config::get("system", "like_no_comment")) {
-                       self::update(['commented' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()], ['id' => $parent_id]);
+                       DBA::update('item', ['commented' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()], ['id' => $parent_id]);
                } else {
-                       self::update(['changed' => DateTimeFormat::utcNow()], ['id' => $parent_id]);
+                       DBA::update('item', ['changed' => DateTimeFormat::utcNow()], ['id' => $parent_id]);
                }
 
                if ($dsprsig) {