[TYPO3-dam] "LIKE BINARY" in SQL-Queries forces errors on PostgreSQL
Christian Trabold
christian.trabold at dkd.de
Thu Dec 13 15:46:41 CET 2007
Hi,
before I post this issue to the bugtracker, I'd like to discuss it with you:
In some places DAM uses "LIKE BINARY" for binary safe comparisons of the
filepaths. Examples:
/components/class.tx_dam_selectionFolder.php
$query.= ' LIKE BINARY
'.$GLOBALS['TYPO3_DB']->fullQuoteStr($likeStr.'%', 'tx_dam');
/class.tx_dam_db.php
$where['file_path'] = 'tx_dam.file_path LIKE BINARY
'.$GLOBALS['TYPO3_DB']->fullQuoteStr($likeStr.'%', 'tx_dam');
This throws errors in the backend if TYPO3 runs with
PostgreSQL-Databases (through DBAL). After removing the "BINARY"
operator the errors disappeared.
I wonder, if the "BINARY" operator is really mandatory to run DAM. What
do you think?
I'd also really appreciate it, if someone could elaborate, why the
BINARY-Operator was implemented. Maybe we can find a DBAL-compliant
solution.
Greetings
Christian
[1] The "BINARY" operator is described here in details:
http://dev.mysql.com/doc/refman/5.0/en/charset-binary-op.html
More information about the TYPO3-project-dam
mailing list