diff options
author | Razvan Becheriu <razvan@isc.org> | 2020-01-23 13:40:49 +0100 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2020-02-21 09:15:14 +0100 |
commit | 5ee9b348c3f4c73814666cc03b25bc3b8a5c6345 (patch) | |
tree | c5fc43a1ae70ffd81575d5881a2c4e5e8c743a98 /src/lib/mysql | |
parent | [#1071] fixed compilation for mysql 8.x (diff) | |
download | kea-5ee9b348c3f4c73814666cc03b25bc3b8a5c6345.tar.xz kea-5ee9b348c3f4c73814666cc03b25bc3b8a5c6345.zip |
[#1071] refactored
Diffstat (limited to 'src/lib/mysql')
-rw-r--r-- | src/lib/mysql/mysql_constants.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/mysql/mysql_constants.h b/src/lib/mysql/mysql_constants.h index 6cb741abac..0d9cec1e43 100644 --- a/src/lib/mysql/mysql_constants.h +++ b/src/lib/mysql/mysql_constants.h @@ -16,10 +16,12 @@ namespace db { /// //@{ -#ifdef HAVE_MYSQL_MY_BOOL /// @brief my_bools type for vectors. +/// @note vector<bool> is specialized into a bitset, so vector<char> +/// must be used instead typedef char my_bools; +#ifdef HAVE_MYSQL_MY_BOOL /// @brief MySQL false value. const my_bool MLM_FALSE = 0; @@ -27,16 +29,9 @@ const my_bool MLM_FALSE = 0; const my_bool MLM_TRUE = 1; #else -///@brief check for bool size -static_assert(sizeof(bool) == 1, "unsupported bool size"); - /// @brief my_bool type in MySQL 8.x. typedef bool my_bool; -/// @brief my_bools type for vectors in MySQL 8.x. -/// @note vector<my_bool> is specialized into a bitset. -typedef char my_bools; - /// @brief MySQL false value. const my_bool MLM_FALSE = false; @@ -44,6 +39,9 @@ const my_bool MLM_FALSE = false; const my_bool MLM_TRUE = true; #endif +///@brief check for bool size +static_assert(sizeof(my_bool) == sizeof(char), "unsupported bool size"); + /// @brief MySQL fetch success code. const int MLM_MYSQL_FETCH_SUCCESS = 0; |