Project

General

Profile

Actions

Bug #21514

closed

DAM-related: Element browser crashes as where-clause cannot be parsed

Added by Xavier Perseguers about 15 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2009-11-10
Due date:
% Done:

0%

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

Description

DAM issue queries containing a LIKE BINARY operator.

I found a discussion:
http://lists.typo3.org/pipermail/typo3-project-dam/2008-January/001507.html

I suggest to drop the BINARY operator if found after LIKE or NOT LIKE. It is possible to do something better later, such as supporting a "LIKE BINARY" or "NOT LIKE BINARY" operator, but it should then be mapped to something that is handled by the underlying DBMS.

(issue imported from #M12535)


Files

12535.diff (1.67 KB) 12535.diff Administrator Admin, 2009-11-10 10:32
12535_v2.diff (10 KB) 12535_v2.diff Administrator Admin, 2009-11-10 23:58
12535_dbal_v3.diff (6.58 KB) 12535_dbal_v3.diff Administrator Admin, 2010-07-27 21:42
12535_core_v3.diff (1.08 KB) 12535_core_v3.diff Administrator Admin, 2010-08-08 16:13

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #23282: NOT LIKE is not remapped using dbms_lob.instr with OracleClosedXavier Perseguers2010-07-27

Actions
Actions #1

Updated by Xavier Perseguers about 15 years ago

After discussion with Ries, it might be interesting in case PostgreSQL is used to remap LIKE and NOT LIKE to ILIKE and NOT ILIKE and remap "LIKE BINARY" and "NOT LIKE BINARY" to LIKE and NOT LIKE.

For MySQL, it would be left as is and for other DBMS, we should see on a case by case basis but basically the idea would be to drop the BINARY operator.

Idea is not to implement full support of BINARY operator (as described on http://dev.mysql.com/doc/refman/5.0/en/charset-binary-op.html ) but only to support it after "LIKE".

Another solution for PostgreSQL is to define case-sensitive or insensitive behavior when creating the table: http://www.postgresql.org/docs/8.4/static/citext.html

Actions #2

Updated by Xavier Perseguers about 15 years ago

v2 implements remapping

Actions #3

Updated by Philipp Thiele over 14 years ago

Patch v2 works for me (TYPO3 4.3.3, DBAL 1.0.4 with Oracle 11g), but location given in diff-file (class.ux_t3lib_sqlparser.php) is wrong now (i think, Xavier, you have moved some methods from class.ux_t3lib_sqlparser to class.t3lib_sqlparser before DBAL version changed to 1.0).
So I had to patch class.t3lib_sqlparser.php instead of the DBAL x-class. I don't know if this is correct, but this still works.

Is there any technical reason why this patch isn't added to trunk already?

Actions #4

Updated by Xavier Perseguers over 14 years ago

The reason is that I waited for some feedback before changing this behavior. Feature freeze is there for a while now for TYPO3 4.4, meaning I may commit this once development of 4.5 starts, in 1 month or so...

Actions #5

Updated by Xavier Perseguers over 14 years ago

Well, having a look again at this bug, in fact v2 should not be somehow "applied" to Core itself as it contains DBAL-related code. Instead, SQL parser in Core should handle BINARY keyword and v2 should be adapted to remap this additional keyword in DBAL according to the underlying driver.

Actions #6

Updated by Xavier Perseguers over 14 years ago

Committed to:

- TYPO3 trunk (rev. 8531)
- DBAL trunk (rev. 36497)

Actions

Also available in: Atom PDF