Kea: mysql_constants.h Source File

| Kea 3.0.3-git

mysql_constants.h
Go to the documentation of this file.
1// Copyright (C) 2018-2025 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef MYSQL_CONSTANTS_H
8#define MYSQL_CONSTANTS_H
9
10#include <mysql.h>
11
12namespace isc {
13namespace db {
14
17
18
22 typedef char my_bools;
23
24#ifdef HAVE_MYSQL_MY_BOOL
26const my_bool MLM_FALSE = 0;
27
29const my_bool MLM_TRUE = 1;
30
31#else
33 typedef bool my_bool;
34
36 const my_bool MLM_FALSE = false;
37
39 const my_bool MLM_TRUE = true;
40#endif
41
43static_assert(sizeof(my_bool) == sizeof(char), "unsupported bool size");
44
46 const int MLM_MYSQL_FETCH_SUCCESS = 0;
47
49 const int MLM_MYSQL_FETCH_FAILURE = 0;
50
52
54
55 const uint32_t MYSQL_SCHEMA_VERSION_MAJOR = 30;
56 const uint32_t MYSQL_SCHEMA_VERSION_MINOR = 0;
57
59
60
61} // end of namespace isc::db
62} // end of namespace isc
63
64#endif
isc::db
Definition audit_entry.cc:14
isc::db::MLM_FALSE
const my_bool MLM_FALSE
MySQL false value.
Definition mysql_constants.h:36
isc::db::MYSQL_SCHEMA_VERSION_MAJOR
const uint32_t MYSQL_SCHEMA_VERSION_MAJOR
Definition mysql_constants.h:55
isc::db::MYSQL_SCHEMA_VERSION_MINOR
const uint32_t MYSQL_SCHEMA_VERSION_MINOR
Definition mysql_constants.h:56
isc::db::MLM_TRUE
const my_bool MLM_TRUE
MySQL true value.
Definition mysql_constants.h:39
isc::db::my_bool
bool my_bool
my_bool type in MySQL 8.x.
Definition mysql_constants.h:33
isc::db::MLM_MYSQL_FETCH_FAILURE
const int MLM_MYSQL_FETCH_FAILURE
MySQL fetch failure code.
Definition mysql_constants.h:49
isc::db::my_bools
char my_bools
my_bools type for vectors.
Definition mysql_constants.h:22
isc::db::MLM_MYSQL_FETCH_SUCCESS
const int MLM_MYSQL_FETCH_SUCCESS
check for bool size
Definition mysql_constants.h:46
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148