I have two windows, the first window type:
- begin;
- select * from users where pid=100 for update;
This is actually not able to query the data, so no lock is generated.
Second window input
- select * from users where pid=1 for update;
It’s stuck in the second window, too. Why?
After typing commit;
in the first window, the second window continues.
So what is meaning of Row-Level-Lock? I’m confused.