diff options
Diffstat (limited to 'include/decimal.h')
-rw-r--r-- | include/decimal.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/decimal.h b/include/decimal.h index 2de62af140d..dd10cee991c 100644 --- a/include/decimal.h +++ b/include/decimal.h @@ -19,7 +19,7 @@ #include <my_global.h> -typedef enum {TRUNCATE=0, HALF_EVEN, HALF_UP} decimal_round_mode; +typedef enum {TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR} decimal_round_mode; typedef int32 decimal_digit; typedef struct st_decimal { @@ -91,9 +91,12 @@ int decimal_round(decimal *from, decimal *to, int new_scale, decimal_round_mode #define E_DEC_OK 0 #define E_DEC_TRUNCATED 1 #define E_DEC_OVERFLOW 2 -#define E_DEC_DIV_ZERO 3 -#define E_DEC_BAD_NUM 4 -#define E_DEC_OOM 5 +#define E_DEC_DIV_ZERO 4 +#define E_DEC_BAD_NUM 8 +#define E_DEC_OOM 16 + +#define E_DEC_ERROR 31 +#define E_DEC_FATAL_ERROR 30 #endif |