You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Merge branch 'develop' into MCOL-265
This commit is contained in:
@ -41,9 +41,6 @@
|
||||
#include "exceptclasses.h"
|
||||
#include "dataconvert.h"
|
||||
|
||||
// Workaround for my_global.h #define of isnan(X) causing a std::std namespace
|
||||
using namespace std;
|
||||
|
||||
namespace messageqcpp
|
||||
{
|
||||
class ByteStream;
|
||||
@ -614,7 +611,7 @@ inline const std::string& TreeNode::getStrVal(const std::string& timeZone)
|
||||
int exponent = (int)floor(log10( fabs(fResult.floatVal))); // This will round down the exponent
|
||||
double base = fResult.floatVal * pow(10, -1.0 * exponent);
|
||||
|
||||
if (isnan(exponent) || isnan(base))
|
||||
if (std::isnan(exponent) || std::isnan(base))
|
||||
{
|
||||
snprintf(tmp, 312, "%f", fResult.floatVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
@ -649,7 +646,7 @@ inline const std::string& TreeNode::getStrVal(const std::string& timeZone)
|
||||
int exponent = (int)floor(log10( fabs(fResult.doubleVal))); // This will round down the exponent
|
||||
double base = fResult.doubleVal * pow(10, -1.0 * exponent);
|
||||
|
||||
if (isnan(exponent) || isnan(base))
|
||||
if (std::isnan(exponent) || std::isnan(base))
|
||||
{
|
||||
snprintf(tmp, 312, "%f", fResult.doubleVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
@ -683,7 +680,7 @@ inline const std::string& TreeNode::getStrVal(const std::string& timeZone)
|
||||
int exponent = (int)floorl(log10( fabsl(fResult.longDoubleVal))); // This will round down the exponent
|
||||
long double base = fResult.longDoubleVal * pow(10, -1.0 * exponent);
|
||||
|
||||
if (isnan(exponent) || isnan(base))
|
||||
if (std::isnan(exponent) || std::isnan(base))
|
||||
{
|
||||
snprintf(tmp, 312, "%Lf", fResult.longDoubleVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
@ -1159,7 +1156,9 @@ inline int64_t TreeNode::getDatetimeIntVal()
|
||||
dataconvert::Time tt;
|
||||
int day = 0;
|
||||
|
||||
memcpy(&tt, &fResult.intVal, 8);
|
||||
void *ttp = static_cast<void*>(&tt);
|
||||
|
||||
memcpy(ttp, &fResult.intVal, 8);
|
||||
|
||||
// Note, this should probably be current date +/- time
|
||||
if ((tt.hour > 23) && (!tt.is_neg))
|
||||
@ -1197,7 +1196,7 @@ inline int64_t TreeNode::getTimeIntVal()
|
||||
{
|
||||
dataconvert::DateTime dt;
|
||||
|
||||
memcpy(&dt, &fResult.intVal, 8);
|
||||
memcpy((int64_t*)(&dt), &fResult.intVal, 8);
|
||||
dataconvert::Time tt(0, dt.hour, dt.minute, dt.second, dt.msecond, false);
|
||||
memcpy(&fResult.intVal, &tt, 8);
|
||||
return fResult.intVal;
|
||||
|
Reference in New Issue
Block a user