SELECT @@global.innodb_table_locks into @table_locks;SET @@global.innodb_table_locks= OFF;DROP TABLE IF EXISTS t1, t2;SET autocommit=0;SET autocommit=0;connection default;CREATE TABLE t1 (k INT NOT NULL PRIMARY KEY, i INT, j INT, l INT) ENGINE=InnoDB;INSERT INTO t1 VALUES (1,123,1,123);INSERT INTO t1 VALUES (2,124,2,124);INSERT INTO t1 VALUES (3,125,3,125);INSERT INTO t1 VALUES (4,126,4,126);#CREATE INDEX ixi ON t1 (i);CREATE TABLE t2 (k INT NOT NULL PRIMARY KEY, i INT, j INT, l INT) ENGINE=InnoDB;INSERT INTO t2 VALUES (1,123,1,123);INSERT INTO t2 VALUES (2,124,2,124);INSERT INTO t2 VALUES (3,125,3,125);INSERT INTO t2 VALUES (4,126,4,126);#CREATE INDEX ixi ON t2 (i);COMMIT;SELECT @@global.tx_isolation;@@global.tx_isolationREPEATABLE-READEXPLAIN SELECT t1.i,t2.i FROM t1,t2 WHERE t1.i<125 AND t2.i=t1.i FOR UPDATE;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using whereSELECT t1.i,t2.i FROM t1,t2 WHERE t1.i<125 AND t2.i=t1.i FOR UPDATE;i i123 123124 124connection root1;UPDATE t1,t2 SET t1.i=225,t2.i=225 WHERE t1.i=125 AND t2.i=t1.i;