There is no way to retrieve more than one generated auto-inc variable. Calling LAST_INSERT_ID() returns you the first value generated by the last INSERT.
To get all the values, insert one row at a time, and call LAST_INSERT_ID() after each one. This results in more overhead, but it's the only workaround.
This is especially an issue if you're doing INSERT...SELECT
or LOAD DATA INFILE
, generating many new id values in a batch.
See also MySQL LAST_INSERT_ID() used with multiple records INSERT statement