Yes. This behavior of last_insert_id()
is documented in the MySQL docs:
Important
If you insert multiple rows using a singleINSERT
statement,LAST_INSERT_ID()
returns the value generated for the first inserted row only. The reason for this is to make it possible to reproduce easily the sameINSERT
statement against some other server.