My table type is innodb and the transaction isolation level is set to repeatable read.
My problem is that when I set a lock for update

Set autocommit=0;

Select * from staff for update

It prevents other transactions from updating, inserting or deleting any data in this table. However it still allows other transactions to read data from this table which is shouldn’t!

If I set a lock in share mode

Set autocommit=0;

Select * from staff lock in share mode

It does exactly the same as the above lock does anyone know why this is?