if column has type DECIMAL it will converted to string now.
Thanks to Brian Aker for pointing this out.
col_type = (stmt->stmt->fields) ? stmt->stmt->fields[ofs].type : MYSQL_TYPE_STRING;
switch (col_type) {
- case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_DOUBLE:
case MYSQL_TYPE_FLOAT:
convert_to_double_ex(args[i]);
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_TIMESTAMP:
+ case MYSQL_TYPE_DECIMAL:
stmt->result.buf[ofs].type = IS_STRING;
stmt->result.buf[ofs].buflen = (stmt->stmt->fields) ? stmt->stmt->fields[ofs].length + 1: 256;
stmt->result.buf[ofs].buffer = (char *)emalloc(stmt->result.buf[ofs].buflen);