mysql 中decimal数据结构

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sharon_1987/article/details/51096336

typedef int32 decimal_digit_t;

/**
intg is the number of decimal digits (NOT number of decimal_digit_t’s !)
before the point
frac is the number of decimal digits after the point
len is the length of buf (length of allocated space) in decimal_digit_t’s,
not in bytes
sign false means positive, true means negative
buf is an array of decimal_digit_t’s
*/
typedef struct st_decimal_t {
int intg, frac, len;
my_bool sign;
decimal_digit_t *buf;
} decimal_t;

猜你喜欢

转载自blog.csdn.net/sharon_1987/article/details/51096336