Commit graph

8 commits

Author SHA1 Message Date
Satya B
543abcd48e merge 5.0-bugteam to 5.1-bugteam 2009-04-07 17:06:15 +05:30
Satya B
10350e2097 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
2009-04-07 16:54:32 +05:30
Satya B
c084645ca0 merge 5.0-bugteam to 5.1-bugteam 2009-03-25 15:43:49 +05:30
Satya B
ca873cd7c7 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.

myisam/mi_packrec.c:
  Fixed fill_buffer() to read byte by byte when the remaining 
  buffer size is less than word size.
mysql-test/r/myisampack.result:
  Result file for BUG#41541
mysql-test/t/myisampack.test:
  Testcase for BUG#41541
2009-03-25 14:45:53 +05:30
Satya B
4a3e9851cf TestCase for BUG#41574 - REPAIR TABLE: crashes for compressed tables
Extending the existing testcase written for BUG#40949 to verify
repair table operation for compressed tables



mysql-test/r/myisampack.result:
  Modified result file for myisampack.test
mysql-test/t/myisampack.test:
  Modified Testcase to test repair operation for compressed tables
2009-01-22 11:25:26 +05:30
Sergey Glukhov
952d284ba4 Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines(for 5.1)
mysql-test/r/myisampack.result:
  result fix
mysql-test/t/myisampack.test:
  test case fix
2008-12-17 17:23:21 +04:00
Sergey Glukhov
0d2db9c020 Bug#40949 Debug version of MySQL server crashes when run OPTIMIZE on compressed table.
reset diagnostics area state after error message is sent


mysql-test/r/myisampack.result:
  test result
mysql-test/t/myisampack.test:
  test case
sql/sql_table.cc:
  reset diagnostics area state after error message is sent
2008-12-09 13:04:28 +04:00
unknown
c5df4b3092 BUG#31277 - myisamchk --unpack corrupts a table
With certain data sets (when compressed record length gets bigger than
uncompressed) myisamchk --unpack may corrupt data file.

Fixed that record length was wrongly restored from compressed table.


myisam/mi_check.c:
  With compressed tables compressed record length may be bigger than
  pack_reclength, thus we may allocate insufficient memory for record
  buffer.
  
  Let single function allocate record buffer, performing needed record
  length calculations.
  
  Still, it is not doable with parallel repair, as it allocates needed
  record buffers at once. For parellel repair added better record length
  calculation.
myisam/mi_open.c:
  When calculating record buffer size, take into account that compressed
  record length may be bigger than uncompressed.
myisam/mi_packrec.c:
  With certain data set share->max_pack_length (compressed record length)
  may be bigger than share->base.pack_reclength (packed record length).
  
  set_if_bigger(pack_reclength, max_pack_length) in this case causes
  myisamchk --unpack to write extra garbage, whereas pack_reclength
  remains the same in new index file. As a result we get unreadable
  table.
myisam/myisamchk.c:
  With compressed tables compressed record length may be bigger than
  pack_reclength, thus we may allocate insufficient memory for record
  buffer.
  
  Let single function allocate record buffer, performing needed record
  length calculations.
mysql-test/mysql-test-run.pl:
  Environment variables to execute myisamchk and myisampack.
mysql-test/r/myisampack.result:
  New BitKeeper file ``mysql-test/r/myisampack.result''
mysql-test/t/myisampack.test:
  New BitKeeper file ``mysql-test/t/myisampack.test''
2007-11-07 12:55:28 +04:00