-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PS-8258 feature: Make Percona Server buildable on MacOS with RocksDB …
…enabled https://jira.percona.com/browse/PS-8258 In the top-level 'CMakeList.txt' file we now include 'extra/libkmip' subdirectory only when 'KMIP' keying component is configured to be built. RocksDB Storage Engine 'CMakeLists.txt' file now detects MacOS ('Darwin') platform and adds 'OS_MACOSX' preprocessor definition. 'rt' system library no longer added to 'ha_rocksdb.so' as a dependency on MacOS. 'rdb_buff.h' header from the RocksDB Storage Engine code extended with a set of macros for emulating big-endian / little-endian byte-manipulation functions for MacOS. Some RocksDB system variables declared with 'MYSQL_SYSVAR_ENUM' were using global variables of type 'uint64_t'. This was incompatible with the macro definition as it expected variables of type 'ulong'. On Linux platform it was not a problem as 'uint64_t' was defined as 'unsigned long' there. However, on MacOS 'uint64_t' is defined as 'unsigned long long'. Fixed by changing the type of underlying variables from 'uint64_t' to 'ulong'. The family of 'MYSQL_SYSVAR_XXX' macros extended with 'MYSQL_SYSVAR_UINT64_T' that is supposed to be used for 'uint64_t' variables. Because of the same reasons ('uint64_t' being defined differently on Linux and MacOS) we needed this new macro to be able bind system variables directly to RocksDB library variables that have 'uint64_t' type (the type of which we cannot change as this is RocksDB submodule code). A number of 'xxxprintf()' calls in the RocksDB Storage Engine code were incorrectly using '%lu' format specifier for 'uint64_t' types. Again, this was not a problem on Linux as 'uint64_t' was defined as 'unsigned long' there. For compatibility with MacOS, fixed by using proper 'PRIu64' format specifier instead. Fixed problem with passing an empty string to the 'std::regexp' constructor that used to work on Linux but is not allowed by the standard.
- Loading branch information
1 parent
bba0569
commit 8d28305
Showing
10 changed files
with
130 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters