MyISAM repair-by-sort buffer cannot be > 4 GB even on 64-bit architectures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Undecided
|
Alexey Kopytov | ||
5.1 |
Fix Released
|
Undecided
|
Alexey Kopytov | ||
5.5 |
Fix Released
|
Undecided
|
Alexey Kopytov |
Bug Description
Description:
This applies to both server's myisam_
--sort_buffer_size. Even though both options are declared as GET_ULONG
which theoretically allows them to be greater than 4 GB on 64-bit
architectures (with 64-bit Windows being an exception), their value is
eventually cast to uint in _create_
As a result, a wrap-around value is actually used as a buffer size. When
the wrap-around value is 0, _create_
spurious "myisam_
How to repeat:
Try using myisam_
machine.
Suggested fix:
Remove casts to uint in _create_
options as GET_ULL with SIZE_T_MAX as their max allowed value, and change all relevant
variables from ulong to ulonglong to fix 64-bit Windows as well.
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 738 lines (+726/-0)2 files modifiedpatches/bug45702.patch (+725/-0)
patches/series (+1/-0)
- Laurynas Biveinis (community): Approve
-
Diff: 741 lines (+729/-0)2 files modifiedpatches/bug45702.patch (+728/-0)
patches/series (+1/-0)
tags: | added: cr i19156 |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-2700