[TYPO3-core] RFC #11022: DBAL does not support SQL from (new?) session management

Martin Kutschker masi-no at spam-typo3.org
Sun May 3 14:48:00 CEST 2009


Xavier Perseguers schrieb:
> Hi,
> 
> This is a SVN patch request.
> 
> Type: Bugfix
> 
> Branches: trunk
> 
> BT reference: http://bugs.typo3.org/view.php?id=11022
> 
> Problem:
> When logging into the backend, DBAL stops while trying to parse and
> convert the following WHERE clause:
> 
> .... WHERE (crdate + lifetime) >= 1241265817 OR lifetime = 0
> 
> The parser is not able to parse "crdate + lifetime", that is, a
> calculated value (with "+" operator).
> 
> Solution:
> 1) The parser already supports the "&" as calc operator. Extend it to
> allow the "+".

Too bad & is the only operator NOT supported by Oracle [I think it has
only a BITAND function] ;) Anyway, while you're at it you can add the
usual operators:

+, -, *, /, %
>, <, <=, >=, =, <>, !=
&, |, ~, <<, >>
AND, OR, NOT

FYI - Bitwise XOR: ^ (Mysql), # (PostgreSQL)

> 2) Remove pretty but unneeded extra parentheses around the calculated
> statement "(crdate + lifetime)" as it bugs the SQL parser.

Well, yes. Really a shame the SQL parser isn't that great.

Masi


More information about the TYPO3-team-core mailing list