MySQL: can deadlocks occur for a query not in a transaction As title says. If a transaction is locking table X, during which another nono-transactional query tries to insert a record into X, do deadlocks or "lock wait timeout" issues still occur?
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.