consecutive ids in a batch insert?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi list,

I am new to mysql and would appreciate any advice that you have to
I am attempting to batch insert 100 rows into a table, and I need to
know the 100 id's of all the inserted rows.

I know that I can find the id of the last inserted row despite my app
being multi-threaded, since the select last inserted command is

Given the id of the last inserted row, can I back out all the ids of
the inserted rows?  Are the inserts consecutive in an auto-increment

If not, I will be looking to lock the table during inserts, but that
seems very sub-optimal.

Running mysql 5.0.24

Thanks in advance,

Site Timeline