| List: | Commits | « Previous MessageNext Message » | |
| From: | He Zhenxing | Date: | July 14 2008 3:22am |
| 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: > > > > 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. > > > > He, > > uint's and ulong's are the same size ONLY, ONLY, ONLY on 32-bit > Unix and 64-bit Windows. That leaves a HUGE number of customers on > 64-bit Unix where those differ. > You're right, On 64-bit Linux, int is 32-bit and long is 64-bit. But I think on 32-bit Windows, int and long are also the same size, and since for 64-bit systems, read and write 64bit is atomic, so ulong should be safe too. > This existed for a long time without a problem, because it was not > used too much. A patch that you have made will be used much more, as > slaves have more problems in this area then masters. > > I don't think there is need for mutex. Please, make all these simply > uint !!!! That is fantastic solution. > I agree that we do not need a mutex. And I know it's simple to change ulong to uint, I just want to make sure we need this changes. So could you please provide an example on with platform where uint is safe while ulong is not? Thanks a lot!
