CREATE TABLE worklog5743 (col_1_CHAR CHAR(255) , col_2_CHAR CHAR(255) , PRIMARY KEY (col_1_CHAR)) engine = innodb; INSERT INTO worklog5743 VALUES(repeat("a", 200) , repeat("o", 200)); SELECT col_1_CHAR = repeat("a", 200) , col_2_CHAR = repeat("o", 200) FROM worklog5743; --echo "In connection 1" --connect (con1,localhost,root,,) SELECT col_1_CHAR = repeat("a", 200) , col_2_CHAR = repeat("o", 200) FROM worklog5743; SELECT COUNT(*) FROM worklog5743; --echo "In connection 2" --connect (con2,localhost,root,,) START TRANSACTION; INSERT INTO worklog5743 VALUES(repeat("b", 200) , repeat("o", 200)); UPDATE worklog5743 SET col_1_CHAR = repeat("d", 200) WHERE col_1_CHAR = repeat("a", 200) AND col_2_CHAR = repeat("o", 200); SELECT col_1_CHAR = repeat("a", 200) , col_2_CHAR = repeat("o", 200) FROM worklog5743; --echo "In connection 1" --connection con1 SELECT col_1_CHAR = repeat("b", 200) , col_2_CHAR = repeat("o", 200) FROM worklog5743; START TRANSACTION; SELECT col_1_CHAR = repeat("a", 200) , col_2_CHAR = repeat("o", 200) FROM worklog5743; SELECT COUNT(*) FROM worklog5743; --echo "In connection 2" --connection con2 COMMIT; SELECT sleep(5); --echo "In connection 1" --connection con1 SELECT col_1_CHAR = repeat("b", 200) , col_2_CHAR = repeat("o", 200) FROM worklog5743; SELECT col_1_CHAR = repeat("a", 200) , col_2_CHAR = repeat("o", 200) FROM worklog5743; SELECT COUNT(*) FROM worklog5743; COMMIT; --connection default DROP TABLE worklog5743;