diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-06 17:12:17 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-06 17:12:17 +0200 |
commit | 883496782f37cd53acd10d90527af97aca3fd34f (patch) | |
tree | 36c2d3a7cf10df47651a2dc35144afd475beeabe /sql/field.h | |
parent | eda142590f385b3d79e7b6a6e0cc13ba8fd25961 (diff) | |
parent | 560b9895d413bdfedda0a0ca871a635858990c05 (diff) | |
download | mariadb-git-883496782f37cd53acd10d90527af97aca3fd34f.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/sql/field.h b/sql/field.h index d5d49bed551..cf8b4d05f14 100644 --- a/sql/field.h +++ b/sql/field.h @@ -490,37 +490,6 @@ inline enum_field_types real_type_to_type(enum_field_types real_type) } -static inline enum enum_mysql_timestamp_type -mysql_type_to_time_type(enum enum_field_types mysql_type) -{ - switch(mysql_type) { - case MYSQL_TYPE_TIME2: - case MYSQL_TYPE_TIME: return MYSQL_TIMESTAMP_TIME; - case MYSQL_TYPE_TIMESTAMP2: - case MYSQL_TYPE_TIMESTAMP: - case MYSQL_TYPE_DATETIME2: - case MYSQL_TYPE_DATETIME: return MYSQL_TIMESTAMP_DATETIME; - case MYSQL_TYPE_NEWDATE: - case MYSQL_TYPE_DATE: return MYSQL_TIMESTAMP_DATE; - default: return MYSQL_TIMESTAMP_ERROR; - } -} - - -/** - Tests if field type is temporal, i.e. represents - DATE, TIME, DATETIME or TIMESTAMP types in SQL. - - @param type Field type, as returned by field->type(). - @retval true If field type is temporal - @retval false If field type is not temporal -*/ -inline bool is_temporal_type(enum_field_types type) -{ - return mysql_type_to_time_type(type) != MYSQL_TIMESTAMP_ERROR; -} - - enum enum_vcol_info_type { VCOL_GENERATED_VIRTUAL, VCOL_GENERATED_STORED, |