summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-08-16 10:51:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-08-16 10:51:20 +0300
commitc221bcdce7714a74b89a02de941e8d8df2994ce3 (patch)
tree87a4e2d595ea3cc1465f212f26a9b9030655aa0c /extra
parent3bbf008096fc997556459442bc2503c504248345 (diff)
parent395e1dcd176bbf0fcdb5d156bc58604590245a26 (diff)
downloadmariadb-git-c221bcdce7714a74b89a02de941e8d8df2994ce3.tar.gz
Merge 10.3 into 10.4
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 f7fbb76b66b..aa591de944e 100644
--- a/extra/innochecksum.cc
+++ b/extra/innochecksum.cc
@@ -1557,10 +1557,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;
@@ -1903,7 +1901,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,
@@ -1982,12 +1979,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),