diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-15 15:59:32 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-15 15:59:32 +0300 |
commit | d50fe4021eb22c6265d005ebcccf03a3905bbc75 (patch) | |
tree | fb772b810dcc80f3e7cb96dc5920791679d8dc07 /extra | |
parent | 828191b6a0d2ea262783c7d0c217001c57fa1024 (diff) | |
parent | 112589cdeda90b20e015e495912fe7d4dd85c0d7 (diff) | |
download | mariadb-git-d50fe4021eb22c6265d005ebcccf03a3905bbc75.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'extra')
-rw-r--r-- | extra/innochecksum.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index 40aefa24428..591527aacd0 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -1591,10 +1591,8 @@ int main( byte* xdes = NULL; /* bytes read count */ ulint bytes; - /* current time */ - time_t now; /* last time */ - time_t lastt; + time_t lastt = 0; /* stat, to get file size. */ #ifdef _WIN32 struct _stat64 st; @@ -1945,7 +1943,6 @@ int main( /* main checksumming loop */ cur_page_num = start_page ? start_page : cur_page_num + 1; - lastt = 0; while (!feof(fil_in)) { bytes = read_file(buf, partial_page_read, @@ -2025,12 +2022,10 @@ first_non_zero: if (verbose && !read_from_stdin) { if ((cur_page_num % 64) == 0) { - now = time(0); + time_t now = time(0); if (!lastt) { lastt= now; - } - if (now - lastt >= 1 - && is_log_enabled) { + } else if (now - lastt >= 1 && is_log_enabled) { fprintf(log_file, "page::%llu " "okay: %.3f%% done\n", (cur_page_num - 1), |