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

fix(plugin) MCOL-5699: throw error for unimplemented INTERSECT and EXCEPT (#3219)

This commit is contained in:
Leonid Fedorov
2024-06-27 14:20:23 +04:00
committed by GitHub
parent 6c6fa7d5a4
commit 1b31fd3bdb
3 changed files with 103 additions and 0 deletions

View File

@ -6830,6 +6830,26 @@ int processFrom(bool& isUnion, SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP&
// Existed pushdown handlers won't get in this scope
// MDEV-25080 Union pushdown would enter this scope
// is_unit_op() give a segv for derived_handler's SELECT_LEX
// check INTERSECT or EXCEPT, that are not implemented
if (select_lex.master_unit() && select_lex.master_unit()->first_select())
{
for (auto nextSelect = select_lex.master_unit()->first_select()->next_select(); nextSelect;
nextSelect = nextSelect->next_select())
{
if (nextSelect->get_linkage() == INTERSECT_TYPE)
{
setError(gwi.thd, ER_INTERNAL_ERROR, "INTERSECT is not supported by Columnstore engine", gwi);
return ER_INTERNAL_ERROR;
}
else if (nextSelect->get_linkage() == EXCEPT_TYPE)
{
setError(gwi.thd, ER_INTERNAL_ERROR, "EXCEPT is not supported by Columnstore engine", gwi);
return ER_INTERNAL_ERROR;
}
}
}
if (!isUnion && (!isSelectHandlerTop || isSelectLexUnit) && select_lex.master_unit()->is_unit_op())
{
// MCOL-2178 isUnion member only assigned, never used