← Back to team overview

maria-developers team mailing list archive

Re: MDEV-26742 Assertion `field->type_handler() == this' failed...

 

Hi, Alexander!

On Oct 12, Alexander Barkov wrote:
> >>>
> >>> Can this be anything else but type_handler_long_blob ?
> >>> if not, then I'd suggest
> >>>
> >>>      Type_handler_hybrid_field_type cmp(type_handler_long_blob);
> >>>      DBUG_ASSERT(type_handler_for_comparison() == &type_handler_long_blob);
> >>
> >> Generally we don't know. It's now for every single plugin to
> >> decide. One can make a plugin using Field_longstr as a base for its
> >> Field, but with a different comparison type handler.
> >>
> >> I wrote it in a generic way which should work for all cases.
> > 
> > Yes, I know. But practically we won't have such plugins for quite a
> > while, so I'd rather prefer a shorter execution path and a faster
> > code. And an assert that will remind us to implement your gneralized
> > approach when the assumption will be broken.
> 
> This code is not heavily loaded and should not affect performance.
> I prefer the generic way.

Feels like kind of a waste. We won't need this generalization for years.

But yes, it's not a performance critical method, so I'm not going to
argue.

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx


References