You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Preserve the sign when a double is -0 in fetchNextRow()
This commit is contained in:
@ -766,6 +766,14 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
|
|||||||
// 2.2250738585072014E-308 to 1.7976931348623157E+308.
|
// 2.2250738585072014E-308 to 1.7976931348623157E+308.
|
||||||
(*f)->field_length = 310;
|
(*f)->field_length = 310;
|
||||||
|
|
||||||
|
// The server converts dl=-0 to dl=0 in f2->store().
|
||||||
|
// This happens in the call to truncate_double().
|
||||||
|
// This is an unexpected behaviour, so we directly store the
|
||||||
|
// double value using the lower level float8store() function.
|
||||||
|
// TODO Remove this when f2->store() handles this properly.
|
||||||
|
if (dl == 0)
|
||||||
|
float8store(f2->ptr,dl);
|
||||||
|
else
|
||||||
f2->store(dl);
|
f2->store(dl);
|
||||||
|
|
||||||
if ((*f)->null_ptr)
|
if ((*f)->null_ptr)
|
||||||
|
Reference in New Issue
Block a user