Bug #113661 NDB storage engine built ignoring -DWITH_NDB=OFF (which is OFF by default too)
Submitted: 17 Jan 10:46 Modified: 8 Jul 19:52
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0.36 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[17 Jan 10:46] Laurynas Biveinis
Description:
According to https://dev.mysql.com/doc/refman/8.0/en/source-configuration-options.html#option_cmake_wit...
1) NDB should not be built by default
2) There is a -DWITH_NDB=ON|OFF option to control its build.

But, it seems that NDB is built by default and passing -DWITH_NDB=OFF has no effect.

How to repeat:
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Release -DMYSQL_MAINTAINER_MODE=ON -DDOWNLOAD_BOOST=ON -DWITH_BOOST=~/vilniusdb/mysql-boost/ -DWITH_SYSTEM_LIBS=ON -DFORCE_COLORED_OUTPUT=ON -DWITH_NDB=OFF -DCMAKE_CXX_FLAGS="-Wno-error=unused-variable" -DCMAKE_CXX_FLAGS_DEBUG="-Wno-error=unused-variable -g" -DCMAKE_CXX_FLAGS_RELEASE="-Wno-error=unused-variable -O2 -g -DNDEBUG"

The compiler flags are for another bug, and can be dropped.

Then the build will go through NDB still, as indicated, for example:
[419/4255] Building CXX object storage/ndb/src/common/transporter/CMakeFiles/ndbtransport.dir/TransporterRegistry.cpp.o
...
[653/4255] Linking CXX executable runtime_output_directory/ndb_bitmap-t
... etc.
[18 Jan 5:09] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback!

regards,
Umesh
[25 Jun 14:31] Magnus Blåudd
Posted by developer:
 
The MySQL Server us now built with the ndbcluster plugin by default. Some parts of NDB code base is always built unless explicitly turned off.

This means that the normal MySQL Server can connect to a MySQL NDB Cluster simply by using command line arguments --ndbcluster and --ndb-connectstring=<cluster_connect string>, there is no need to download the MySQL Server which is shipped with the cluster packages.
    
The cmake option WITH_NDB are used to turn on build of entire MySQL NDB Cluster, default is off.
    
For customized builds which do not want ndbcluster plugin built, it can be disabled by turning WITH_NDBCLUSTER_STORAGE_ENGINE off on the cmake
command line, default is on.
    
The old option WITH_PLUGIN_NDBCLUSTER should not be used.
[25 Jun 14:34] Magnus Blåudd
Posted by developer:
 
Closing as it works by design and there is a way to turn off build of the ndbcluster plugin and/or NDB.
[25 Jun 14:36] Magnus Blåudd
Same on all platforms.
[26 Jun 13:55] Laurynas Biveinis
Can confirm that adding -DWITH_NDBCLUSTER_STORAGE_ENGINE=OFF does what I wanted it do to. 

There might be still a doc bug in there: https://dev.mysql.com/doc/refman/8.4/en/source-configuration-options.html#option_cmake_wit... and other NDB option descriptions are not immediately obvious in this regard. Perhaps it could be clarified a bit more there?
[28 Jun 10:26] Magnus Blåudd
Posted by developer:
 
Good point, checking with Docs team if that page can be improved.
[8 Jul 14:29] Jon Stephens
Following discussion with Magnus--changing category to Docs, assigning to myself for resolution.
[8 Jul 17:41] Jon Stephens
Note: WITH_PLUGIN_NDBCLUSTER was removed in NDB 8.0.31, and this was already reflected in the documentation.
[8 Jul 19:52] Jon Stephens
Fixed in all versions of the MySQL Manual, in mysqldoc rev 78989.

Closed.