建表及准备数据:
CREATE TABLE `test_innodb_lock`(
a INT(11),
b VARCHAR(16)
)ENGINE INNODB;
INSERT INTO test_innodb_lock values(1, 'b2');
INSERT INTO test_innodb_lock values(3, '3');
INSERT INTO test_innodb_lock values(4, '4000');
INSERT INTO test_innodb_lock values(5, '5000');
INSERT INTO test_innodb_lock values(6, '6000');
INSERT INTO test_innodb_lock values(7, '7000');
INSERT INTO test_innodb_lock values(8, '8000');
INSERT INTO test_innodb_lock values(9, '9000');
INSERT INTO test_innodb_lock values(1, 'b1');
CREATE INDEX test_innodb_a_ind on test_innodb_lock(a);
CREATE INDEX test_innodb_lock_b_ind on test_innodb_lock(b);