maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11212
Re: a74e3ef17e7: MDEV-14551 Can't find record in table on multi-table update with ORDER BY
Hi, Sergey!
Forgot to mention it in my first reply, sorry
On Apr 12, Sergey Petrunia wrote:
> > diff --git a/sql/item.h b/sql/item.h
> > index 9574bdc63bf..e391e7810c4 100644
> > --- a/sql/item.h
> > +++ b/sql/item.h
> > @@ -2023,6 +2023,7 @@ class Item: public Value_source,
> > {
> > marker &= ~EXTRACTION_MASK;
> > }
> > + virtual TABLE *rowid_table() const { return 0; }
>
> I am concerned about this approach bloating class Item's vtable.
>
> There is (and likely will ever be) only one class with a different
> implementation, the check for this is made only in one place - why not
> check Item's type() or functype(), etc?
I know, I don't like this either. But the alternative was
if (item->type() == FUNC_ITEM &&
((Item_func*)item)->functype() == ROWID_FUNC &&
((Item_temptable_rowid*)item)->table == tbl)
...
that is, I need to compare both item->type() and item_func->functype().
So I thought it'd be better to add a method.
I can revert back to type()/functype() comparison, if you prefer that.
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx
Follow ups
References