From dafbd50e8a09340022e5207d2223372666fdabc8 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Thu, 1 Nov 2018 16:06:03 +0200 Subject: [PATCH] MDEV-17133 follow-up patch to fix mf_iocache-t unittest which did not always correctly simulated io-cache::end_of_file. The error was caused by implicit cast to unsigned of an intemediate term in a formula. --- unittest/sql/mf_iocache-t.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/sql/mf_iocache-t.cc b/unittest/sql/mf_iocache-t.cc index 95451d52f86..1eef8365074 100644 --- a/unittest/sql/mf_iocache-t.cc +++ b/unittest/sql/mf_iocache-t.cc @@ -326,7 +326,7 @@ void mdev17133() MY_MIN(sizeof(buf_o), info.end_of_file + eof_block_size + // plus 25% of block for randomization to the average - (eof_block_size/4 - rand() % (eof_block_size/2))); + eof_block_size/4 - rand() % (eof_block_size/2)); // read a chunk by blocks of variable size read_iter times // the last block completes the current chunk