summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-06-29 00:08:09 +0200
committerHaru <haru@dotalux.com>2017-06-29 00:11:52 +0200
commitbb5064f4f8e63364ddc8cb7523ebc3a7def905ed (patch)
tree9fb6659ac6b1acbbfda41859ccc9d514e03f5216 /src/common
parent93b0f5d876fdb5ce9cea57ed47362899752cc48c (diff)
downloadhercules-bb5064f4f8e63364ddc8cb7523ebc3a7def905ed.tar.gz
hercules-bb5064f4f8e63364ddc8cb7523ebc3a7def905ed.tar.bz2
hercules-bb5064f4f8e63364ddc8cb7523ebc3a7def905ed.tar.xz
hercules-bb5064f4f8e63364ddc8cb7523ebc3a7def905ed.zip
Fix compatibility with MariaDB 10.2
This removes a direct access to a member of the `MYSQL` object and replaces it with the proper accessor for forward/backward compatibility. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/sql.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/sql.c b/src/common/sql.c
index c80edbce4..235be3aca 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -91,7 +91,10 @@ struct Sql *Sql_Malloc(void)
self->lengths = NULL;
self->result = NULL;
self->keepalive = INVALID_TIMER;
- self->handle.reconnect = 1;
+ {
+ my_bool reconnect = 1;
+ mysql_options(&self->handle, MYSQL_OPT_RECONNECT, &reconnect);
+ }
return self;
}