mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
error codes chaged to bitmap (for easier testing with masks)
two more round() modes - CEILING and FLOOR
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user