mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed a bug checksum table locks the InnoDB table and does not use a
consistent read (Bug #12669). mysql-test/r/innodb.result: Added test results for a checksum test. mysql-test/t/innodb.test: Added test case for a checksum bug #12669. sql/ha_innodb.cc: Use consistent read for checksum table and convert MySQL lock type to the TL_READ because at the moment MySQL uses TL_READ_NO_INSERT.
This commit is contained in:
@ -1694,3 +1694,31 @@ select min(b) from t1 where a='8';
|
||||
min(b)
|
||||
6
|
||||
drop table t1;
|
||||
create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1;
|
||||
insert into test_checksum values (1),(2);
|
||||
set autocommit=0;
|
||||
checksum table test_checksum;
|
||||
Table Checksum
|
||||
test.test_checksum 1531596814
|
||||
insert into test_checksum values(3);
|
||||
checksum table test_checksum;
|
||||
Table Checksum
|
||||
test.test_checksum 1531596814
|
||||
commit;
|
||||
checksum table test_checksum;
|
||||
Table Checksum
|
||||
test.test_checksum 2050879373
|
||||
commit;
|
||||
drop table test_checksum;
|
||||
create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1;
|
||||
insert into test_checksum values (1),(2);
|
||||
set autocommit=1;
|
||||
checksum table test_checksum;
|
||||
Table Checksum
|
||||
test.test_checksum 1531596814
|
||||
set autocommit=1;
|
||||
insert into test_checksum values(3);
|
||||
checksum table test_checksum;
|
||||
Table Checksum
|
||||
test.test_checksum 2050879373
|
||||
drop table test_checksum;
|
||||
|
Reference in New Issue
Block a user