diff options
-rw-r--r-- | src/binlogsel.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/binlogsel.c b/src/binlogsel.c index b3fb75b..9587c2b 100644 --- a/src/binlogsel.c +++ b/src/binlogsel.c | |||
@@ -340,11 +340,15 @@ selmem(const char *name, void *base) | |||
340 | } | 340 | } |
341 | break; | 341 | break; |
342 | case 1: | 342 | case 1: |
343 | for (; start + 1 >= 0; start--) { | 343 | for (; start >= 0; start--) { |
344 | if (start_time < getrec(base, hdr->recsize, start)->ts) | 344 | if (start_time < |
345 | getrec(base, hdr->recsize, start)->ts) { | ||
346 | ++start; | ||
345 | break; | 347 | break; |
346 | } | 348 | } |
347 | ++start; | 349 | } |
350 | if (start == 0) | ||
351 | return; | ||
348 | } | 352 | } |
349 | } else | 353 | } else |
350 | start = 0; | 354 | start = 0; |
@@ -917,7 +921,8 @@ read_status_fp(FILE *fp) | |||
917 | return 1; | 921 | return 1; |
918 | 922 | ||
919 | timemask |= START_TIME; | 923 | timemask |= START_TIME; |
920 | start_time = ts; | 924 | start_time = ts + 1; |
925 | last_ts = start_time; | ||
921 | 926 | ||
922 | return 0; | 927 | return 0; |
923 | } | 928 | } |