1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Merge pull request #1049 from pleblanc1976/mcol-3776

Mcol 3776 - shared but unsync'd timezone var
This commit is contained in:
Patrick LeBlanc
2020-02-13 18:02:03 -06:00
committed by Patrick LeBlanc
parent 0db52396f9
commit d6ef3cad3d
42 changed files with 85 additions and 80 deletions

View File

@ -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;
}