Bug #27134
closedwrong where clause compilation with multiple FIELD_IN_SET query parts
0%
Description
It seems there is a bug in class t3lib/class.t3lib_sqlparser.php in function compileWhereClause. I need to concatenate multiple FIELD_IN_SET query parts in my extbase extension so i did;
$query->matching(
$query->logicalOr(
$query->contains('usergroup',4),
$query->equals('uid',2),
$query->equals('uid',1),
$query->contains('usergroup',5)
)
);
this will produce a SELECT statement where all query parts before the last "contains" part ($query->contains('usergroup',5)) get lost. So the resulting SELECT statement of the above query is;
(FIND_IN_SET(5, fe_users.usergroup)) AND (fe_users.tx_extbase_type = '0') AND fe_users.deleted = 0 AND fe_users.disable = 0 AND fe_users.starttime <= 1306742460 AND (fe_users.endtime = 0 OR fe_users.endtime > 1306742460)
I attached the $clauseArray so you can reproduce easily this behavior by calling the function compileWhereClause in t3lib/class.t3lib_sqlparser.php directly.
Files
Updated by Xavier Perseguers over 13 years ago
Please check whether it's related to http://forge.typo3.org/issues/25488
Updated by Georg Schönweger over 13 years ago
Yes the patch at http://forge.typo3.org/issues/25488 resolves the problem, thank you :)
Updated by Xavier Perseguers over 13 years ago
- Status changed from New to Rejected
Updated by Xavier Perseguers over 13 years ago
Hi Georg, could you please vote for exactly the same patch in branch master (4.6) on Gerrit? Thanks.