← Back to team overview

maria-developers team mailing list archive

Updated myisamchk to handle LARGE files

 

Hi!

Here is a patch that should fix your myisamchk issues.

This is to be applied to MariaDB 5.5.30 source.

Can you verify that this works so I can add it to MariaDB 10.0 ?

Some notes:

- If you run repair with two --force options, like this:

myisamchk --repair --force --force ...

Then myisamchk will use the full myisam_sort_buffer_size for keys. Other
buffers will be allocated as needed.

This means that with this option one will never get the
"myisam_sort_buffer_size is too small" error.

I also added the option --create-missing-keys, which will create keys
just for any disabled keys.

Other things:
- Better error message for 'myisam_sort_buffer_size is too small' errors.
- Somewhat larger buffers as default.
- Changed a lot of variables from uint -> ulonglong to try to ensure that big
  files will not cause any problems.
- Removed some checks that limited the sort_buffer_size to 4G.
- Fixed code that would cause problems if sort_buffer_size would be > 8G
- Fixed printing of longlong variables.
- Fixed possible core dump if 'alloc_dynamic()' would fail.
- Fixed some possible problems on system where uint would be <= ulong.

Hope this helps!

Regards,
Monty

Attachment: myisamchk.diff
Description: Binary data


Follow ups