mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
Fixed sample
This commit is contained in:
parent
3989bb8c4c
commit
d9a6fa2aaa
@ -68,6 +68,10 @@ private:
|
||||
|
||||
FbSampleAtomic referenceCounter;
|
||||
|
||||
// we are using only single field (varchar) in a sample, therefore no strong alignment requirements.
|
||||
// In general message alignment is the maximum field alignment in that message.
|
||||
static const unsigned messageAlignment = sizeof(ISC_SHORT);
|
||||
|
||||
public:
|
||||
unsigned offset, nullOffset, length;
|
||||
|
||||
@ -179,6 +183,16 @@ public:
|
||||
{
|
||||
return length;
|
||||
}
|
||||
|
||||
unsigned getAlignment(ThrowStatusWrapper* /*status*/)
|
||||
{
|
||||
return messageAlignment;
|
||||
}
|
||||
|
||||
unsigned getAlignedLength(ThrowStatusWrapper* /*status*/)
|
||||
{
|
||||
return ((length / messageAlignment) + (length % messageAlignment ? 1 : 0)) * messageAlignment;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user