Skip to content

Commit

Permalink
fix timertag table
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Sep 14, 2015
1 parent abd67dc commit 85f3f88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ha_pinba.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3594,6 +3594,10 @@ inline int ha_pinba::tag_values_fetch_next(unsigned char *buf, size_t *index, si
*index = timer_pool->out;
}

if (*position == (size_t)-1) {
(*position) = 0;
}

if (*index == (timer_pool->size - 1)) {
*index = 0;
}
Expand All @@ -3614,7 +3618,7 @@ inline int ha_pinba::tag_values_fetch_next(unsigned char *buf, size_t *index, si
goto retry_next;
}

if (*position >= timer->tag_num) {
if ((*position) >= timer->tag_num) {
(*position) = 0;
(*index)++;
goto retry_next;
Expand Down

0 comments on commit 85f3f88

Please sign in to comment.