You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-25 20:23:16 +03:00
MCOL-3776: PrimProc crash
Added sync to timezone var accesses.
This commit is contained in:
@@ -187,7 +187,7 @@ string Func_str_to_date::getStrVal(rowgroup::Row& row,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
dataconvert::DateTime dateTime;
|
||||
dateTime = getDateTime(row, parm, isNull, ct, fTimeZone);
|
||||
dateTime = getDateTime(row, parm, isNull, ct, timeZone());
|
||||
string convertedDate = dataconvert::DataConvert::datetimeToString(*((long long*) &dateTime));
|
||||
return convertedDate;
|
||||
}
|
||||
@@ -198,7 +198,7 @@ int32_t Func_str_to_date::getDateIntVal(rowgroup::Row& row,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
dataconvert::DateTime dateTime;
|
||||
dateTime = getDateTime(row, parm, isNull, ct, fTimeZone);
|
||||
dateTime = getDateTime(row, parm, isNull, ct, timeZone());
|
||||
int64_t time = *(reinterpret_cast<int64_t*>(&dateTime));
|
||||
return ((((int32_t)(time >> 32)) & 0xFFFFFFC0) | 0x3E);
|
||||
}
|
||||
@@ -209,7 +209,7 @@ int64_t Func_str_to_date::getDatetimeIntVal(rowgroup::Row& row,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
dataconvert::DateTime dateTime;
|
||||
dateTime = getDateTime(row, parm, isNull, ct, fTimeZone);
|
||||
dateTime = getDateTime(row, parm, isNull, ct, timeZone());
|
||||
int64_t time = *(reinterpret_cast<int64_t*>(&dateTime));
|
||||
return time;
|
||||
}
|
||||
@@ -220,7 +220,7 @@ int64_t Func_str_to_date::getTimestampIntVal(rowgroup::Row& row,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
dataconvert::DateTime dateTime;
|
||||
dateTime = getDateTime(row, parm, isNull, ct, fTimeZone);
|
||||
dateTime = getDateTime(row, parm, isNull, ct, timeZone());
|
||||
dataconvert::TimeStamp timestamp;
|
||||
dataconvert::MySQLTime m_time;
|
||||
m_time.year = dateTime.year;
|
||||
@@ -230,7 +230,7 @@ int64_t Func_str_to_date::getTimestampIntVal(rowgroup::Row& row,
|
||||
m_time.minute = dateTime.minute;
|
||||
m_time.second = dateTime.second;
|
||||
bool isValid = true;
|
||||
int64_t seconds = mySQLTimeToGmtSec(m_time, fTimeZone, isValid);
|
||||
int64_t seconds = mySQLTimeToGmtSec(m_time, timeZone(), isValid);
|
||||
if (!isValid)
|
||||
{
|
||||
timestamp = -1;
|
||||
@@ -252,7 +252,7 @@ int64_t Func_str_to_date::getTimeIntVal(rowgroup::Row& row,
|
||||
{
|
||||
dataconvert::DateTime dateTime;
|
||||
dataconvert::Time retTime;
|
||||
dateTime = getDateTime(row, parm, isNull, ct, fTimeZone);
|
||||
dateTime = getDateTime(row, parm, isNull, ct, timeZone());
|
||||
retTime.day = 0;
|
||||
retTime.is_neg = false;
|
||||
retTime.hour = dateTime.hour;
|
||||
@@ -269,7 +269,7 @@ int64_t Func_str_to_date::getIntVal(rowgroup::Row& row,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
dataconvert::DateTime dateTime;
|
||||
dateTime = getDateTime(row, parm, isNull, ct, fTimeZone);
|
||||
dateTime = getDateTime(row, parm, isNull, ct, timeZone());
|
||||
int64_t time = *(reinterpret_cast<int64_t*>(&dateTime));
|
||||
return time;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user