Commit 300cdf3b authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:2892] Fix error in toku_get_version_of_logs_on_disk() so version_found is always set correctly.

git-svn-id: file:///svn/toku/tokudb@26350 c7de825b-a66e-492c-adef-691d508d4ae1
parent a1832ffa
......@@ -1388,11 +1388,12 @@ toku_get_version_of_logs_on_disk(const char *log_dir, BOOL *found_any_logs, uint
uint64_t this_log_number;
BOOL is_log = is_a_logfile_any_version(de->d_name, &this_log_number, &this_log_version);
if (is_log) {
if (found) {
highest_version = highest_version > this_log_version ? highest_version : this_log_version;
if (!found) { // first log file found
found = TRUE;
highest_version = this_log_version;
}
found = TRUE;
highest_version = this_log_version;
else
highest_version = highest_version > this_log_version ? highest_version : this_log_version;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment