Bug #97246 plugins use "vestigial" wire_format_lite_inl.h even with system protobuf > 3.8

Submitted: 16 Oct 2019 6:38 Modified: 22 Oct 2019 12:45
Reporter: no thank you Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.18 OS:MacOS (10.15)
Assigned to: CPU Architecture:Any

[16 Oct 2019 6:38] no thank you
Description:
MySQL 8.0.18 ships with the ability to use system or bundled protobuf libraries. On Mac OS X, Homebrew provides protobuf v3.10.0; MySQL ships with protobuf v3.6.1. In protobuf v3.8, the include file google/protobuf/wire_format_lite_inl.h is deprecated and removed from the protobuf distribution. This means that compiling MySQL with a more recent version of protobuf than v3.8 will fail due to these "missing" include files.

How to repeat:
Install a system version of protobuf > 3.8, compile MySQL with -DWITH_PROTOBUF=system provided as a cmake argument. Build will error out.

Suggested fix:
One approach would be to remove or ifdef out the "outdated" include lines from `plugin/x/ngs/include/ngs/protocol/protocol_protobuf.h` and `plugin/x/client/mysqlxclient/xmessage.h`. This is the naive approach I've taken in this hacky patch to the Homebrew mysql formula.

https://github.com/Homebrew/homebrew-core/pull/45383/commits/4b4dfa1c153a05f1fd4b83c2df741...

The result builds and passes tests (and mysqlclient runs successfully) but I don't really understand how this code is using the protobuf library, so another approach might be best.
[16 Oct 2019 10:12] Jon Olav Hauglid
Verified. Thanks for the bug report!
[21 Oct 2019 13:17] Jon Olav Hauglid
Hi again, we fixed this in a similar manner by removing
#include <google/protobuf/wire_format_lite_inl.h>
from the two relevant files.
[22 Oct 2019 12:45] Paul DuBois
Posted by developer:
 
Fixed in 8.0.19.

MySQL failed to compile against Protobuf 3.10.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.