比较新的版本中,mysql SUM聚合运算的返回值为MYSQL_TYPE_NEWDECIMAL。
目前OB中sum等聚合函数的返回值数据类型依赖于参与运算的列的数据类型。
MySQL中相关问题的bugfix:
https://github.com/ziutek/mymysql/issues/14
https://github.com/sidorares/nodejs-mysql-native/issues/49
'SUM()' field type is MYSQL_TYPE_NEWDECIMAL which was not supported until recently ( fixed with #48 )
I opened #50 for better error handling in similar problems.
enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,