← Back to team overview

maria-developers team mailing list archive

Re: 93493a0e9b5: MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()

 

Hi, Aleksey,

On Apr 12, Aleksey Midenkov wrote:
> > > > > +bool Vcol_expr_context::init()
> > > > > +{
> > > > > +  /*
> > > > > +      As this is vcol expression we must narrow down name resolution to
> > > > > +      single table.
> > > > > +  */
> > > > > +  if (init_lex_with_single_table(thd, table, &lex))
> > > >
> > > CURRENT_TEST: gcol.gcol_bugfixes
> > > mysqltest: At line 579: query 'INSERT INTO t1 (suppliersenttoday)
> > > VALUES (0)' failed: 2013: Lost connection to MySQL server during query
> >
> > this one crashes. on the next line, 580, though.
> > because you set CONTEXT_ANALYSIS_ONLY_VCOL_EXPR, so
> > Type_std_attributes::agg_item_set_converter does not wrap items
> > in Item_func_conv_charset. Which is likely incorrect, because items
> > without wrapping cannot be properly evaluated, and it looks like they
> > has to be evaluated later, so it's not "context analysys only".
> >
> > Crash on wrapped items is https://jira.mariadb.org/browse/MDEV-25638
> > that Sanja is looking at right now.
> 
> Agree, I have the same picture now. Previous faults were on work in
> progress. So it faults anyway and we keep
> init_lex_with_single_table(), right?

No, quite the opposite.
I think (see above) that CONTEXT_ANALYSIS_ONLY_VCOL_EXPR
(it's set inside init_lex_with_single_table()) is wrong, what you're
doing is not "context analysys only", you're preparing items for
evaluation.

Let's wait for Sanja to close his MDEV-25638, and then I'll check this
test case again.

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


Follow ups

References