[Typo3-dev] Versioning Fix

Kasper Skårhøj kasper2005 at typo3.com
Wed Jan 12 19:01:15 CET 2005


Hi Mathias,

You have been a victim of cosmic disturbances in my mood today, please
accept my honest apologies.

My solution is elegant and therefore does not map to "low quality code"
- this is probably what pissed me off. But elegant or not - it may not
work as you say and so argue. However I don't have any possibility of
discussing this issue now so the best you can do is to summarize the
problem, attach a patch and submit it to either the bug-tracker or to
me, then I will look at it later.

Have a nice evening.

- kasper



On Wed, 2005-01-12 at 16:53, Mathias Schreiber [wmdb] wrote:
> Kasper Skårhøj wrote:
> > First of all "auto_increment" is just MySQLs way of incrementing a field
> > automatically and logically it doesn't follow that the values cannot be
> > CHANGED as long as they are unique (what "PRIMARY KEY" means) and if the
> > field is a signed integer, they clearly can be negative as well.
> >
> > It is so obvious that this is a MySQL bug which was corrected. What is
> > the binary representation of a negative number? The first bit set! So if
> > you look at the integer as if it was unsigned it would appear to be a
> > very very large number - and that is exactly what the next-index pointer
> > is set to be - the value just before the highest value of the field.
> > 
> > As long as this seems so evident to be a bug I will not bow before an
> > unhealthy implementation in MySQL.
> 
> To be honest I don't really understand the hostility, all we wanted to 
> do is help and contribute.
> 
> As I (!) see things versioning is part of the core (because it uses core 
> classes and isn't based on an extension).
> MSSQL Server quits trying to UPDATE an PRIMARY_KEY with the message that 
> primary keys aren't allowed to be changed.
> This is because they also do a lot more than only pointing to record A 
> but also point to block X on the harddisk.
> Oracle also does not allow to change constraints because it would 
> corrupt the integrity of the database.
> Not even MS Access allows this.
> PostGres seems to allow it - but only as long as you don't use 
> contraints (Karsten, please clear things up here)
> 
> Reasons for another strategy in versioning are:
> - If your database flips or the script crashes for whatever reasons, the 
> page with the negative ID is gone. If this is the root Page or something 
> similar you site is offline. This does not depend on the DB or MySQL 
> Version you are using.
> - Other DBs being accessible through DBAL won't work with this
> - Changing identifiers is generally bad habit
> - What if mySQL "fixed" something to wrong?
> - What if we run into problems lateron? Why not make it semantically 
> correct now?
> 
-- 
- kasper

*******************
Happy new year! - My email address is now: 

		kasper2005 at typo3.com 







More information about the TYPO3-dev mailing list