1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

Use const_cast to assign to field_length due to

change in server 10.4 commit 1394216e3db67152a1356fddd8ddcd563b4f38c3
This commit is contained in:
Gagan Goel
2020-02-14 00:58:02 +00:00
parent f843e98930
commit 6d98de3922

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 // bug 3485, reserve enough space for the longest float value
// -3.402823466E+38 to -1.175494351E-38, 0, and // -3.402823466E+38 to -1.175494351E-38, 0, and
// 1.175494351E-38 to 3.402823466E+38. // 1.175494351E-38 to 3.402823466E+38.
(*f)->field_length = 40; const_cast<uint32_t&>((*f)->field_length) = 40;
f2->store(dl); 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 // bug 3483, reserve enough space for the longest double value
// -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and // -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and
// 2.2250738585072014E-308 to 1.7976931348623157E+308. // 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(). // The server converts dl=-0 to dl=0 in f2->store().
// This happens in the call to truncate_double(). // 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 // bug 3483, reserve enough space for the longest double value
// -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and // -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and
// 2.2250738585072014E-308 to 1.7976931348623157E+308. // 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)); f2->store(static_cast<double>(dl));
if ((*f)->null_ptr) if ((*f)->null_ptr)