diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mysql.h | 2 | ||||
-rw-r--r-- | include/mysql_com.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/mysql.h b/include/mysql.h index e83babb8fa8..b738c8535fe 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -73,6 +73,8 @@ extern char *mysql_unix_port; #define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) #define IS_BLOB(n) ((n) & BLOB_FLAG) #define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR) +#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) +#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && (f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8) || (f)->type == FIELD_TYPE_YEAR) typedef struct st_mysql_field { char *name; /* Name of column */ diff --git a/include/mysql_com.h b/include/mysql_com.h index 2a1471f735d..6a603ff0e17 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -61,6 +61,7 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY, #define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */ #define TIMESTAMP_FLAG 1024 /* Field is a timestamp */ #define SET_FLAG 2048 /* field is a set */ +#define NUM_FLAG 32768 /* Field is num (for clients) */ #define PART_KEY_FLAG 16384 /* Intern; Part of some key */ #define GROUP_FLAG 32768 /* Intern: Group field */ #define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */ |