diff options
author | Alexander Nozdrin <alik@ibmvm> | 2009-10-09 15:42:31 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@ibmvm> | 2009-10-09 15:42:31 +0400 |
commit | 90f434cf20e32db41e6d5406f9942454035cccd5 (patch) | |
tree | f41c37e70a710461af1202bcf375e4b383868369 /include | |
parent | 4dae0e03076f54d32bcdf005b58c3feb22623be7 (diff) | |
parent | 798cbaa22ad17adc70a0f34651e07fdc46bbe0d1 (diff) | |
download | mariadb-git-90f434cf20e32db41e6d5406f9942454035cccd5.tar.gz |
Merge from mysql-next-mr.
Diffstat (limited to 'include')
-rw-r--r-- | include/mysql.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/mysql.h b/include/mysql.h index d114afb6c93..70faf3cb2c1 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -86,9 +86,11 @@ extern char *mysql_unix_port; #define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) #define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) #define IS_BLOB(n) ((n) & BLOB_FLAG) -#define IS_NUM(t) ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL) -#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) -#define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == MYSQL_TYPE_YEAR) +/** + Returns true if the value is a number which does not need quotes for + the sql_lex.cc parser to parse correctly. +*/ +#define IS_NUM(t) (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL) #define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING) |