[Typo3-dev] Versioning Fix
Kasper Skårhøj
kasper2005 at typo3.com
Wed Jan 12 15:00:28 CET 2005
> With my little knowledge of databases logic dictates that negative
> values in auto_increment can not be allowed. Mattes's solution seems
> cross-database so to speak.
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.
- kasper
More information about the TYPO3-dev
mailing list