Bug #57385
closedMissing handling of caseSensitive in like Query
100%
Description
The "like" method of TYPO3\CMS\Extbase\Persistence\Generic\Query does not handle the given $caseSensitive parameter.
The query will always select be case sensitive, no matter what setting is given to this method.
Updated by Mathias Brodala over 10 years ago
Patrick Crausaz wrote:
The query will always select be case sensitive, no matter what setting is given to this method.
AFAIS is the query always case insensitive, at least that's the default behavior in MySQL. Thus you get the same results for "foo%" and "Foo%".
Anyways, it should be pretty straightforward porting the implementation from TYPO3 Flow here.
Updated by Alexander Opitz about 10 years ago
- Project changed from 534 to TYPO3 Core
- Description updated (diff)
- Category changed from Extbase to Extbase
- Target version changed from Extbase 6.2 to next-patchlevel
- TYPO3 Version set to 6.2
- Is Regression set to No
Updated by Mathias Schreiber about 9 years ago
- Target version deleted (
next-patchlevel)
Updated by Gerrit Code Review about 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44968
Updated by Morton Jonuschat about 9 years ago
- Status changed from Under Review to New
- Target version set to Candidate for Major Version
Actually it's not straight forward to fix this and the backport from flow will not make the situation any better. Reason is that the case sensitivity for the search is related to the DBMS settings, in MySQL it's based on the collation of the database/table/field. If it's a collation that ends with _ci the comparison will be done case insensitive, if it ends with _cs it will be case sensitive. In addition the type of the column also plays a role, binary type columns are always case sensitive.
So the caseSensitive parameter actually boils down to two choices:
1. Let the DBMS decide wether to do a case sensitive or insensitive search based on the appropriate settings
2. Force a case insensitive comparison using LOWER
Both solutions don't enable me to force a case sensitive comparison as the parameter name suggests.
Proposal: Remove the case sensitive parameter with a breaking change in 8 as it's broken by design.
Updated by Gerrit Code Review over 8 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49856
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49856
Updated by Gerrit Code Review about 8 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49856
Updated by Morton Jonuschat about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6c497f491ff1559bcf75e3b26e8c77f8cf7b9b83.