facebook / mysql-5.6

Facebook's branch of the Oracle MySQL database. This includes MyRocks.
http://myrocks.io
Other
2.48k stars 712 forks source link

8.0.28 branch doesn't compile on Arm #1257

Closed mdcallag closed 2 months ago

mdcallag commented 1 year ago

The problem is in client/mysqlbinlog.cc https://github.com/facebook/mysql-5.6/blob/25bb952c18387bdcb13716589f6da16345004996/client/mysqlbinlog.cc#L799

The issue is per the C++ spec, whether "char" is signed or unsigned is compiler+architecture dependent. On Ubuntu 22.04 with gcc 11 and Arm it is unsigned so assigning -1 to it doesn't compile. I am definitely not a compiler guru, but am shaking my head that the spec would specify it this way.

enum class Check_database_decision : char {
  EMPTY_EVENT_DATABASE = 2,
  CHANGED = 1,
  OK = 0,
  ERROR = -1
};
laurynas-biveinis commented 3 months ago

Fixed by https://github.com/facebook/mysql-5.6/pull/1313 in 06be6b96e348b85c99cd28af375e7f075b14e6de

mdcallag commented 2 months ago

thank you