summaryrefslogtreecommitdiff
path: root/mysql-test/t/myisampack.test
diff options
context:
space:
mode:
authorSatya B <satya.bn@sun.com>2009-04-07 16:54:32 +0530
committerSatya B <satya.bn@sun.com>2009-04-07 16:54:32 +0530
commit10350e2097393cb7410eedfcf6ba533faba20a56 (patch)
treec3cf0d01a49b23b2a17ced0a8aaaa9a51c8730d0 /mysql-test/t/myisampack.test
parent72e978828edb6b6cc045e6c728747dafd46b8732 (diff)
downloadmariadb-git-10350e2097393cb7410eedfcf6ba533faba20a56.tar.gz
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
Diffstat (limited to 'mysql-test/t/myisampack.test')
-rw-r--r--mysql-test/t/myisampack.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/myisampack.test b/mysql-test/t/myisampack.test
index ace7afce88a..ce27071bcf8 100644
--- a/mysql-test/t/myisampack.test
+++ b/mysql-test/t/myisampack.test
@@ -50,3 +50,28 @@ FLUSH TABLE t1;
--exec $MYISAMPACK $MYSQLTEST_VARDIR/master-data/test/t1
SELECT COUNT(*) FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # Bug #43973 - backup_myisam.test fails on 6.0-bugteam
+--echo #
+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;
+#
+--echo # Compress the table using MYISAMPACK tool
+--exec $MYISAMPACK -s $MYSQLTEST_VARDIR/master-data/mysql_db1/t1
+--echo # Run MYISAMCHK tool on the compressed table
+--exec $MYISAMCHK -srq $MYSQLTEST_VARDIR/master-data/mysql_db1/t1
+SELECT COUNT(*) FROM mysql_db1.t1 WHERE c2 < 5;
+#
+DROP TABLE mysql_db1.t1;
+DROP DATABASE mysql_db1;