MXS-2850 Fix bug
This commit is contained in:
@ -1247,6 +1247,11 @@ public:
|
|||||||
IGNORE_COMPOUND_SELECTS
|
IGNORE_COMPOUND_SELECTS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool is_significant_union(const Select* pSelect)
|
||||||
|
{
|
||||||
|
return ((pSelect->op == TK_UNION) || (pSelect->op == TK_ALL)) && pSelect->pPrior;
|
||||||
|
}
|
||||||
|
|
||||||
void update_field_infos_from_select(QcAliases& aliases,
|
void update_field_infos_from_select(QcAliases& aliases,
|
||||||
uint32_t context,
|
uint32_t context,
|
||||||
const Select* pSelect,
|
const Select* pSelect,
|
||||||
@ -1343,7 +1348,7 @@ public:
|
|||||||
|
|
||||||
if (compound_approach == ANALYZE_COMPOUND_SELECTS)
|
if (compound_approach == ANALYZE_COMPOUND_SELECTS)
|
||||||
{
|
{
|
||||||
if (((pSelect->op == TK_UNION) || (pSelect->op == TK_ALL)) && pSelect->pPrior)
|
if (is_significant_union(pSelect))
|
||||||
{
|
{
|
||||||
const Select* pPrior = pSelect->pPrior;
|
const Select* pPrior = pSelect->pPrior;
|
||||||
|
|
||||||
@ -2131,7 +2136,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
QcAliases aliases;
|
QcAliases aliases;
|
||||||
uint32_t context = (pSelect->op == TK_UNION && pSelect->pPrior) ? QC_FIELD_UNION : 0;
|
uint32_t context = is_significant_union(pSelect) ? QC_FIELD_UNION : 0;
|
||||||
update_field_infos_from_select(aliases, context, pSelect, NULL);
|
update_field_infos_from_select(aliases, context, pSelect, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user