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

2022-01-06 Thread Sergei Golubchik
Hi, Aleksey! Could you please explain in the commit comment what the bug was and what you are fixing? I wasn't able to understad that, so I had to debug those crashes myself. So, the reason is, objects allocated in the wrong arena, right? And it was done inconsistently, on different code paths t

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

2022-01-13 Thread Aleksey Midenkov
Hi Sergei! On Thu, Jan 6, 2022 at 7:13 PM Sergei Golubchik wrote: > > Hi, Aleksey! > > Could you please explain in the commit comment what the bug was and what > you are fixing? I have added a new message to the last commit. This will be the message of the squashed patch. > > I wasn't able to u

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

2022-01-17 Thread Sergei Golubchik
Hi, Aleksey! On Jan 13, Aleksey Midenkov wrote: > > > > But always using expr_arena doesn't necessarily seem to be a correct > > choice. E.g. Arg_comparator creates Item_cache_temporal on every > > fix_field. If vcol expr is re-fixed all the time, expr_arena will > > grow continuously. Same for ch

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

2022-01-23 Thread Aleksey Midenkov
Hi Sergei! On Mon, Jan 17, 2022 at 7:56 PM Sergei Golubchik wrote: > > Hi, Aleksey! > > On Jan 13, Aleksey Midenkov wrote: > > > > > > But always using expr_arena doesn't necessarily seem to be a correct > > > choice. E.g. Arg_comparator creates Item_cache_temporal on every > > > fix_field. If vc

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

2022-03-31 Thread Sergei Golubchik
Hi, Aleksey, Here's a review of the combined `git diff 4daf9d7c3ee0 f67dcf6ba5f2`: > diff --git a/mysql-test/suite/vcol/r/vcol_syntax.result > b/mysql-test/suite/vcol/r/vcol_syntax.result > index 0063f38ea36..c5c8a33c0ec 100644 > --- a/mysql-test/suite/vcol/r/vcol_syntax.result > +++ b/mysql-tes

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

2022-04-05 Thread Aleksey Midenkov
Hi, Sergei! On Thu, Mar 31, 2022 at 11:30 PM Sergei Golubchik wrote: > > Hi, Aleksey, > > Here's a review of the combined `git diff 4daf9d7c3ee0 f67dcf6ba5f2`: > > > diff --git a/mysql-test/suite/vcol/r/vcol_syntax.result > > b/mysql-test/suite/vcol/r/vcol_syntax.result > > index 0063f38ea36..c5

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

2022-04-06 Thread Sergei Golubchik
Hi, Aleksey, Thanks. I'll send a separate review email, there will be only replies here: On Apr 05, Aleksey Midenkov wrote: > Hi, Sergei! > > > > @@ -5709,8 +5708,6 @@ bool Item_field::fix_fields(THD *thd, Item > > > **reference) > > >} > > > #endif > > >fixed= 1; > > > - if (field->v

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

2022-04-12 Thread Aleksey Midenkov
Sergei, On Wed, Apr 6, 2022 at 11:03 PM Sergei Golubchik wrote: > > Hi, Aleksey, > > Thanks. I'll send a separate review email, there will be only replies > here: > > On Apr 05, Aleksey Midenkov wrote: > > Hi, Sergei! > > > > > > @@ -5709,8 +5708,6 @@ bool Item_field::fix_fields(THD *thd, Item >

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

2022-04-13 Thread Sergei Golubchik
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_

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

2022-04-13 Thread Aleksey Midenkov
Hi Sergei, On Wed, Apr 13, 2022 at 8:18 PM Sergei Golubchik wrote: > > 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

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

2022-04-15 Thread Sergei Golubchik
Hi, Aleksey, On Apr 13, Aleksey Midenkov wrote: > > > > 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.

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

2022-04-15 Thread Aleksey Midenkov
Hi Sergei! On Fri, Apr 15, 2022 at 6:00 PM Sergei Golubchik wrote: > > Hi, Aleksey, > > On Apr 13, Aleksey Midenkov wrote: > > > > > > 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

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

2022-04-16 Thread Sergei Golubchik
Hi, Aleksey, > > Take a look at the bb-10.3-serg-MDEV-24176 branch. Three commits > > there: two cherry-picks from 10.2 (they shouldn't be pushed into > > 10.3, instead your commit will eventually be rebased on top of them > > after they're merged into 10.3) and the "work-in-progress" commit > > t