>>>>> "Indrek" == Indrek Siitan <tfr@stripped> writes:
>> For an AUTO_INCREMENT column, inserting 0 has the same effect as
>> inserting NULL. So this generates a key with value 1. It does
>> (or if you insert 0). But your column is a PRIMARY KEY, so it
>> cannot contain duplicate values and you already have a row with
>> a key value of 1.
Indrek> yep, i perfectly understand, what it does and why it gives an error.
Indrek> i was just wondering why it interpretes 0 the same way as NULL,
Indrek> and was surprised by the fact that i can produce a situation where
Indrek> the untouched output of mysqldump can not be imported back to
Indrek> the database.
I agree; We will in MySQL 4.0 change that only NULL (and not 0) will
generate a new AUTO_INCREMENT value to avoid this problem.