I have a MySQL trigger on an insert to table A that inserts a row in table B and an insert on table B that inserts a row on table A. The problem is they are firing each other in an endless loop, which the MySQL stops, since it isn't allowed.
How can I tell if I the insert is triggered from the other trigger and not do it?