From 6d98de39223835dfb333c976975c1fd0027aeec1 Mon Sep 17 00:00:00 2001 From: Gagan Goel Date: Fri, 14 Feb 2020 00:58:02 +0000 Subject: [PATCH] Use const_cast to assign to field_length due to change in server 10.4 commit 1394216e3db67152a1356fddd8ddcd563b4f38c3 --- dbcon/mysql/ha_mcs_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbcon/mysql/ha_mcs_impl.cpp b/dbcon/mysql/ha_mcs_impl.cpp index 7ab1cbe61..3ffa33ccd 100644 --- a/dbcon/mysql/ha_mcs_impl.cpp +++ b/dbcon/mysql/ha_mcs_impl.cpp @@ -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((*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((*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((*f)->field_length) = 310; f2->store(static_cast(dl)); if ((*f)->null_ptr)