diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-05-04 15:42:47 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-05-04 15:42:47 +0300 |
commit | a8841f011412b29a44b8587dac23277a3e7b109b (patch) | |
tree | 83e7cfb7f7a2fda09d127d9a12efde22adfe8972 /innobase | |
parent | 87dc6aa669a3053255462d2534c5e740a70ced63 (diff) | |
download | mariadb-git-a8841f011412b29a44b8587dac23277a3e7b109b.tar.gz |
os0file.c:
Print progress information if at startup InnoDB creates and writes bigger than 100 MB data file or log file
innobase/os/os0file.c:
Print progress information if at startup InnoDB creates and writes bigger than 100 MB data file or log file
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/os/os0file.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 46129e3de79..c7f95d79104 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -752,7 +752,12 @@ os_file_set_size( offset = 0; low = (ib_longlong)size + (((ib_longlong)size_high) << 32); + + if (low >= (ib_longlong)(100 * 1024 * 1024)) { + fprintf(stderr, "InnoDB: Progress in MB:"); + } + while (offset < low) { if (low - offset < UNIV_PAGE_SIZE * 512) { n_bytes = (ulint)(low - offset); @@ -768,9 +773,24 @@ os_file_set_size( ut_free(buf2); goto error_handling; } + + /* Print about progress for each 100 MB written */ + if ((offset + n_bytes) / (ib_longlong)(100 * 1024 * 1024) + != offset / (ib_longlong)(100 * 1024 * 1024)) { + + fprintf(stderr, " %lu00", + (ulint)((offset + n_bytes) + / (ib_longlong)(100 * 1024 * 1024))); + } + offset += n_bytes; } + if (low >= (ib_longlong)(100 * 1024 * 1024)) { + + fprintf(stderr, "\n"); + } + ut_free(buf2); ret = os_file_flush(file); |