1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-27 08:21:15 +03:00

Merge pull request #1050 from tntnatbry/fix-fieldlength-const

Use const_cast to assign to field_length due to change in server 10.4 commit 1394216
This commit is contained in:
Patrick LeBlanc
2020-02-14 08:57:19 -06:00
committed by GitHub

View File

@@ -752,7 +752,7 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
// bug 3485, reserve enough space for the longest float value
// -3.402823466E+38 to -1.175494351E-38, 0, and
// 1.175494351E-38 to 3.402823466E+38.
(*f)->field_length = 40;
const_cast<uint32_t&>((*f)->field_length) = 40;
f2->store(dl);
@@ -774,7 +774,7 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
// bug 3483, reserve enough space for the longest double value
// -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and
// 2.2250738585072014E-308 to 1.7976931348623157E+308.
(*f)->field_length = 310;
const_cast<uint32_t&>((*f)->field_length) = 310;
// The server converts dl=-0 to dl=0 in f2->store().
// This happens in the call to truncate_double().
@@ -819,7 +819,7 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
// bug 3483, reserve enough space for the longest double value
// -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and
// 2.2250738585072014E-308 to 1.7976931348623157E+308.
(*f)->field_length = 310;
const_cast<uint32_t&>((*f)->field_length) = 310;
f2->store(static_cast<double>(dl));
if ((*f)->null_ptr)