#21268Caching framework does not work with DBAL on Oracle
Description
Problems:
When looking in the DBAL debug module, a lot of errors are produced, which all point to the new caching framework. This error message is “ORA-00904: “LIFETIME”: invalid identifier”.
This error is produced by t3lib/cache/backend/class.t3lib_cache_backend_dbbackend, on line 96:
. ‘AND (crdate + lifetime >= ‘ . time() . ‘ OR lifetime = 0)’
and probably in the same file on line 120:
. ‘AND crdate + lifetime >= ‘ . time()
At these lines an addition (+) calculation is done, which is converted to an Oracle BITAND bitwise operation in the file typo3/sysext/dbal/class.ux_t3lib_sqlengine in function compileWhereClause().
First of all this function does not check Bitwise operations at all, but makes a BITAND for all calculations, like +/-/%/* and divisions. The check on the variable ‘$functionMapping’ is worthless, because it’s always TRUE.
Secondly, two fields are used in the addition; crdate + lifetime. Lifetime is not recognized as a fieldname and therefor not quoted with double quotes (“)
The query ends up like:
SELECT “content“
FROM “cache_hash“
WHERE
“identifier” = ‘abbbabaf2d4b3f9a63e8dde781f1c106’ AND (BITAND >= 1255507193 OR “lifetime” = 0)
which should be:
SELECT “content“
FROM “cache_hash“
WHERE
“identifier” = ‘abbbabaf2d4b3f9a63e8dde781f1c106’ AND (“crdate”+“lifetime” >= 1255507193 OR “lifetime” = 0)
How to reproduce:
Use the latest trunk of the TYPO3 core – 4.3-dev
Use Oracle
Turn on sql debug in the install tool
Go to the DBAL debug module
It will show the error at the top of the module when calling this module
(issue imported from #M12231)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.