mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Fixed bug CORE-2291 : BUGCHECK 284
This commit is contained in:
parent
d7f13f31c7
commit
9668dc5f49
@ -3355,10 +3355,22 @@ static void restore_record(record_param* rpb)
|
||||
|
||||
if (rec_copy)
|
||||
{
|
||||
const USHORT size = rec_copy->rec_length;
|
||||
if (!record || size > record->rec_length)
|
||||
if (!record)
|
||||
BUGCHECK(284); // msg 284 cannot restore singleton select data
|
||||
record->rec_format = rec_copy->rec_format;
|
||||
|
||||
const USHORT size = rec_copy->rec_length;
|
||||
if (size > record->rec_length)
|
||||
{
|
||||
// hvlad: saved copy of record have longer format, reallocate
|
||||
// given record to make enough space for saved data
|
||||
thread_db *tdbb = JRD_get_thread_data();
|
||||
record = VIO_record(tdbb, rpb, rec_copy->rec_format, tdbb->getDefaultPool());
|
||||
}
|
||||
else
|
||||
{
|
||||
record->rec_length = size;
|
||||
record->rec_format = rec_copy->rec_format;
|
||||
}
|
||||
record->rec_number = rec_copy->rec_number;
|
||||
memcpy(record->rec_data, rec_copy->rec_data, size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user