1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fixed a bug checksum table locks the InnoDB table and does not use a

consistent read (Bug #12669). This fixes InnoDB part of the bug.
This commit is contained in:
jan@hundin.mysql.fi
2005-09-29 08:34:38 +03:00
parent dc50fc2403
commit 6734ca6cbe
3 changed files with 72 additions and 0 deletions

View File

@@ -1564,3 +1564,42 @@ SET FOREIGN_KEY_CHECKS=1;
INSERT INTO t2 VALUES(3);
DROP TABLE t2;
#
# Test that checksum table uses a consistent read Bug #12669
#
connect (a,localhost,root,,);
connect (b,localhost,root,,);
connection a;
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;
connection b;
insert into test_checksum values(3);
connection a;
#
# Here checksum should not see insert
#
checksum table test_checksum;
connection a;
commit;
checksum table test_checksum;
commit;
drop table test_checksum;
#
# autocommit = 1
#
connection a;
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;
connection b;
set autocommit=1;
insert into test_checksum values(3);
connection a;
#
# Here checksum sees insert
#
checksum table test_checksum;
drop table test_checksum;