During my client application I've got a method such as this (used it's more complicated, but I have left the primary part):

public void btnUpdate_Click(...)
  dataAdapter.Fill(...); // here I got exception one time

The exception I discovered in logs states "Deadlock found when looking to get lock try restarting transaction". I met this exception only time, therefore it wasn't repeated.
When I understand, DataAdapter.Fill() method executes only choose query. I do not make an explicit transaction and that i have autocommit enabled.
So how do i get dead lock on the simple choose query which isn't part of bigger transaction?
When I understand, to obtain a dead lock, two transactions should watch for one another. How's that possible having a single choose not in the transaction? Whether it's a bug in MySql?

Thanks ahead of time.

You're right it requires two transactions to create a deadlock. In other words, No statement or claims inside a single transaction can deadlock along with other claims inside the same transaction.

However it just take one transaction to see a study of the deadlock. How are you aware the transaction you're seeing the deadlock reported was the only real transaction being performed within the database? Is not there other activity happening within this database?

Also. your statement "I do not make an explicit transaction", and "... which isn't part of bigger transaction" suggests that you don't realize that every SQL statement performed is definitely within an implicit transaction, even when you don't clearly start one.

Most databases have confirming systems particularly made to track, report and/or log cases of deadlocks for diagnostic reasons. In SQL server there's a trace flag that triggers a log entry with much detail about each deadlock that happens, including particulars about each one of the two transactions involved, like what sql claims had been performed, what objects within the database had been locked, and why the lock couldn't be acquired. I'd guess mySQL has similar disgnostic tool. Discover what it's and switch it on to ensure that next time this happens you are able to look and discover precisely what happened.

You are able to deadlock an easy Choose against other claims, as an UPDATE. On my small blog I've a good example explaining a deadlock between two well tunned claims: Read/Write deadlock. As the example is SQL Server specific, the key is generic. I do not have sufficient understanding of MySQL to assert this really is always the situation or otherwise, specifically within the light of numerous engines MySQL can deploy, but none of them the less an easy Choose could possibly be the victim of the deadlock.

I've not investigated how MySQL transaction works, but this is dependant on how MSSQL transactions work:

If you're not utilizing a transaction, each query includes a transaction alone. Otherwise you can get chaos each time an update unsuccessful in the centre.

The reason behind the deadlock may be lock escalation. The database attempts to lock less than feasible for each query, therefore it begins out by securing just the single rows affected. When the majority of the rows inside a page is locked through the query it could choose that increasing the lock into securing the whole page could be better, who have along side it effect of securing some rows not otherwise impacted by the query.

If your select query as well as an update query are attempting to escalate locks on a single table, they might result in a deadlock eventhough merely a single table is involved.