You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-01 06:21:41 +03:00
MCOL-1985 Server set decimal count for UDF based on both parameters. This doesn't work for regr_avgx and regr_avgy, which only care about one of them. Do our best to handle it reasonably. Still gives unlimited decimals for InnoDB when the unused parameter is not numeric.
This commit is contained in:
@ -167,10 +167,13 @@ extern "C"
|
||||
strcpy(message,"regr_avgx() with a non-numeric independant (second) argument");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (initid->decimals != DECIMAL_NOT_SPECIFIED)
|
||||
if (args->arg_type[1] == DECIMAL_RESULT && initid->decimals != DECIMAL_NOT_SPECIFIED)
|
||||
{
|
||||
initid->decimals +=4;
|
||||
initid->decimals += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
initid->decimals = DECIMAL_NOT_SPECIFIED;
|
||||
}
|
||||
|
||||
if (!(data = (struct regr_avgx_data*) malloc(sizeof(struct regr_avgx_data))))
|
||||
@ -272,9 +275,13 @@ extern "C"
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (initid->decimals != DECIMAL_NOT_SPECIFIED)
|
||||
if (args->arg_type[0] == DECIMAL_RESULT && initid->decimals != DECIMAL_NOT_SPECIFIED)
|
||||
{
|
||||
initid->decimals +=4;
|
||||
initid->decimals += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
initid->decimals = DECIMAL_NOT_SPECIFIED;
|
||||
}
|
||||
|
||||
if (!(data = (struct regr_avgy_data*) malloc(sizeof(struct regr_avgy_data))))
|
||||
|
Reference in New Issue
Block a user