1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-4738 AVG gives wrong results with strict_aliasing

A f fix that works with strict_aliasing
This commit is contained in:
David Hall
2021-07-07 13:08:32 -05:00
parent 866dc25729
commit 1113470551

View File

@ -1348,7 +1348,7 @@ inline void Row::setLongDoubleField(const long double& val, uint32_t colIndex)
uint8_t* p = &data[offsets[colIndex]];
*reinterpret_cast<long double*>(p) = val;
#ifdef MASK_LONGDOUBLE
*(reinterpret_cast<uint64_t*>(p)+1) &= 0x000000000000FFFFULL;
memset(p+10, 0, 6);
#endif
}