mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Typedef my_bool if missing.
ORACLE MySQL 8.0 has dropped the my_bool type, so we need to reinstate it back when compiling with that version or higher. MariaDB is still keeping the my_bool type. The numbering between the two (MariaDB 5.x jumped to MariaDB 10.x) doesn't make the life of the developer easy.
This commit is contained in:
parent
7af9883b48
commit
c6d5d5c88f
@ -62,6 +62,10 @@
|
|||||||
#include <dlz/sdlz_helper.h>
|
#include <dlz/sdlz_helper.h>
|
||||||
#include <named/globals.h>
|
#include <named/globals.h>
|
||||||
|
|
||||||
|
#if !defined(LIBMARIADB) && MYSQL_VERSION_ID >= 80000
|
||||||
|
typedef bool my_bool;
|
||||||
|
#endif /* !defined(LIBMARIADB) && MYSQL_VERSION_ID >= 80000 */
|
||||||
|
|
||||||
static dns_sdlzimplementation_t *dlz_mysql = NULL;
|
static dns_sdlzimplementation_t *dlz_mysql = NULL;
|
||||||
|
|
||||||
#define dbc_search_limit 30
|
#define dbc_search_limit 30
|
||||||
|
@ -59,6 +59,10 @@
|
|||||||
#include <dlz_minimal.h>
|
#include <dlz_minimal.h>
|
||||||
#include <dlz_pthread.h>
|
#include <dlz_pthread.h>
|
||||||
|
|
||||||
|
#if !defined(LIBMARIADB) && MYSQL_VERSION_ID >= 80000
|
||||||
|
typedef bool my_bool;
|
||||||
|
#endif /* !defined(LIBMARIADB) && MYSQL_VERSION_ID >= 80000 */
|
||||||
|
|
||||||
#define dbc_search_limit 30
|
#define dbc_search_limit 30
|
||||||
#define ALLNODES 1
|
#define ALLNODES 1
|
||||||
#define ALLOWXFR 2
|
#define ALLOWXFR 2
|
||||||
|
@ -61,6 +61,10 @@
|
|||||||
#include <dlz_minimal.h>
|
#include <dlz_minimal.h>
|
||||||
#include <dlz_pthread.h>
|
#include <dlz_pthread.h>
|
||||||
|
|
||||||
|
#if !defined(LIBMARIADB) && MYSQL_VERSION_ID >= 80000
|
||||||
|
typedef bool my_bool;
|
||||||
|
#endif /* !defined(LIBMARIADB) && MYSQL_VERSION_ID >= 80000 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The SQL queries that will be used for lookups and updates are defined
|
* The SQL queries that will be used for lookups and updates are defined
|
||||||
* here. They will be processed into queries by the build_query()
|
* here. They will be processed into queries by the build_query()
|
||||||
@ -1020,7 +1024,10 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[], void **dbdata,
|
|||||||
*/
|
*/
|
||||||
if (mysql_thread_safe()) {
|
if (mysql_thread_safe()) {
|
||||||
for (n = 0; n < MAX_DBI; n++) {
|
for (n = 0; n < MAX_DBI; n++) {
|
||||||
|
#if MYSQL_VERSION_ID >= 50000
|
||||||
my_bool opt = 1;
|
my_bool opt = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
dlz_mutex_init(&state->db[n].mutex, NULL);
|
dlz_mutex_init(&state->db[n].mutex, NULL);
|
||||||
dlz_mutex_lock(&state->db[n].mutex);
|
dlz_mutex_lock(&state->db[n].mutex);
|
||||||
state->db[n].id = n;
|
state->db[n].id = n;
|
||||||
@ -1028,8 +1035,10 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[], void **dbdata,
|
|||||||
state->db[n].sock = mysql_init(NULL);
|
state->db[n].sock = mysql_init(NULL);
|
||||||
mysql_options(state->db[n].sock,
|
mysql_options(state->db[n].sock,
|
||||||
MYSQL_READ_DEFAULT_GROUP, modname);
|
MYSQL_READ_DEFAULT_GROUP, modname);
|
||||||
|
#if MYSQL_VERSION_ID >= 50000
|
||||||
mysql_options(state->db[n].sock, MYSQL_OPT_RECONNECT,
|
mysql_options(state->db[n].sock, MYSQL_OPT_RECONNECT,
|
||||||
&opt);
|
&opt);
|
||||||
|
#endif
|
||||||
dlz_mutex_unlock(&state->db[n].mutex);
|
dlz_mutex_unlock(&state->db[n].mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user