diff options
author | unknown <serg@serg.mylan> | 2004-11-03 18:43:48 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-11-03 18:43:48 +0100 |
commit | c41f992deaf38b8cdcd0379598c00642673e37a1 (patch) | |
tree | 2da4d18ba56881974367609881b46b6bc223f7af /include/decimal.h | |
parent | 09e0503538cbf882cdb1c215a45becfd3826d67a (diff) | |
download | mariadb-git-c41f992deaf38b8cdcd0379598c00642673e37a1.tar.gz |
error codes chaged to bitmap (for easier testing with masks)
two more round() modes - CEILING and FLOOR
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 |