[Maria-developers] 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
Hi!
"Jacek" == Jacek Becla <becla@slac.stanford.edu> writes:
Jacek> Monty
I also added the option --create-missing-keys, which will create keys just for any disabled keys.
Jacek> What would be the best way to put myisam in Jacek> a state where only one key is disabled? Unfortunately there is no way to do that now. What I could do is that if one only specified --key-used, then we could update the key map. The big problem is that we would need some code to free the pages allocated by the not anymore used keys. This is not hard, but still a few hours of work. If we did this, then one could do: myisamchk --key-used=1 table_name Enable first and third key myisamchk --key-used=5 table_name 5 is bitmask, ie 101. What one can do now is to do on an empty table: myisamchk --keys-used=1 -r table_name This will put it in a state where only some of the keys are used. You can check this with myisamchk -dv table_name You should see a row like: Using only keys '1' of 4 possibly keys Regards, Monty
participants (2)
-
Jacek Becla
-
Michael Widenius