Bug #85630 Build without server and with ndb fails: my_decimal.h: No such file or directory
Submitted: 26 Mar 2017 18:25 Modified: 28 Mar 2017 16:21
Reporter: Mauritz Sundell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.1alpha OS:Any
Assigned to: CPU Architecture:Any

[26 Mar 2017 18:25] Mauritz Sundell
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.
[28 Mar 2017 10:01] Mauritz Sundell
Posted by developer:
 
ok by mail
[28 Mar 2017 16:21] Paul DuBois
Posted by developer:
 
Fixed in 8.0.1.

Bug affects no released version. No changelog entry needed.