MySQL does a silent conversion for a string in a numeric context. Since it expects a number for sum(), MySQL simply performs the conversion using leading "numbers" from the string. Note that this includes decimal points, a minus sign, and even erepresenting scientific notation. So, '1e6'interpreted as a number.
, 0:
SELECT SUM(parametervalue + 0) FROM table
, cast() , , .