summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-10-30 11:15:30 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-10-30 11:15:30 +0200
commit898521e2dd8a4a6706cba01b6ef0a7cea4114fd0 (patch)
tree4ef9a6ddc4298574bb75db673c2412f83c107c5b /sql/item_cmpfunc.h
parent571bcf9aaaf59b84e24bbfb809738dea25495d78 (diff)
parent199863d72b7cccaa4c75641c50c45a83b568ab8c (diff)
downloadmariadb-git-898521e2dd8a4a6706cba01b6ef0a7cea4114fd0.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index fe6cba607a7..fa715badfc7 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
@@ -608,7 +608,7 @@ public:
enum Functype functype() const override { return NOT_FUNC; }
const char *func_name() const override { return "not"; }
bool find_not_null_fields(table_map allowed) override { return false; }
- enum precedence precedence() const override { return BANG_PRECEDENCE; }
+ enum precedence precedence() const override { return NEG_PRECEDENCE; }
Item *neg_transformer(THD *thd) override;
bool fix_fields(THD *, Item **) override;
void print(String *str, enum_query_type query_type) override;
@@ -2184,9 +2184,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)
@@ -2202,7 +2204,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; }
};
@@ -2467,7 +2468,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);
bool find_not_null_fields(table_map allowed);
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge);
@@ -2793,7 +2794,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()
{
@@ -2902,7 +2903,7 @@ public:
longlong val_int();
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)
{