mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
26 lines
824 B
Diff
26 lines
824 B
Diff
diff --git a/src/mysql_plugin.c b/src/mysql_plugin.c
|
|
index d2503e7..d477270 100644
|
|
--- a/src/mysql_plugin.c
|
|
+++ b/src/mysql_plugin.c
|
|
@@ -668,8 +668,9 @@ void MY_DB_Connect(struct DBdesc *db, char *host)
|
|
MYSQL *dbptr = db->desc;
|
|
|
|
if (!db->fail) {
|
|
+ my_bool reconnect = 1;
|
|
mysql_init(db->desc);
|
|
- dbptr->reconnect = TRUE;
|
|
+ mysql_options(db->desc, MYSQL_OPT_RECONNECT, &reconnect);
|
|
if (!mysql_real_connect(db->desc, host, config.sql_user, config.sql_passwd, config.sql_db, 0, NULL, 0)) {
|
|
sql_db_fail(db);
|
|
MY_get_errmsg(db);
|
|
@@ -768,5 +769,9 @@ void MY_init_default_values(struct insert_data *idata)
|
|
|
|
void MY_mysql_get_version()
|
|
{
|
|
+#ifdef MARIADB_CLIENT_VERSION_STR
|
|
+ printf("MySQL %s\n", MARIADB_CLIENT_VERSION_STR);
|
|
+#else
|
|
printf("MySQL %s\n", MYSQL_SERVER_VERSION);
|
|
+#endif
|
|
}
|