mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for Bug #43973 - backup_myisam.test fails on 6.0-bugteam
The test started failing following the push for BUG#41541.
Some of the algorithms access bytes beyond the input data
and this can affect up to one byte less than "word size"
which is BITS_SAVED / 8.
Fixed by adding (BITS_SAVED / 8) -1 bytes to buffer size
(i.e. Memory Segment #2) to avoid accessing un-allocated data.
myisam/mi_packrec.c:
Fixed _mi_read_pack_info() method to allocate (BITS_SAVED/8) - 1
bytes to the Memory Segment #2
mysql-test/r/myisampack.result:
Result file for BUG#43973
mysql-test/t/myisampack.test:
Testcase for BUG#43973
This commit is contained in:
@@ -38,3 +38,25 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1024
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #43973 - backup_myisam.test fails on 6.0-bugteam
|
||||
#
|
||||
CREATE DATABASE mysql_db1;
|
||||
CREATE TABLE mysql_db1.t1 (c1 VARCHAR(5), c2 int);
|
||||
CREATE INDEX i1 ON mysql_db1.t1 (c1, c2);
|
||||
INSERT INTO mysql_db1.t1 VALUES ('A',1);
|
||||
INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1;
|
||||
INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1;
|
||||
INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1;
|
||||
INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1;
|
||||
INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1;
|
||||
INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1;
|
||||
INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1;
|
||||
FLUSH TABLE mysql_db1.t1;
|
||||
# Compress the table using MYISAMPACK tool
|
||||
# Run MYISAMCHK tool on the compressed table
|
||||
SELECT COUNT(*) FROM mysql_db1.t1 WHERE c2 < 5;
|
||||
COUNT(*)
|
||||
128
|
||||
DROP TABLE mysql_db1.t1;
|
||||
DROP DATABASE mysql_db1;
|
||||
|
||||
Reference in New Issue
Block a user