MySQL: can deadlocks occur for a query not in a transaction
There are no "non-transactional" statements; in the absence of explicit transaction control by default a transaction simply starts at the beginning of statement execution and ends when the statement completes. As a result, any query will have to wait for a conflicting lock and might encounter a lock timeout or a deadlock.