diff --git a/src/tools/mdbx_chk.c b/src/tools/mdbx_chk.c index 1c4036c8..bf8bee76 100644 --- a/src/tools/mdbx_chk.c +++ b/src/tools/mdbx_chk.c @@ -1172,6 +1172,14 @@ int main(int argc, char *argv[]) { } printf(", %" PRIu64 " pages\n", envinfo.mi_geo.current / envinfo.mi_dxb_pagesize); +#if defined(_WIN32) || defined(_WIN64) + if (envinfo.mi_geo.shrink && envinfo.mi_geo.current != envinfo.mi_geo.upper) + print(" WARNING: Due Windows system limitations a " + "file couldn't\n be truncated while database " + "is opened. So, the size of\n database file " + "may by large than the database itself,\n " + "until it will be closed or reopened in read-write mode.\n"); +#endif print(" - transactions: recent %" PRIu64 ", latter reader %" PRIu64 ", lag %" PRIi64 "\n", envinfo.mi_recent_txnid, envinfo.mi_latter_reader_txnid, diff --git a/src/tools/mdbx_stat.c b/src/tools/mdbx_stat.c index 260e198b..461f569a 100644 --- a/src/tools/mdbx_stat.c +++ b/src/tools/mdbx_stat.c @@ -216,6 +216,14 @@ int main(int argc, char *argv[]) { mei.mi_mapsize, mei.mi_mapsize / mst.ms_psize); printf(" Current datafile: %" PRIu64 " bytes, %" PRIu64 " pages\n", mei.mi_geo.current, mei.mi_geo.current / mst.ms_psize); +#if defined(_WIN32) || defined(_WIN64) + if (mei.mi_geo.shrink && mei.mi_geo.current != mei.mi_geo.upper) + printf(" WARNING: Due Windows system limitations a " + "file couldn't\n be truncated while database " + "is opened. So, the size of\n database file " + "may by large than the database itself,\n " + "until it will be closed or reopened in read-write mode.\n"); +#endif } else { printf(" Fixed datafile: %" PRIu64 " bytes, %" PRIu64 " pages\n", mei.mi_geo.current, mei.mi_geo.current / mst.ms_psize);