Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2019 19:57:18 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r489527 - head/net-mgmt/pmacct/files
Message-ID:  <201901061957.x06JvIj4069014@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Sun Jan  6 19:57:17 2019
New Revision: 489527
URL: https://svnweb.freebsd.org/changeset/ports/489527

Log:
  net-mgmt/pmacct: fix build with mariadb
  
  PR:		231345
  Submitted by:	Antonio.Trindade@gmail.com

Added:
  head/net-mgmt/pmacct/files/patch-src_mysql_plugin.c   (contents, props changed)

Added: head/net-mgmt/pmacct/files/patch-src_mysql_plugin.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/pmacct/files/patch-src_mysql_plugin.c	Sun Jan  6 19:57:17 2019	(r489527)
@@ -0,0 +1,23 @@
+--- src/mysql_plugin.c.orig	2019-01-06 20:48:02.557254000 +0100
++++ src/mysql_plugin.c	2019-01-06 20:49:11.176001000 +0100
+@@ -668,8 +668,9 @@
+   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_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
+ }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901061957.x06JvIj4069014>