You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-3423 Don't move decimal for LONG DOUBLE. Clear long double extra bits after copy, not before.
This commit is contained in:
@ -1036,12 +1036,13 @@ inline void Row::setFloatField(float val, uint32_t colIndex)
|
||||
|
||||
inline void Row::setLongDoubleField(long double val, uint32_t colIndex)
|
||||
{
|
||||
uint8_t* p = &data[offsets[colIndex]];
|
||||
*((long double*)p) = val;
|
||||
if (sizeof(long double) == 16)
|
||||
{
|
||||
// zero out the unused portion as there may be garbage there.
|
||||
*((uint64_t*)&val+1) &= 0x000000000000FFFFULL;
|
||||
*((uint64_t*)p+1) &= 0x000000000000FFFFULL;
|
||||
}
|
||||
*((long double*) &data[offsets[colIndex]]) = val;
|
||||
}
|
||||
|
||||
inline void Row::setVarBinaryField(const std::string& val, uint32_t colIndex)
|
||||
|
Reference in New Issue
Block a user