On 08/22/14 23:46, Stuart Henderson wrote:
> On 2014/08/22 22:06, Stuart Henderson wrote:
>> On 2014/08/19 17:15, Brad Smith wrote:
>>> Here is a diff to make attempt #2 at switching to MariaDB.
>>>
>>> Going through the various Makefile's I noticed bmf had a typo
>>> with its WANTLIB entry for MySQL.
>>
>> It seems that files moved between -server (on mysql) and -client (on 
>> mariadb),
>>
>>         /usr/local/bin/msql2mysql (mysql-server-5.1.73p0v0 and 
>> mariadb-client-10.0.13)
>>         /usr/local/bin/mysql_find_rows (mysql-server-5.1.73p0v0 and 
>> mariadb-client-10.0.13)
>>         /usr/local/bin/mysql_waitpid (mysql-server-5.1.73p0v0 and 
>> mariadb-client-10.0.13)
>>         /usr/local/bin/mysqlaccess (mysql-server-5.1.73p0v0 and 
>> mariadb-client-10.0.13)
>>         /usr/local/man/cat1/msql2mysql.0 (mysql-server-5.1.73p0v0 and 
>> mariadb-client-10.0.13)
>>         /usr/local/man/cat1/mysql_find_rows.0 (mysql-server-5.1.73p0v0 and 
>> mariadb-client-10.0.13)
>>         /usr/local/man/cat1/mysql_waitpid.0 (mysql-server-5.1.73p0v0 and 
>> mariadb-client-10.0.13)
>>         /usr/local/man/cat1/mysqlaccess.0 (mysql-server-5.1.73p0v0 and 
>> mariadb-client-10.0.13)
>>
>> untested but perhaps adding "@conflict mysql-server-*" to 
>> mariadb/pkg/PLIST-main
>> will let this update automatically..
>>
> 
> Not specific to mariadb (similar things happen with the standalone mytop)
> but noticed this while testing:
> 
This diff backported from upstream github repo 
(https://github.com/CaptTofu/DBD-mysql) seems to fix it.
ok ? Comments ?
 Cheers
  Giovanni
Index: Makefile
===================================================================
RCS file: /var/cvs/ports/databases/p5-DBD-mysql/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile	11 Jul 2014 14:11:12 -0000	1.39
+++ Makefile	5 Sep 2014 11:05:17 -0000
@@ -4,7 +4,7 @@ SHARED_ONLY=		Yes
 
 COMMENT=		MySQL drivers for the Perl DBI
 
-DISTNAME=		DBD-mysql-4.027
+DISTNAME=		DBD-mysql-4.028
 CATEGORIES=		databases
 
 MAINTAINER=		Giovanni Bechis <[email protected]>
Index: distinfo
===================================================================
RCS file: /var/cvs/ports/databases/p5-DBD-mysql/distinfo,v
retrieving revision 1.19
diff -u -p -r1.19 distinfo
--- distinfo	11 Jul 2014 14:11:12 -0000	1.19
+++ distinfo	5 Sep 2014 11:05:21 -0000
@@ -1,2 +1,2 @@
-SHA256 (DBD-mysql-4.027.tar.gz) = LgDx61giqgl7MQID/2Ed1jX50ADbnffOHosEk8CCvkE=
-SIZE (DBD-mysql-4.027.tar.gz) = 137476
+SHA256 (DBD-mysql-4.028.tar.gz) = WEKySv/avOixcSL5EM1bWyU78mbX5QhK9d9CSFI4Ee0=
+SIZE (DBD-mysql-4.028.tar.gz) = 138614
Index: patches/patch-dbdimp_c
===================================================================
RCS file: patches/patch-dbdimp_c
diff -N patches/patch-dbdimp_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-dbdimp_c	5 Sep 2014 12:49:49 -0000
@@ -0,0 +1,63 @@
+$OpenBSD$
+--- dbdimp.c.orig	Fri Sep  5 14:48:29 2014
++++ dbdimp.c	Fri Sep  5 14:48:18 2014
+@@ -1948,18 +1948,6 @@ MYSQL *mysql_dr_connect(
+       */
+       result->reconnect=0;
+     }
+-    else {
+-      /* 
+-         sock was allocated with mysql_init() 
+-         fixes: https://rt.cpan.org/Ticket/Display.html?id=86153
+-
+-      Safefree(sock);
+-
+-         rurban: No, we still need this handle later in mysql_dr_error().
+-         RT #97625. It will be freed as imp_dbh->pmysql in dbd_db_destroy(),
+-         which is called by the DESTROY handler.
+-      */
+-    }
+     return result;
+   }
+ }
+@@ -1995,7 +1983,6 @@ static int my_login(pTHX_ SV* dbh, imp_dbh_t *imp_dbh)
+   char* user;
+   char* password;
+   char* mysql_socket;
+-  int   result;
+   D_imp_xxh(dbh);
+ 
+   /* TODO- resolve this so that it is set only if DBI is 1.607 */
+@@ -2046,11 +2033,8 @@ static int my_login(pTHX_ SV* dbh, imp_dbh_t *imp_dbh)
+   if (!imp_dbh->pmysql) {
+      Newz(908, imp_dbh->pmysql, 1, MYSQL);
+   }
+-  result = mysql_dr_connect(dbh, imp_dbh->pmysql, mysql_socket, host, port, user,
++  return mysql_dr_connect(dbh, imp_dbh->pmysql, mysql_socket, host, port, user,
+ 			  password, dbname, imp_dbh) ? TRUE : FALSE;
+-  if (!result)
+-      Safefree(imp_dbh->pmysql);
+-  return result;
+ }
+ 
+ 
+@@ -3321,10 +3305,8 @@ my_ulonglong mysql_st_internal_execute(
+       }
+ #if MYSQL_ASYNC
+   }
+-#endif
+ 
+-  if (salloc)
+-    Safefree(salloc);
++  Safefree(salloc);
+ 
+   if(rows == -2) {
+     do_error(h, mysql_errno(svsock), mysql_error(svsock), 
+@@ -3333,6 +3315,7 @@ my_ulonglong mysql_st_internal_execute(
+       PerlIO_printf(DBIc_LOGPIO(imp_xxh), "IGNORING ERROR errno %d\n", errno);
+     rows = -2;
+   }
++#endif
+   return(rows);
+ }
+ 

Reply via email to