~akopytov/percona-server/bug878404-5.1

Viewing all changes in revision 325.

  • Committer: Alexey Kopytov
  • Date: 2011-10-26 13:28:11 UTC
  • Revision ID: akopytov@gmail.com-20111026132811-17butuv117vzyic8
LP bug #878404: MyISAM repair-by-sort buffer cannot be > 4 GB even on
64-bit architectures
MySQL bug #45702: Impossible to specify myisam_sort_buffer > 4GB on 64
bit machines

The problem was that the code in _create_index_by_sort() and a number of
auxiliary functions was not 64-bit correct.

Fixed by removing unnecessary type casts and changing variable types
where applicable.

This patch also fixes a problem with my_pread() discovered when testing
the bug fix. According to the man page, pread() can return less bytes
than requested even if enough bytes is available in the file. This case
was not handled in my_pread() correctly.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: