List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:July 10 2008 12:45pm
Subject:Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542,
Bug#31665
View as plain text  
Sinisa Milivojevic wrote:
> He Zhenxing writes:
> > > 
> > > >>> @@ -49,8 +49,7 @@
> > > >>>  
> > > >>>  LOGGER logger;
> > > >>>  
> > > >>> -MYSQL_BIN_LOG mysql_bin_log;
> > > >>> -ulong sync_binlog_counter= 0;
> > > >>> +MYSQL_BIN_LOG mysql_bin_log(&sync_binlog_period);
> > > >> Note: there is no mutex or other form of lock protecting this
> variable.
> > > >> In the event that the ulong is split into several registers, the
> two
> > > >> parts might be read and written separately.
> > > >>
> > > > 
> > > > yes, will be fixed
> > > 
> > > OK.
> > > 
> 
> He,
> 
> Please, make all sync_... variables of the uint type. Why is there a
> need for more then 4 billion changes before a sync ???? uint will make
> the operations atomic.
> 

On most modern platforms, uint and ulong are the same size, both are
32bit or 64bit, the operation on these types are usually atomic. The
'sync_binlog_period' has been existed for a long time without problem is
a prove. But to be paranoid, I will use the LOCK_global_system_variables
to guard the access of these variables. 

> 
> -- 
> 
> Sincerely,
> 
> --
>    Mr. Sinisa Milivojevic
>    MySQL Support Manager, Advanced Issues
>    Sun Microsystems, Inc.
>    Larnaca, Republic of Cyprus (GMT +2)
>    sinisa@stripped
> 
> 
> 

Thread
bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542, Bug#31665He Zhenxing7 Jul
  • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542, Bug#31665Mats Kindahl7 Jul
    • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542,Bug#31665He Zhenxing8 Jul
      • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542, Bug#31665Mats Kindahl8 Jul
        • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611)Bug#35542, Bug#31665He Zhenxing9 Jul
          • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542,Bug#31665Sinisa Milivojevic9 Jul
            • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542,Bug#31665Davi Arnaut9 Jul
            • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542,Bug#31665He Zhenxing10 Jul
              • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542,Bug#31665Sinisa Milivojevic11 Jul
                • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542,Bug#31665He Zhenxing14 Jul
          • Re: bzr commit into mysql-5.1-rpl branch (hezx:2611) Bug#35542, Bug#31665Mats Kindahl9 Jul