summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-08-15 15:59:32 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-08-15 15:59:32 +0300
commitd50fe4021eb22c6265d005ebcccf03a3905bbc75 (patch)
treefb772b810dcc80f3e7cb96dc5920791679d8dc07 /extra
parent828191b6a0d2ea262783c7d0c217001c57fa1024 (diff)
parent112589cdeda90b20e015e495912fe7d4dd85c0d7 (diff)
downloadmariadb-git-d50fe4021eb22c6265d005ebcccf03a3905bbc75.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'extra')
-rw-r--r--extra/innochecksum.cc11
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),