diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-10-28 10:01:50 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-10-28 10:01:50 +0200 |
commit | a8de8f261d1b7621b8e16396e87dfaac14891162 (patch) | |
tree | 9b8ec45858c2757305e0bdecf237fcb59251020c /sql/item_cmpfunc.h | |
parent | e183aec1d75ea7b424ebe237e6b1643961903f2d (diff) | |
parent | 42e1815ad850384fad292534665ff61b78dd96f6 (diff) | |
download | mariadb-git-a8de8f261d1b7621b8e16396e87dfaac14891162.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index f22ef0a6c3c..dfbba3fdca9 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1,7 +1,7 @@ #ifndef ITEM_CMPFUNC_INCLUDED #define ITEM_CMPFUNC_INCLUDED /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -595,7 +595,7 @@ public: longlong val_int(); enum Functype functype() const { return NOT_FUNC; } const char *func_name() const { return "not"; } - enum precedence precedence() const { return BANG_PRECEDENCE; } + enum precedence precedence() const { return NEG_PRECEDENCE; } Item *neg_transformer(THD *thd); bool fix_fields(THD *, Item **); virtual void print(String *str, enum_query_type query_type); @@ -2115,9 +2115,11 @@ protected: bool aggregate_then_and_else_arguments(THD *thd, uint count); virtual Item **else_expr_addr() const= 0; virtual Item *find_item()= 0; - void print_when_then_arguments(String *str, enum_query_type query_type, - Item **items, uint count); - void print_else_argument(String *str, enum_query_type query_type, Item *item); + inline void print_when_then_arguments(String *str, + enum_query_type query_type, + Item **items, uint count); + inline void print_else_argument(String *str, enum_query_type query_type, + Item *item); void reorder_args(uint start); public: Item_func_case(THD *thd, List<Item> &list) @@ -2132,7 +2134,6 @@ public: bool fix_fields(THD *thd, Item **ref); table_map not_null_tables() const { return 0; } const char *func_name() const { return "case"; } - enum precedence precedence() const { return BETWEEN_PRECEDENCE; } CHARSET_INFO *compare_collation() const { return cmp_collation.collation; } bool need_parentheses_in_default() { return true; } }; @@ -2397,7 +2398,7 @@ public: virtual void print(String *str, enum_query_type query_type); enum Functype functype() const { return IN_FUNC; } const char *func_name() const { return "in"; } - enum precedence precedence() const { return CMP_PRECEDENCE; } + enum precedence precedence() const { return IN_PRECEDENCE; } bool eval_not_null_tables(void *opt_arg); void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool count_sargable_conds(void *arg); @@ -2712,7 +2713,7 @@ public: return this; } const char *func_name() const { return "like"; } - enum precedence precedence() const { return CMP_PRECEDENCE; } + enum precedence precedence() const { return IN_PRECEDENCE; } bool fix_fields(THD *thd, Item **ref); bool fix_length_and_dec() { @@ -2840,7 +2841,7 @@ public: bool fix_fields(THD *thd, Item **ref); bool fix_length_and_dec(); const char *func_name() const { return "regexp"; } - enum precedence precedence() const { return CMP_PRECEDENCE; } + enum precedence precedence() const { return IN_PRECEDENCE; } Item *get_copy(THD *) { return 0; } void print(String *str, enum_query_type query_type) { |