← Back to team overview

maria-developers team mailing list archive

Re: 4af7a583802: Refactor MYSQL_BIN_LOG: extract Event_log ancestor

 

Hi, Nikita!

On Nov 23, Nikita Malyavin wrote:
>
> Right. Adding as follows:
> 
> Event_log is supposed to be a basic logging class that can write events in
> a single file.
> 
> MYSQL_BIN_LOG in comparison will have:
> * rotation support
> * index files
> * purging
> * gtid, xid and other transactional information handling.
> * is dedicated for a general-purpose binlog

Great!

> > > diff --git a/sql/log.h b/sql/log.h
> > > index 73cd66d5a4a..74c409e1ac7 100644
> > > --- a/sql/log.h
> > > +++ b/sql/log.h
> > > @@ -918,7 +968,6 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
> > >    uint next_file_id();
> > >    inline char* get_index_fname() { return index_file_name;}
> > >    inline char* get_log_fname() { return log_file_name; }
> > > -  inline char* get_name() { return name; }
> > >    inline mysql_mutex_t* get_log_lock() { return &LOCK_log; }
> >
> > should remove that too, I reckon
> >
> Well, these are so tiny getters so I'm not sure, whether is it more
> comfortable to jump back and forth to check what's there in Event_log,
> or just admit the cost of duplication for a better read comfort. I'd
> leave it as it is now.

What I mean is, you moved get_log_lock() to MYSQL_LOG class.
You don't need a second copy here, it's redundant.

Except that MYSQL_LOG is private here and you want get_log_lock()
public, apparently? Okay then it's needed here too.

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


References