Project

General

Profile

Actions

Bug #34129

closed

CachingFramework: pdoBackend duplicate entry

Added by Leon Dietsch over 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-02-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The function "set" in the PdoBackend checks if the hash exists and only then removes it.

if ($this->has($entryIdentifier)) {
    $this->remove($entryIdentifier);
}

But the function "has" selects unexpired entries only. If the cache entry is expired it won't be found by "has" and won't get removed before the new entry is created. PDO throws an expection in this case, because "set" tries to add an already existing entry:

SQLSTATE\[23000\]: Integrity constraint violation: 1062 Duplicate entry 'XXX' for key 'PRIMARY'

I suggest to fix this issue by always removing the entry when "set" is called, like the DbBackend does.

I don't know if sqllite would just overwrite the entry. I use the PdoBackend with MySQL.

Actions #1

Updated by Stefan Galinski over 12 years ago

Sounds like you got an idea how to fix that issues. Can you provide a patch and open a new review request please?

http://wiki.typo3.org/Contribution_Walkthrough_Tutorials

Actions #2

Updated by Leon Dietsch over 12 years ago

Never did this before. I'll try to follow the walkthrough.

Actions #3

Updated by Gerrit Code Review over 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9144

Actions #4

Updated by Gerrit Code Review over 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9144

Actions #5

Updated by Gerrit Code Review almost 12 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9144

Actions #6

Updated by Gerrit Code Review almost 12 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/9144

Actions #7

Updated by Gerrit Code Review almost 12 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/9144

Actions #8

Updated by Gerrit Code Review almost 12 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18098

Actions #9

Updated by Anonymous almost 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Gerrit Code Review almost 12 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/18101

Actions #11

Updated by Gerrit Code Review almost 12 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at https://review.typo3.org/18102

Actions #12

Updated by Gerrit Code Review almost 12 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/18103

Actions #13

Updated by Anonymous almost 12 years ago

  • Status changed from Under Review to Resolved
Actions #14

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master_new has been pushed to the review server.
It is available at https://review.typo3.org/18626

Actions #15

Updated by Christian Kuhn over 11 years ago

  • Status changed from Under Review to Resolved
Actions #16

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF