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

MCOL-43 - Function Join Fails. Added support for MYSQL_TYPE_DATETIME2

This commit is contained in:
David Hall
2016-05-16 15:39:38 -05:00
parent e1b63c4f9e
commit e28242a885
2 changed files with 39 additions and 16 deletions

View File

@ -2092,7 +2092,10 @@ CalpontSystemCatalog::ColType colType_MysqlToIDB (const Item* item)
ct.colWidth = 4;
}
else if (item->field_type() == MYSQL_TYPE_DATETIME ||
item->field_type() == MYSQL_TYPE_TIMESTAMP)
item->field_type() == MYSQL_TYPE_DATETIME2 ||
item->field_type() == MYSQL_TYPE_TIMESTAMP ||
item->field_type() == MYSQL_TYPE_TIMESTAMP2
)
{
ct.colDataType = CalpontSystemCatalog::DATETIME;
ct.colWidth = 8;
@ -2822,7 +2825,9 @@ ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& non
// MySQL give string result type for date function, but has the flag set.
// we should set the result type to be datetime for comparision.
if (ifp->field_type() == MYSQL_TYPE_DATETIME ||
ifp->field_type() == MYSQL_TYPE_DATETIME2 ||
ifp->field_type() == MYSQL_TYPE_TIMESTAMP ||
ifp->field_type() == MYSQL_TYPE_TIMESTAMP2 ||
funcName == "add_time")
{
CalpontSystemCatalog::ColType ct;