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

compilation fix for gcc12 on known gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329

This commit is contained in:
Leonid Fedorov
2024-01-03 18:14:59 +00:00
committed by Leonid Fedorov
parent cbf6eff94d
commit d0f657b01f
2 changed files with 6 additions and 7 deletions

View File

@ -19,7 +19,6 @@
// $Id: func_truncate.cpp 3921 2013-06-19 18:59:56Z bwilkinson $
#include <cstdlib>
#include <iomanip>
#include <string>
using namespace std;
@ -560,7 +559,7 @@ IDB_Decimal Func_truncate::getDecimalVal(Row& row, FunctionParm& parm, bool& isN
else
{
if (-s >= (int32_t)value.size())
value = "0";
value = std::string("0");
else
{
value = value.substr(0, value.size() + s);
@ -661,7 +660,7 @@ int64_t Func_truncate::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm
if (isNull)
return 0;
s = (s > MAX_MICROSECOND_PRECISION) ? MAX_MICROSECOND_PRECISION : s;
if (s < 0)
if (s < 0)
{
s = 0;
}
@ -677,7 +676,7 @@ int64_t Func_truncate::getDatetimeIntVal(Row& row, FunctionParm& parm, bool& isN
if (isNull)
return 0;
s = (s > MAX_MICROSECOND_PRECISION) ? MAX_MICROSECOND_PRECISION : s;
if (s < 0)
if (s < 0)
{
s = 0;
}
@ -693,7 +692,7 @@ int64_t Func_truncate::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, boo
if (isNull)
return 0;
s = (s > MAX_MICROSECOND_PRECISION) ? MAX_MICROSECOND_PRECISION : s;
if (s < 0)
if (s < 0)
{
s = 0;
}