MySQL/innodb trying to lock uncommitted row from parallel transaction, deadlock in result
Here, the MySQL is not trying to lock uncommitted rows, but it locks all rows from table upto auto-incremented value if index on specific column is not defined ( using which we are deleting row).

Reproduce : 

Transaction 1 :

mysql&gt; SET autocommit = 0;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; insert into test1(name) values ('shit1') ;
Query OK, 1 row affected (0.01 sec)

mysql&gt; select * from test1;
+----+-------+
| id | name  |
+----+-------+
|  1 | shit1 |
+----+-------+
1 row in set (0.00 sec)

mysql&gt; delete from test1 where name = 'shit1' ;
Query OK, 1 row affected (10.97 sec)



Now Let's try to delete record from Transaction 2 using column Name as well as Primary key.

Transaction 2 : 

mysql&gt; SET autocommit = 0;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; insert into test1(name) values ('shit2') ;
Query OK, 1 row affected (0.01 sec)

mysql&gt;  select * from test1;
+----+-------+
| id | name  |
+----+-------+
|  2 | shit2 |
+----+-------+
1 row in set (0.00 sec)

mysql&gt; delete from test1 where name = 'shit2' ;
ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction

mysql&gt; delete from test1 where name = 'shit2' ;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction

mysql&gt; delete from test1 where id=2 ;
Query OK, 0 rows affected (0.01 sec)



Now We have created Index on name column : 

Transaction 1 : 

mysql&gt; create index IDX_NAME on test1(name);
Query OK, 0 rows affected (10.82 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql&gt; select * from test1;
+----+-------+
| id | name  |
+----+-------+
|  3 | shit2 |
+----+-------+
1 row in set (0.00 sec)

mysql&gt; insert into test1(name) values ('shit1') ;
Query OK, 1 row affected (0.01 sec)

mysql&gt; delete from test1 where name = 'shit1' ;
Query OK, 1 row affected (0.00 sec)



Transaction 2 : 

mysql&gt; SET autocommit = 0;
Query OK, 0 rows affected (0.00 sec)

mysql&gt;  select * from test1;
+----+-------+
| id | name  |
+----+-------+
|  3 | shit2 |
+----+-------+
1 row in set (0.00 sec)

mysql&gt; insert into test1(name) values ('shit2') ;
Query OK, 1 row affected (0.00 sec)

mysql&gt;  select * from test1;
+----+-------+
| id | name  |
+----+-------+
|  3 | shit2 |
|  5 | shit2 |
+----+-------+
2 rows in set (0.00 sec)

mysql&gt; delete from test1 where name = 'shit2' ;
Query OK, 2 rows affected (0.00 sec)