Hello all ! )
I would like to know if IDs generated by an AUTO INCREMENT column, when doing a single multi-row insert, are always in order.
From MySQL documentation :
10.10.3. Information Functions
|If you insert multiple rows using a single INSERT statement, LAST_INSERT_ID() returns the value generated for the [B]first inserted row[/B] only. The reason for this is to make it possible to reproduce easily the same INSERT statement against some other server.|
Sweet ! But…
|Anyway, my question is this. If I do a single-statement multi-line insert, are the auto-increment IDs of the rows inserted guaranteed to be sequential? Bear in mind also that I'm using InnoDB tables here.|
|I'm surprised that nobody knows the answer on that for sure...|
Any idea ?