mariadb/myisam
unknown 1c7b80dff9 Fix for bug #31174: "Repair" command on MyISAM crashes with small
myisam_sort_buffer_size.

An incorrect length of the sort buffer was used when calculating the
maximum number of keys. When myisam_sort_buffer_size is small enough,
this could result in the number of keys < number of
BUFFPEK structures which in turn led to use of uninitialized BUFFPEKs.

Fixed by correcting the buffer length calculation.


myisam/sort.c:
  Use a correct buffer length when calculating the maximum number of keys.
  Assert that for each BUFFPEK structure there is at least one
  corresponding key. Otherwise we would fail earlier and not reach
  merge_buffers().
mysql-test/r/repair.result:
  Added a test case for bug #31174.
mysql-test/t/repair.test:
  Added a test case for bug #31174.
2007-10-11 14:28:12 +04:00
..
ftbench
.cvsignore
ChangeLog
ft_boolean_search.c
ft_eval.c
ft_eval.h
ft_nlq_search.c
ft_parser.c
ft_static.c
ft_stem.c
ft_stopwords.c
ft_test1.c
ft_test1.h
ft_update.c
ftdefs.h
fulltext.h
make-ccc
Makefile.am
mi_cache.c
mi_changed.c
mi_check.c
mi_checksum.c
mi_close.c
mi_create.c
mi_dbug.c
mi_delete.c
mi_delete_all.c
mi_delete_table.c
mi_dynrec.c
mi_extra.c
mi_info.c
mi_key.c
mi_keycache.c
mi_locking.c
mi_log.c
mi_open.c
mi_packrec.c
mi_page.c
mi_panic.c
mi_preload.c
mi_range.c
mi_rename.c
mi_rfirst.c
mi_rkey.c
mi_rlast.c
mi_rnext.c
mi_rnext_same.c
mi_rprev.c
mi_rrnd.c
mi_rsame.c
mi_rsamepos.c
mi_scan.c
mi_search.c
mi_static.c
mi_statrec.c
mi_test1.c
mi_test2.c
mi_test3.c
mi_test_all.res
mi_test_all.sh
mi_unique.c
mi_update.c
mi_write.c
myisam_ftdump.c
myisamchk.c
myisamdef.h
myisamlog.c
myisampack.c
NEWS
rt_index.c
rt_index.h
rt_key.c
rt_key.h
rt_mbr.c
rt_mbr.h
rt_split.c
rt_test.c
sort.c
sp_defs.h
sp_key.c
sp_test.c
test_pack
TODO