Description:
Build MySQL Cluster from mysql-trunk without server fails.
This is a regression from Bug#23212938 ADD SUPPORT FOR SOLARIS STUDIO 12.5 AKA 5.14 that got unnoticed since Ndb was wrongly build with sql/ in include paths for some components.
cmake -DWITHOUT_SERVER=1 -DWITH_NDBCLUSTER=1 ../src
[ 73%] Building C object storage/ndb/src/mgmapi/CMakeFiles/ndbmgmapi.dir/__/kernel/error/ndbd_exit_codes.c.o
/.../mysql-trunk/src/storage/ndb/src/common/util/decimal_utils.cpp:23:24: fatal error: my_decimal.h: No such file or directory
#include "my_decimal.h"
^
compilation terminated.
make[2]: *** [storage/ndb/src/common/util/CMakeFiles/ndbgeneral.dir/build.make:807: storage/ndb/src/common/util/CMakeFiles/ndbgeneral.dir/decimal_utils.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 73%] Building CXX object client/CMakeFiles/mysqlbinlog_lib.dir/__/sql/rpl_gtid_misc.cc.o
How to repeat:
Checkout mysql-trunk and run cmake -DWITHOUT_SERVER=1 -DWITH_NDBCLUSTER=1 ...
Suggested fix:
Alternative 2, is probably the least intrusive and still a lng term solution.
1) Introduce a new decimal_types.h there types and constants can be and move back string2decimal back to decimal.h
Header only users of decimal.h should instead include decimal_types.h.
2) Make string2decimal an exported (not inlined) function declared in decimal.h and implemented in decimal.cc.
2a) remove internal_str2decimal and keep non-fixed variant as string2decimal.
3) Make ndb use internal_str2decimal instead. But this approach looks bad, what I can see there are no real users of internal_str2dec at all so we should remove it from our libstrings.
Do we need to be backward compatible for libmysqlclient.a keeping internal_str2dec? We do not have it exported in libmysqlclient.so.