mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
Addresses #1611 Log reading lsn now reads it as disk order instead of hardcoded network order.
Previous commit [10714] should say addresses #1611 instead of #10694 git-svn-id: file:///svn/toku/tokudb@10715 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
2a36852736
commit
b2991231d6
1 changed files with 9 additions and 3 deletions
12
newbrt/log.c
12
newbrt/log.c
|
@ -927,9 +927,15 @@ static int peek_at_log (TOKULOGGER logger, char* filename, LSN *first_lsn) {
|
||||||
unsigned char header[SKIP+8];
|
unsigned char header[SKIP+8];
|
||||||
int r = read(fd, header, SKIP+8);
|
int r = read(fd, header, SKIP+8);
|
||||||
if (r!=SKIP+8) return 0; // cannot determine that it's archivable, so we'll assume no. If a later-log is archivable is then this one will be too.
|
if (r!=SKIP+8) return 0; // cannot determine that it's archivable, so we'll assume no. If a later-log is archivable is then this one will be too.
|
||||||
u_int64_t lsn = 0;
|
|
||||||
int i;
|
u_int64_t lsn;
|
||||||
for (i=0; i<8; i++) lsn=(lsn<<8)+header[SKIP+i];
|
{
|
||||||
|
struct rbuf rb;
|
||||||
|
rb.buf = header+SKIP;
|
||||||
|
rb.size = 8;
|
||||||
|
rb.ndone = 0;
|
||||||
|
lsn = rbuf_ulonglong(&rb);
|
||||||
|
}
|
||||||
|
|
||||||
r=close(fd);
|
r=close(fd);
|
||||||
if (r!=0) { return 0; }
|
if (r!=0) { return 0; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue