1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

fix(dbcon): MCOL-4756: having not() provokes an ERROR 2013

The `NOT()` function in the HAVING clause was handled
    incorrectly, which caused the server to crash.
This commit is contained in:
Aleksei Antipovskii
2024-07-30 13:04:26 +02:00
committed by Leonid Fedorov
parent f7ff055808
commit 70a7a01941
3 changed files with 26 additions and 1 deletions

View File

@ -2158,7 +2158,8 @@ bool buildPredicateItem(Item_func* ifp, gp_walk_info* gwip)
idbassert(ifp->argument_count() == 1);
ParseTree* ptp = 0;
if (((Item_func*)(ifp->arguments()[0]))->functype() == Item_func::EQUAL_FUNC)
Item_func* argfp = dynamic_cast<Item_func*>(ifp->arguments()[0]);
if (argfp && argfp->functype() == Item_func::EQUAL_FUNC)
{
// negate it in place
// Note that an EQUAL_FUNC ( a <=> b) was converted to