It is clear that you use a transaction engine for MySQL (probably InnoDB)...
Let imagine a scenario:
1. START INSERT 1
2. START INSERT 2
3. INERT 1 FAILS AND ROLL BACK
4. INSERT 2 SUCCEED...
So while
INSERT 2
picks his ID
INSERT 1
still active so
INSERT 2
will have the next ID after
INSERT 1
, but after than
INSERT 1
drops its ID and a gap created...
But in a transnational environment there is no other way - to be always sequential you have to send your INSERT request sequentially and you lost a lot of in performance...
http://dev.mysql.com/doc/refman/5.0/en/innodb-auto-increment-handling.html[
^]