diff options
author | Satya B <satya.bn@sun.com> | 2009-03-25 14:45:53 +0530 |
---|---|---|
committer | Satya B <satya.bn@sun.com> | 2009-03-25 14:45:53 +0530 |
commit | 7b1d72a096e5ffef0cc82f7c2782cd7a6da84bb1 (patch) | |
tree | a5fcab5cc1a510a6ab10046d66933795ee146085 /mysql-test/r/myisampack.result | |
parent | 8aff42f6a0cf97084c36567ae091fd4d2defd027 (diff) | |
download | mariadb-git-7b1d72a096e5ffef0cc82f7c2782cd7a6da84bb1.tar.gz |
Fix for BUG#41541 - Valgrind warnings on packed MyISAM table
After the table is compressed by the myisampack utility,
opening the table by the server produces valgrind warnings.
This happens because when we try to read a record into the buffer
we alway assume that the remaining buffer to read is always equal
to word size(4 or 8 or 2 bytes) we read. Sometimes we have
remaining buffer size less than word size and trying to read the
entire word size will end up in valgrind errors.
Fixed by reading byte by byte when we detect the remaining buffer
size is less than the word size.
Diffstat (limited to 'mysql-test/r/myisampack.result')
-rw-r--r-- | mysql-test/r/myisampack.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/myisampack.result b/mysql-test/r/myisampack.result index 5f39d318234..b4b200549a5 100644 --- a/mysql-test/r/myisampack.result +++ b/mysql-test/r/myisampack.result @@ -27,3 +27,14 @@ CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +# +# BUG#41541 - Valgrind warnings on packed MyISAM table +# +CREATE TABLE t1(f1 VARCHAR(200), f2 TEXT); +INSERT INTO t1 VALUES ('foo', 'foo1'), ('bar', 'bar1'); +FLUSH TABLE t1; +# Compress the table using MYISAMPACK tool +SELECT COUNT(*) FROM t1; +COUNT(*) +1024 +DROP TABLE t1; |