The manual states:

"Normally, you don't have to lock tables, as all single UPDATE statements are atomic; 
no other thread can interfere with any other currently executing SQL statement."

Does this hold true for INSERT ... SELECT statements as well? Can I assume that 
multiple records inserted into a table with a single statement will have a perfectly 
sequential primary key in an auto_increment field, or is there a possibility that 
another insert at the same time could interefere with my statement such that I should 
lock the table before I begin if I need to guarantee no gaps in the sequence?

If I must lock, can I then be absolutely confident there will be no gaps? I need to 
update a different table based on the values assigned to the newly inserted records.

Greg

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to