aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@nxc.no>2014-06-01 19:38:04 +0200
committerSergey Poznyakoff <gray@nxc.no>2014-06-01 19:38:04 +0200
commitc16de06862f9b2106dcb7810fc20856689ef2aa6 (patch)
tree385af24e0c3a395d747fb22ab7a9f13d242e96b9
parent6054989b78b7a481770a1608c809a56e1cf5cc7d (diff)
downloadvmod-binlog-c16de06862f9b2106dcb7810fc20856689ef2aa6.tar.gz
vmod-binlog-c16de06862f9b2106dcb7810fc20856689ef2aa6.tar.bz2
Bugfixes in binlogsel
* src/binlogsel.c (selmem): Fix operation in case when all records are earlier than start_time. (read_status_fp): Set start_time 1 second later than the status file time. Set last_ts.
-rw-r--r--src/binlogsel.c15
1 files changed, 10 insertions, 5 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;
348 }
346 } 349 }
347 ++start; 350 if (start == 0)
351 return;
348 } 352 }
349 } else 353 } else
350 start = 0; 354 start = 0;
@@ -917,8 +921,9 @@ 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;
921 925 last_ts = start_time;
926
922 return 0; 927 return 0;
923} 928}
924 929

Return to:

Send suggestions and report system problems to the System administrator.