[Fix](sql function) memory overflow to the left of string address when do_money_format has small negative value #36226 (#37870)
cherry pick from #36226 Co-authored-by: sparrow <38098988+biohazard4321@users.noreply.github.com>
This commit is contained in:
@ -511,7 +511,8 @@ TEST(MathFunctionTest, money_format_test) {
|
||||
InputTypeSet input_types = {TypeIndex::Float64};
|
||||
DataSet data_set = {{{Null()}, Null()},
|
||||
{{DOUBLE(17014116.67)}, VARCHAR("17,014,116.67")},
|
||||
{{DOUBLE(-17014116.67)}, VARCHAR("-17,014,116.67")}};
|
||||
{{DOUBLE(-17014116.67)}, VARCHAR("-17,014,116.67")},
|
||||
{{DOUBLE(-123.45)}, VARCHAR("-123.45")}};
|
||||
|
||||
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user