diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index d2fc3e951e1cb176091e2524cff9d5d4ccea3980..02a087a580261b1d9a0de44d458123c6a47defe9 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -2099,7 +2099,7 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer) } file.file= buffer->file; - for (i= 0, pg= buffer->offset / TRANSLOG_PAGE_SIZE; + for (i= 0, pg= LSN_OFFSET(buffer->offset) / TRANSLOG_PAGE_SIZE; i < buffer->size; i+= TRANSLOG_PAGE_SIZE, pg++) {