Bug #34129
closedCachingFramework: pdoBackend duplicate entry
100%
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.
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?
Updated by Leon Dietsch over 12 years ago
Never did this before. I'll try to follow the walkthrough.
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
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
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
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
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
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
Updated by Anonymous almost 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9e5153be55bd4869d3a1b456f9a23d59cde3f92d.
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
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
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
Updated by Anonymous almost 12 years ago
- Status changed from Under Review to Resolved
Applied in changeset 6c8214e93cb5fda359b8324d3565d826140b3d89.
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
Updated by Christian Kuhn over 11 years ago
- Status changed from Under Review to Resolved