summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2006-02-16 19:45:57 +0100
committerunknown <ingo@mysql.com>2006-02-16 19:45:57 +0100
commitd46fc0e8072ef960114d4cd0dbd386566d86eb8f (patch)
tree7a666563ac4c7ae90690699bbd56fdc439961f35 /libmysql
parent5681e7f657dbc7a0bc6b6821340b9d87b2572004 (diff)
downloadmariadb-git-d46fc0e8072ef960114d4cd0dbd386566d86eb8f.tar.gz
Bug#11527 - Setting myisam_repair_threads to >1 leads to corruption
A wrong cast led to numeric overflow for data files greater than 4GB. The parallel repair assumed end of file after reading the amount of data that the file was bigger than 4GB. It truncated the data file and noted the number of records it found so far in the index file header as the number of rows in the table. Removing the cast fixed the problem. I added some cosmetic changes too. The normal repair worked because it uses a different function to read from the data file. mysys/mf_iocache.c: Bug#11527 - Setting myisam_repair_threads to >1 leads to corruption The pure fix was to remove a cast from a file offset difference. Supplemented this with warnings in function comments, a change from == to <= to be slightly more safe, a renaming from "read_len" to "left_length" to make the partial code duplication between _my_b_read() and _my_b_read_r() more obvious and easier to compare the functions, removed another unnecessary (but harmless) cast, and fixed coding sytle around the "left_length" changes.
Diffstat (limited to 'libmysql')
0 files changed, 0 insertions, 0 deletions