[Typo3-dev] Versioning Fix

Mathias Schreiber [wmdb] mathias.schreiber at wmdb.de
Wed Jan 12 13:44:21 CET 2005


Hey guys,

after digging through the versioning extension in order to fix the mysql 
Bug peter and I found out some strange things.

For those who don't know:
If you swap versions for the swapping event the "old" record gets a 
negative uid.
Newer mysql verions can deal with this - oracle 8i and mssql can't.

In addition in the very moment the versioning (swapping) takes place, 
one uid isn't available and if your mysql DB drops away or the PHP 
script times out this uid is "lost"

In order to keep the DBAL an option peter and I implemented a working 
fix that works like this:

We introduce a versioning backup table that holds both records to be 
swapped.
Then we delete the "new" record and then UPDATE the "old" one (that one 
that gets swapped with the new data) with the data of the new one.
Because we keep a backup of the new AND old record the PHP script may 
crash at any time and all data is still there.
There need to be some new fields (checksum, transaction id etc.) in 
order to keep this running.

basically this is transaction management (low low low level) implemented 
transparently for ALL databases the DBAL will support.

I mean - please don't feel offended, but using SQL that works fine on 
some versions of one (!) DB somewhat messes up my understanding of high 
quality code.

I don't think it makes sense to publish this on the TER since this 
extension is only a fix for one typo3 version because hopefully this 
issue won't exist anymore within 3.7.1

http://www.wmdb.de/versionfix

What do you think?


-- 
No Subject - No Realname - No Service!
Respect the List/Newsgroup Rules!
  >> http://typo3.org/1438.0.html <<




More information about the TYPO3-dev mailing list