1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-02 17:22:27 +03:00

MCOL-5215 Fix overflow of UNION operation involving DECIMAL datatypes.

When a UNION operation involving DECIMAL datatypes with scale and digits
before the decimal exceeds the currently supported maximum precision
of 38, we throw an error to the user:
"MCS-2060: Union operation exceeds maximum DECIMAL precision of 38".

This is until MCOL-5417 is implemented where ColumnStore will have
full parity with MariaDB server in terms of maximum supported DECIMAL
precision and scale of 65 and 38 digits respectively.
This commit is contained in:
Gagan Goel
2023-02-17 05:22:34 -05:00
parent 8cdcae0d2f
commit 86dcf92d56
10 changed files with 123 additions and 70 deletions

View File

@ -738,7 +738,6 @@ int ha_mcs_group_by_handler::end_scan()
* thd - THD pointer.
* sel_lex - SELECT_LEX* that describes the query.
* sel_unit - SELECT_LEX_UNIT* that describes the query.
* Only one of sel_lex and sel_unit is not null.
* RETURN:
* select_handler if possible
* NULL in other case
@ -816,15 +815,15 @@ select_handler* create_columnstore_select_handler_(THD* thd, SELECT_LEX* sel_lex
// or unsupported feature.
ha_columnstore_select_handler* handler;
if (sel_unit && sel_lex)
if (sel_unit && sel_lex) // partial pushdown of the SELECT_LEX_UNIT
{
handler = new ha_columnstore_select_handler(thd, sel_lex, sel_unit);
}
else if (sel_unit)
else if (sel_unit) // complete pushdown of the SELECT_LEX_UNIT
{
handler = new ha_columnstore_select_handler(thd, sel_unit);
}
else
else // Query only has a SELECT_LEX, no SELECT_LEX_UNIT
{
handler = new ha_columnstore_select_handler(thd, sel_lex);
}