You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-24 14:20:59 +03:00
MCOL-240 Fix NULL handling on empty Having clause
During subquery processing it is possible to have an empty Having clause. When this happens various tree elements are deleted but the pointers to those tree elements are not set to NULL. So later on in processing ExeMgr can crash.
This commit is contained in:
@@ -177,6 +177,7 @@ void ssfInHaving(ParseTree* pt, void* obj)
|
||||
// not a scalar result
|
||||
// replace simple scalar filter with simple filters
|
||||
delete pt->data();
|
||||
pt->data(NULL);
|
||||
delete parseTree;
|
||||
jobInfo->constantFalse = true;
|
||||
}
|
||||
@@ -677,6 +678,10 @@ void preprocessHavingClause(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo)
|
||||
ParseTree* correlatedFilters = NULL;
|
||||
havings->walk(getCorrelatedFilters, &correlatedFilters);
|
||||
trim(havings);
|
||||
if (havings == NULL)
|
||||
{
|
||||
csep->having(NULL);
|
||||
}
|
||||
|
||||
if (correlatedFilters != NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user