SET AUTOCOMMIT=0;
BEGIN test;
SELECT num FROM client WHERE id=3 FOR UPDATE;
UPDATE client SET num = '1' WHERE id=3 ;
COMMIT test;