1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-1775 Fix addtime/subtime for WHERE

MariaDB server renamed addtime/subtime so we need to use the new names
for these functions.
This commit is contained in:
Andrew Hutchings
2018-10-06 11:27:51 +01:00
parent 3fffc75d86
commit 6a72b28bab
2 changed files with 11 additions and 3 deletions

View File

@@ -3665,11 +3665,17 @@ ReturnedColumn* buildFunctionColumn(
gwi.no_parm_func_list.push_back(fc);
}
// add the sign for addtime function
if (funcName == "add_time")
// func name is addtime/subtime in 10.3.9
// note: this means get_time() can now go away in our server fork
if ((funcName == "addtime") || (funcName == "subtime"))
{
int64_t sign = 1;
if (funcName == "subtime")
{
sign = -1;
}
Item_func_add_time* addtime = (Item_func_add_time*)ifp;
sptp.reset(new ParseTree(new ConstantColumn((int64_t)addtime->get_sign())));
sptp.reset(new ParseTree(new ConstantColumn(sign)));
funcParms.push_back(sptp);
}