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

Actual fix for percentile window function

We fix 'partial out-of-bounds reference' warning uncovered when building
with gcc11.
This commit is contained in:
Serguey Zefirov
2022-05-19 15:48:23 +03:00
parent d840bb2d52
commit 0dab97da7d

View File

@ -335,7 +335,10 @@ void WF_percentile<T>::operator()(int64_t b, int64_t e, int64_t c)
vd = (crn - rn) * fv + (rn - frn) * cv;
}
v = *(reinterpret_cast<T*>(&vd));
double tempvd[2];
tempvd[0] = vd;
tempvd[1] = 0;
v = *(reinterpret_cast<T*>(&tempvd[0])); // old code that referred to 'vd' var triggered partial out-of-bounds warning.
p = &v;
}
else // (fFunctionId == WF__PERCENTILE_DISC)