[Commits] 97d212a: MDEV-10545: Server crashed in my_copy_fix_mb on querying I_S and P_S tables

Sergey Vojtovich svoj at mariadb.org
Fri Sep 2 16:10:13 EEST 2016


Hi Nirbhay,

On Fri, Sep 02, 2016 at 09:00:27AM -0400, Nirbhay Choubey wrote:
> > > diff --git a/sql/log_event.cc b/sql/log_event.cc
> > > index afa58af..66e7c60 100644
> > > --- a/sql/log_event.cc
> > > +++ b/sql/log_event.cc
> > > @@ -6022,7 +6022,7 @@ int Load_log_event::do_apply_event(NET* net,
> > rpl_group_info *rgi,
> > >    new_db.str= (char *) rpl_filter->get_rewrite_db(db, &new_db.length);
> > >    thd->set_db(new_db.str, new_db.length);
> > >    DBUG_ASSERT(thd->query() == 0);
> > > -  thd->reset_query_inner();                    // Should not be needed
> > > +  if (thd->query()) thd->reset_query();         // Should not be needed
> > Why if? Original code didn't have it.
> >
> 
> Now that we call reset_query(), the check has been added to avoid it and an
> extra mutex.
> And from the above assert, I think it will be ever better have this check
> within unlikely().
Taking into account this assert I'd say there's no point in reset_query at all.

Regards,
Sergey


More information about the commits mailing list