[TYPO3-core] RFC: Bug #11903: Use separate tables for tags in the caching framework

Oliver Hader oliver at typo3.org
Sun Sep 27 16:18:00 CEST 2009


Hi Masi,

Martin Kutschker schrieb:
> Oliver Hader schrieb:
>> Hi Steffen,
>>
>> Steffen Kamper schrieb:
>>> Hi olly,
>>>
>>> following notes:
>>> * unit tests doesn't work, 6 failures in testsuite
>> Ok, I fixed them to work with again... however, they are not complete.
>>
>>> While testing, the writing works as expected.
>>> Clearing cache does the clearing, but i get a MySQL error:
>>>
>>> ['lastBuiltQuery'] =>
>>> 'TRUNCATE '
>>> ....
>> That happens when no tagsTable is set. And it would have happened if not
>> cacheTable was set. It's now checked in the contructor.
>>
>> Attached is a new version with these changes:
>> * fixed bug in garbage collector concerning removal of entries without tags
>> * added contructor check for cacheTable and tagsTable
>> * modified unit tests
> 
> I know that the patch is in but yet a -1 from me. Why? Because the patch sneaks in a new feature of
> t3lib_db. This should have been a separate RFC. The reason is that the new feature
> DELETEmultipleTablesQuery() isn't DBAL save.
> 
> This surprises me as I have attached many notes in the bug tracker concerning other database
> systems.  I suggest to use two different WHERE clauses: one for the JOIN and one for WHERE clause.


Yes, that's the information I pointed out in the "Notes:" section of
this RFC. There is no overall solution for all DMBS right know and I
discussed this also in private with Xavier as DBAL team leader.

> This could have been BTW added to the existing DELETE function:
> 
> DELETEquery($table,$where,$tableRef='',$whereJoin='')
> 
> This allows for an SQL syntax like this:
> 
> DELETE titleauthor
> FROM titleauthor INNER JOIN titles
>    ON titleauthor.title_id = titles.title_id
> WHERE titles.title LIKE '%computers%'

Therefore I used "DELETEmultipleTablesQuery" which states the accordant
disposal and can be overriden in DBAL without blowing up the regular
DELETEquery. Your example would only delete elements from one table.

This has to be handled of course until 4.3 RC in DBAL.

olly
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list