mirror of
https://gitee.com/he3db/he3pg.git
synced 2024-12-02 04:07:34 +08:00
fix copy wal to page buffer problem
Signed-off-by: shipixian <shipixian_yewu@cmss.chinamobile.com>
This commit is contained in:
parent
db6852aba8
commit
5f78ab89aa
@ -788,7 +788,8 @@ he3db_mdread_pagexlog(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknu
|
||||
Assert(result.count != 0);
|
||||
nbytes += result.count;
|
||||
*buffer = (uint8_t *)realloc(*buffer, BLCKSZ + result.count);
|
||||
strcat(*buffer,result.buf);
|
||||
// strcat(*buffer,result.buf);
|
||||
memcpy(*buffer+BLCKSZ, result.buf, result.count);
|
||||
free_dataRead(result.buf, result.count, result.cap);
|
||||
}
|
||||
//TODO free result
|
||||
@ -843,7 +844,8 @@ he3db_mdread_pagexlog(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknu
|
||||
Assert(result.count != 0);
|
||||
nbytes += result.count;
|
||||
buf = (uint8_t *)realloc(buf, BLCKSZ + result.count);
|
||||
strcat(buf,result.buf);
|
||||
// strcat(buf,result.buf);
|
||||
memcpy(buf+BLCKSZ, result.buf, result.count);
|
||||
//TODO free result
|
||||
free_dataRead(result.buf, result.count, result.cap);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user