Building on the query in this answer (please note/assume that the GROUP_CONCAT
s are now also held in user defined variables), when and what will InnoDB lock on table1
?
I'd prefer that it only lock the table1
row that it's currently updating and release it upon starting on the next row.
I'd also prefer that when it locks table2
(or its' rows) that SELECT
s will at least be able to read it.
The column being updated is not PK or even indexed.
How can this be achieved, or is it already doing that?
This is in a TRIGGER
.
Many thanks in advance!