List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:September 14 2009 12:21pm
Subject:Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687
View as plain text  
Andrei Elkin wrote:
> Alfranio, Zhen Xing, hello.
> 
> > Alfranio Correia wrote:
> >
> > Hi Jasonh,
> >
> > I like your idea:
> >
> > "I'm thinking about maybe we can use the command flags setupped in
> > init_update_queries(), such as CF_AUTO_COMMIT_TRANS, or maybe we can
> > define a new flag."
> >
> >
> > Maybe we could create a new flag and remove the "direct" flag from
> > the MYSQL_BIN_LOG::write(). 
> 
> To repeat (and clarify on), we have had the bool is_trans which I find
> is better to be an exact qualifier where the being logged stuff should
> go.
> And we have three choices with the patch: the direct, the T-cache, and
> the N-cache.
> 

I agree that the direct argument should be removed.

I only see three cases where direct is set to true (please point out if
there are other cases):
 1) for DDL, in this case it can be checked within the function
 2) for Incident events, this can also be checked within the function
 3) in close_temporary_tables(THD *thd) for the statement to drop
temporary tables, I think in this case, it does not matter to write it
directly or at the end of the statement through the S-cache.

So in short, I think the direct argument can be removed.

> I still think there is nothing to remove in the base code, not to add
> the new direct bool as well, but rather to convert the existing `bool
> is_trans' into an enum having the three values.
> 

I think we do not need to make is_trans into an enum. See above comment.

> > Note that this is orthogonal to the
> > call to thd->binlog_start_trans_and_stmt(). 
> 
> I realize that.
> 
> > However, if you both
> > want we can avoid calling such method when processing a DDL. I don't
> > have a strong opinion. And if we adopt the flag, I think we should
> > not call  thd->binlog_start_trans_and_stmt() when processing DDLs.
> >
> 
> I don't see a good reason to call thd->binlog_start_trans_and_stmt()
> for DDL either.
> However, for the current work I would stay concervative.
> 
> > Andrei, what do you think about Jasonh's suggestion?
> >
> 
> cheers,
> 
> Andrei
> 

Thread
bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia11 Sep
  • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687He Zhenxing13 Sep
    • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia13 Sep
      • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia13 Sep
        • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687He Zhenxing14 Sep
          • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia14 Sep
            • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia14 Sep
              • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687He Zhenxing14 Sep
              • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Andrei Elkin14 Sep
                • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687He Zhenxing14 Sep
                  • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia14 Sep
                  • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Andrei Elkin14 Sep
                    • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687He Zhenxing15 Sep
                      • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Andrei Elkin15 Sep
                        • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia17 Sep
                          • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Andrei Elkin17 Sep
                            • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia20 Sep
                              • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Andrei Elkin22 Sep
                                • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia22 Sep
                                • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Alfranio Correia28 Sep
                                  • Re: bzr commit into mysql-pe branch (alfranio.correia:3512) WL#2687Andrei Elkin28 Sep