[TYPO3-core] RFC: Bug #13508: Use exec_TRUNCATETABLEquery() instead of DELETE FROM throughout the core

Dmitry Dulepov dmitry.dulepov+t3ml at gmail.com
Fri Feb 12 10:23:00 CET 2010


Hi!

On 2010-02-11 15:09:34 +0200, Ries van Twisk said:
> TRUNCATE is well know enough among all developers to understand it and 
> when to use it.

I do not think so. Do you have some facts to prove this statement?

> Your change is flawed because it doesn't catch all conditions where the command
> needs to delete all records in a database, TRUNCATE <tablename> and 
> DELETE FROM <tablename>
> do totally different things in terms of record locking and often they 
> reset a serial counter back to 1.
> MySQL does that, PostgreSQL doesn't reset the serial/autonumber).
> 
> You method changes the behavior of the underlaying actions.

So what? :) Can you show where my method creates real life problems? :) 
It works in many of my TYPO3 installations for more than a year and I 
noticed only advantages so far.

I prefer a practical approach. All what you wrote is pure theoretical 
and it is not a reason ot make API more complex.

Btw, another coredev can give +1 to this patch and compensate my -1. 
But I will be really disappointed by that because it will mean that 
TYPO3 still heads to introducing complexity instead of hiding it.

In any case my opinion on this subject is very well shown in this 
thread and I am not going to spend more time on this subject. There is 
more important stuff to do than to prove that simplicity is better than 
complexity :)

Decide yourself where you are heading!

-- 
Dmitry Dulepov
TYPO3 expert / TYPO3 core team member / TYPO3 security team member 
Read more @ http://dmitry-dulepov.com/



More information about the TYPO3-team-core mailing list