diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-07-20 11:07:19 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-07-20 11:07:19 +0400 |
commit | fee463238793dcc196273654b6f6abd23a1b35ac (patch) | |
tree | 9e5b0fbdb37570b46d57968035c5e98290204a79 /sql/item_func.h | |
parent | 6bfeace10b8e5efd7dcda89ddc287d693b844dec (diff) | |
download | mariadb-git-fee463238793dcc196273654b6f6abd23a1b35ac.tar.gz |
MDEV-15758 Split Item_bool_func::get_mm_leaf() into virtual methods in Field and Type_handler
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 083b49bdda5..cfc87fb067d 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -78,6 +78,20 @@ public: EXTRACT_FUNC, CHAR_TYPECAST_FUNC, FUNC_SP, UDF_FUNC, NEG_FUNC, GSYSVAR_FUNC, IN_OPTIMIZER_FUNC, DYNCOL_FUNC, JSON_EXTRACT_FUNC }; + static scalar_comparison_op functype_to_scalar_comparison_op(Functype type) + { + switch (type) { + case EQ_FUNC: return SCALAR_CMP_EQ; + case EQUAL_FUNC: return SCALAR_CMP_EQUAL; + case LT_FUNC: return SCALAR_CMP_LT; + case LE_FUNC: return SCALAR_CMP_LE; + case GE_FUNC: return SCALAR_CMP_GE; + case GT_FUNC: return SCALAR_CMP_GT; + default: break; + } + DBUG_ASSERT(0); + return SCALAR_CMP_EQ; + } enum Type type() const { return FUNC_ITEM; } virtual enum Functype functype() const { return UNKNOWN_FUNC; } Item_func(THD *thd): Item_func_or_sum(thd) |