Bug #43973 backup_myisam.test fails on 6.0-bugteam
Submitted: 31 Mar 2009 7:50 Modified: 12 May 2009 11:26
Reporter: Ingo Strüwing Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:5.0-bugteam,5.1-bugteam,6.0-bugteam OS:Any
Assigned to: Satya B CPU Architecture:Any
Tags: pushbuild

[31 Mar 2009 7:50] Ingo Strüwing
Description:
The patch for Bug#41541 (Valgrind warnings on packed MyISAM table), as pushed to the bugteam trees on March 25, causes backup_myisam and (on platforms with debug server) backup_myisam_coverage to fail in 6.0-bugteam (5.1 is ok).

The reason is that a "myisamchk -srq" does not succeed
after "myisampack". The error messages are:

MyISAM-table '.../mysql_db1/t1' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
mysqltest: At line 35: command "$MYISAMCHK -srq $MYSQLD_DATADIR/mysql_db1/t1" failed

Output from before failure:
Found wrong record at 60

How to repeat:
See pushbuild results of 6.0-bugteam.
Or run backup_myisam on a branch of 6.0-bugteam.
[31 Mar 2009 7:58] Ingo Strüwing
Suggested triage values:
Defect: serious. Myisampack produces corrupt tables.
Workaround: none. One can try a full repair (not a quick repair). But then the table becomes empty.
Impact: widespread. myISAM compression is widely used. 6.0-bugteam cannot be pushed with this bug.
[2 Apr 2009 10:21] Ingo Strüwing
Hi Satya, you wrote: "The failure is from "$MYISAMCHK -srq tablename" which can be run on all the bugteam trees."

Yes, it can be run on all the bugteam trees. But it succeeds on all but 6.0-bugteam. That's why I set just the latter version.
[2 Apr 2009 11:07] Satya B
Ingo,
Just wanted to make sure that the fix should be in 5.0-bugteam+ :)
[3 Apr 2009 8:47] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/71292

2725 Satya B	2009-04-03
      Fix for Bug #43973 - backup_myisam.test fails on 6.0-bugteam
      
      The test started failing following the push for BUG#41541.
      The record positions are always increased by the word size and
      it started failing when the push for BUG#41541 increased it by
      only the number of bytes actually available.
      
      Fixed by allocating seven extra bytes to the Memory segment #2
      so that we don't read unallocated memory.
      
      Note: The bug was reported on 6.0 as the test failed but it 
      affects 5.0-bugteam, 5.1-bugteam branches also.
      No testcase added the bug is about test failure.
      modified:
        myisam/mi_packrec.c
[6 Apr 2009 13:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/71453

2727 Satya B	2009-04-06
      Fix for Bug #43973 - backup_myisam.test fails on 6.0-bugteam
      
      The test started failing following the push for BUG#41541.
      The byte shifting was not correct in push for BUG#41541 as
      lower bytes were not properly shifted.
      
      Fixed the byte shifting logic and by incrementing position 
      by word size.
      modified:
        myisam/mi_packrec.c
[6 Apr 2009 13:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/71456

2727 Satya B	2009-04-06
      Fix for Bug #43973 - backup_myisam.test fails on 6.0-bugteam
            
      The test started failing following the push for BUG#41541.
      The byte shifting was not correct in push for BUG#41541 as
      lower bytes were not properly shifted.
            
      Fixed the byte shifting logic and by incrementing position 
      by word size. Also some code was depending on incrementing 
      position of bit_buff by word size
      modified:
        myisam/mi_packrec.c
[7 Apr 2009 10:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/71517

2728 Satya B	2009-04-07
      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
      (in Memory Segment #2) to avoid accessing un-allocated data.
[7 Apr 2009 10:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/71518

2727 Satya B	2009-04-07
      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.
      
      
      Fixed _mi_read_pack_info() method to allocate (BITS_SAVED/8) - 1 
      bytes to the Memory Segment #2
      modified:
        myisam/mi_packrec.c
        mysql-test/r/myisampack.result
        mysql-test/t/myisampack.test
[7 Apr 2009 11:11] Ingo Strüwing
Approved, but deleted Sergey's approval, as he approved a different patch.
[7 Apr 2009 11:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/71524

2727 Satya B	2009-04-07
      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.
      modified:
        myisam/mi_packrec.c
        mysql-test/r/myisampack.result
        mysql-test/t/myisampack.test
[5 May 2009 18:52] Bugs System
Pushed into 5.0.82 (revid:davi.arnaut@sun.com-20090505184158-dvmedh8n472y8np5) (version source revid:davi.arnaut@sun.com-20090505184158-dvmedh8n472y8np5) (merge vers: 5.0.82) (pib:6)
[5 May 2009 19:44] Bugs System
Pushed into 5.1.35 (revid:davi.arnaut@sun.com-20090505190206-9xmh7dlc6kom8exp) (version source revid:davi.arnaut@sun.com-20090505190206-9xmh7dlc6kom8exp) (merge vers: 5.1.35) (pib:6)
[6 May 2009 14:08] Bugs System
Pushed into 6.0.12-alpha (revid:svoj@sun.com-20090506125450-yokcmvqf2g7jhujq) (version source revid:joro@sun.com-20090407141908-9lgfo0xj3c6guaes) (merge vers: 6.0.11-alpha) (pib:6)
[12 May 2009 11:26] Paul DuBois
Test case change. No changelog entry needed.
[15 Jun 2009 8:30] Bugs System
Pushed into 5.1.35-ndb-6.3.26 (revid:jonas@mysql.com-20090615074202-0r5r2jmi83tww6sf) (version source revid:jonas@mysql.com-20090615070837-9pccutgc7repvb4d) (merge vers: 5.1.35-ndb-6.3.26) (pib:6)
[15 Jun 2009 9:09] Bugs System
Pushed into 5.1.35-ndb-7.0.7 (revid:jonas@mysql.com-20090615074335-9hcltksp5cu5fucn) (version source revid:jonas@mysql.com-20090615072714-rmfkvrbbipd9r32c) (merge vers: 5.1.35-ndb-7.0.7) (pib:6)
[15 Jun 2009 9:50] Bugs System
Pushed into 5.1.35-ndb-6.2.19 (revid:jonas@mysql.com-20090615061520-sq7ds4yw299ggugm) (version source revid:jonas@mysql.com-20090615054654-ebgpz7elwu1xj36j) (merge vers: 5.1.35-ndb-6.2.19) (pib:6)