summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-01-18 16:36:13 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2023-01-18 16:36:13 +0100
commit795ff0daf0f1ba691735f64f6e3a08e9ecd0160b (patch)
tree56a23ab6a0103acfd2f01110d5205d8994e0d8c0 /sql/item.h
parentd1a4f6e627b3ad2c86946da08b8e82909707da7c (diff)
parenta01abad6193a39a9cdaa2b36b2a40be1759be0ce (diff)
downloadmariadb-git-795ff0daf0f1ba691735f64f6e3a08e9ecd0160b.tar.gz
Merge branch '10.6' into 10.7
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item.h b/sql/item.h
index c3c5b512722..d197ebb11b7 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -2103,6 +2103,7 @@ public:
virtual Item *copy_or_same(THD *thd) { return this; }
virtual Item *copy_andor_structure(THD *thd) { return this; }
virtual Item *real_item() { return this; }
+ const Item *real_item() const { return const_cast<Item*>(this)->real_item(); }
virtual Item *get_tmp_table_item(THD *thd) { return copy_or_same(thd); }
virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr)
{
@@ -5593,7 +5594,7 @@ public:
{ return ref ? (*ref)->type() : REF_ITEM; }
bool eq(const Item *item, bool binary_cmp) const override
{
- Item *it= ((Item *) item)->real_item();
+ const Item *it= item->real_item();
return ref && (*ref)->eq(it, binary_cmp);
}
void save_val(Field *to) override;
@@ -5949,7 +5950,7 @@ public:
{ orig_item->make_send_field(thd, field); }
bool eq(const Item *item, bool binary_cmp) const override
{
- Item *it= const_cast<Item*>(item)->real_item();
+ const Item *it= item->real_item();
return orig_item->eq(it, binary_cmp);
}
void fix_after_pullout(st_select_lex *new_parent, Item **refptr, bool merge)
@@ -7830,7 +7831,7 @@ public:
{ m_item->make_send_field(thd, field); }
bool eq(const Item *item, bool binary_cmp) const
{
- Item *it= ((Item *) item)->real_item();
+ const Item *it= item->real_item();
return m_item->eq(it, binary_cmp);
}
void fix_after_pullout(st_select_lex *new_parent, Item **refptr, bool merge)