INSERT INTO T SELECT ... FROM S WHERE ... sets an exclusive index record lock (without a gap lock) on each row inserted into T.
If the transaction isolation level is READ COMMITTED, InnoDB does the search on S as a consistent read (no locks).
Otherwise, InnoDB sets shared next-key locks on rows from S.
InnoDB has to set locks in the latter case: During roll-forward recovery using a statement-based binary log, every SQL statement must be executed in exactly the same way it was done originally.
@asmmlist @asmmlist @asmmlist @asmmlist @asmmlist @asmmlist @asmmlist @asmmlist