Laravel MySQL Query Return Empty When there is a Deadlock

Suppose you have two processes executing the following PHP code at the same time, what results will be printed?

Surprisingly, one process prints the query results, while another process prints an empty collection (array). The code that returned an empty collection did not trigger a deadlock exception as expected.

Continue reading