summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-10-05 15:07:21 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2017-10-05 15:07:21 +0200
commitbea99275de3871ea286ab935d4d9d6fe26dd45b8 (patch)
treec6998a2ca1f78746a6457a88b760eba98a96a2e6
parent028d253dd7401fa564bcf817fe81c7034f2512d2 (diff)
downloadmariadb-git-bea99275de3871ea286ab935d4d9d6fe26dd45b8.tar.gz
MDEV-13595: mariadb-10.2.8/storage/maria/ma_loghandler.c:2730]: (style) Array index 'chunk_offset' is used before limits check.
In fact just a cosmetic fix, code was safe because translog_get_first_chunk_offset return offsets inside the page.
-rw-r--r--storage/maria/ma_loghandler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index e2e52546fc9..2118b3b6ce6 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -2741,7 +2741,7 @@ static my_bool translog_recover_page_up_to_sector(uchar *page, uint16 offset)
DBUG_PRINT("enter", ("offset: %u first chunk: %u",
(uint) offset, (uint) chunk_offset));
- while (page[chunk_offset] != TRANSLOG_FILLER && chunk_offset < offset)
+ while (chunk_offset < offset && page[chunk_offset] != TRANSLOG_FILLER)
{
uint16 chunk_length;
if ((chunk_length=