Project

General

Profile

Actions

Bug #57385

closed

Missing handling of caseSensitive in like Query

Added by Patrick Crausaz over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Start date:
2014-03-27
Due date:
% Done:

100%

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

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.

Actions #1

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.

Actions #2

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
Actions #3

Updated by Mathias Schreiber about 9 years ago

  • Target version deleted (next-patchlevel)
Actions #4

Updated by Gerrit Code Review almost 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

Actions #5

Updated by Morton Jonuschat almost 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.

Actions #6

Updated by Gerrit Code Review about 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

Actions #7

Updated by Gerrit Code Review about 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

Actions #8

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

Actions #9

Updated by Morton Jonuschat about 8 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF