mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 09:20:39 +01:00
This should fix bug #7992 : Assertion (space > 0) failure during restore
This commit is contained in:
parent
8d601425b1
commit
1731d3079d
@ -12341,9 +12341,13 @@ bool RestoreRelationTask::fileReader(Item& item)
|
||||
BURP_error_redirect(NULL, 41); // msg 41 expected data attribute
|
||||
|
||||
// check if record fits into current buffer and get a new one if needed
|
||||
// note, non-compressible record takes 1 additional byte per every 127 bytes
|
||||
// due to compression overhead
|
||||
|
||||
const FB_SSIZE_T attLen = 1 + (tdgbl->gbl_sw_transportable ? 12 : 6);
|
||||
if (len + attLen > space)
|
||||
const FB_SSIZE_T overhead = tdgbl->gbl_sw_compress ? (len / 127 + 1) : 0;
|
||||
|
||||
if (len + attLen + overhead > space)
|
||||
{
|
||||
if (ioBuf)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user