You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#36319083 [InnoDB] Merge sort buffer can be too small
Symptom: In some circumstances an index cannot be created;
this is configuration-dependent
Root cause: Merge sort file buffer size can in some cases be
calculated to be the size of IO_BLOCK_SIZE. The logic for the
buffer is that subsequent records of data are added to the
buffer, but when adding a row would overflow the buffer, thw
contents are written to disk in multiples of IO_BLOCK_SIZE and
space is freed up. If the buffer is only IO_BLOCK_SIZE, it is
likely that at that point the existing contents' length is
less than IO_BLOCK_SIZE, in which case nothing gets written,
no space can be freed up, and the new record cannot be added.
Fix: Since maximum allowed key length is 3072 and
IO_BLOCK_SIZE is 4096 bytes, and given other factors
contributing to buffer length, like page size, which also
affects allowed key size, 2 * IO_BLOCK_SIZE is sufficient
minimum length to ensure there is always IO_BLOCK_SIZE
bytes in the buffer when the write happens. If this ever
changes, the merge will fail gracefully.
Change-Id: I7aec373cfed9e364751372cce3746eb7ad75b3b9
0 commit comments