mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
Addresses #1697 Incorrect value was used to set new file size
in logic that shrinks files (to free disk space) when possible. git-svn-id: file:///svn/toku/tokudb@11340 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
7060dff3b5
commit
d560f9c9a4
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ toku_maybe_truncate_cachefile (CACHEFILE cf, u_int64_t size_used)
|
|||
assert(file_size >= 0);
|
||||
}
|
||||
if ((u_int64_t)file_size >= size_used + (2*FILE_CHANGE_INCREMENT)) {
|
||||
toku_off_t new_size = alignup(file_size, (2*FILE_CHANGE_INCREMENT)); //Truncate to new size_used.
|
||||
toku_off_t new_size = alignup(size_used, (2*FILE_CHANGE_INCREMENT)); //Truncate to new size_used.
|
||||
assert(new_size < file_size);
|
||||
int r = toku_cachefile_truncate(cf, new_size);
|
||||
assert(r==0);
|
||||
|
|
Loading…
Add table
Reference in a new issue