From gaoj@cpsc.ucalgary.ca  Fri Sep  3 19:19:41 2004
Return-Path: <gaoj@cpsc.ucalgary.ca>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3037B16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Sep 2004 19:19:41 +0000 (GMT)
Received: from ensa.cpsc.ucalgary.ca (ensa.cpsc.ucalgary.ca [136.159.2.1])
	by mx1.FreeBSD.org (Postfix) with ESMTP id F1E7943D2D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Sep 2004 19:19:40 +0000 (GMT)
	(envelope-from gaoj@cpsc.ucalgary.ca)
Received: from imgw1.cpsc.ucalgary.ca (imgw1 [136.159.5.9])
	by ensa.cpsc.ucalgary.ca (8.12.11/8.12.11) with ESMTP id i83JGTsC010838
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 3 Sep 2004 13:16:29 -0600
Received: from _HOSTNAME_ (sana-sa [136.159.7.231])
	by imgw1.cpsc.ucalgary.ca (8.12.10/8.12.10) with SMTP id i83JGOXb023331
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 3 Sep 2004 13:16:24 -0600
Received: by _HOSTNAME_ (sSMTP sendmail emulation); Fri,  3 Sep 2004 13:16:24 -0600
Message-Id: <200409031916.i83JGOXb023331@imgw1.cpsc.ucalgary.ca>
Date: Fri,  3 Sep 2004 13:16:24 -0600
From: "Jie Gao" <gaoj@cpsc.ucalgary.ca>
Reply-To: Jie Gao <gaoj@cpsc.ucalgary.ca>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] databases/mysqlcc broken with mysql41-* after updating to mysql-4.1.4
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71350
>Category:       ports
>Synopsis:       [patch] databases/mysqlcc broken with mysql41-* after updating to mysql-4.1.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 03 19:20:23 GMT 2004
>Closed-Date:    Sun Dec 12 22:28:52 GMT 2004
>Last-Modified:  Sun Dec 12 22:28:52 GMT 2004
>Originator:     Jie Gao
>Release:        FreeBSD 5.3-BETA2 i386
>Organization:
>Environment:
System: FreeBSD aibsd-current.cpsc.ucalgary.ca 5.3-BETA2 FreeBSD 5.3-BETA2 #0: Mon Aug 30 20:16:55 MDT 2004 gaoj@aibsd-current.cpsc.ucalgary.ca:/usr/obj/usr/src/sys/AIBSD i386


	
>Description:
	
databases/mysqlcc is broken with mysql-4.1.4 because of internal api changes.
>How-To-Repeat:
	
build databases/mysqlcc from ports when mysql41-client is installed.
>Fix:

	
Apply the following pathc to the ports tree.

--- patch-databases-mysqlcc begins here ---
Index: databases/mysqlcc/files/patch-shared-src-CMySQL.cpp
===================================================================
RCS file: /home/grads/gaoj/repository/ports/databases/mysqlcc/files/patch-shared-src-CMySQL.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- databases/mysqlcc/files/patch-shared-src-CMySQL.cpp	6 Aug 2004 00:24:34 -0000	1.1
+++ databases/mysqlcc/files/patch-shared-src-CMySQL.cpp	3 Sep 2004 19:11:18 -0000	1.2
@@ -4,7 +4,7 @@
    if (!isConnected())
      return false;
    
-+#if  ( MYSQL_VERSION_ID == 40103 ) || ( MYSQL_VERSION_ID == 50001 )
++#if ( MYSQL_VERSION_ID >= 50001 ) || (( MYSQL_VERSION_ID < 50000 ) && ( MYSQL_VERSION_ID >= 40103 ))
 +  if (mysql_shutdown(mysql,SHUTDOWN_DEFAULT) != 0)
 +#else
    if (mysql_shutdown(mysql) != 0)
Index: databases/mysqlcc/files/patch-src-main.cpp
===================================================================
RCS file: databases/mysqlcc/files/patch-src-main.cpp
diff -N databases/mysqlcc/files/patch-src-main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ databases/mysqlcc/files/patch-src-main.cpp	3 Sep 2004 19:12:09 -0000	1.1
@@ -0,0 +1,24 @@
+--- src/main.cpp.orig	Fri Sep  3 12:45:47 2004
++++ src/main.cpp	Fri Sep  3 12:52:15 2004
+@@ -35,6 +35,8 @@
+ #endif
+ #endif
+ 
++#include <mysql_version.h>
++
+ static char *progname;
+ static void usage();
+ static void print_version();
+@@ -196,7 +198,12 @@
+   load_defaults("my",load_default_groups,&argc,&argv);
+   save_argv = argv;
+   progname= argv[0];
++//Not sure about mysql-5 yet
++#if (( MYSQL_VERSION_ID >= 40104 ) && ( MYSQL_VERSION_ID < 50000 ))
++  if (handle_options(&argc, &argv, my_long_options, get_one_option, NULL))
++#else
+   if (handle_options(&argc, &argv, my_long_options, get_one_option))
++#endif
+     exit(-1);
+   if (!argv[0] || !argv[1] || (pid = atoi(argv[0])) <= 0 || (t= atoi(argv[1])) <= 0)  
+     ret = mysqlcc_main(argc, argv);
--- patch-databases-mysqlcc ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: vs 
State-Changed-When: Mon Nov 8 13:05:51 GMT 2004 
State-Changed-Why:  
Forwarded PR to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71350 

From: "Volker Stolz" <vs@freebsd.org>
To: freebsd-gnats-submit@freebsd.org, gaoj@cpsc.ucalgary.ca,
	ferruccio.vitale@tin.it
Cc:  
Subject: Re: ports/71350: [patch] databases/mysqlcc broken with mysql41-* after updating to mysql-4.1.4
Date: Mon, 08 Nov 2004 14:05:38 +0100

 Dear maintainer, please look into this issue!
 
 Cheers,
    Volker
State-Changed-From-To: feedback->open 
State-Changed-By: vs 
State-Changed-When: Sun Dec 12 10:47:32 GMT 2004 
State-Changed-Why:  
Approved by maintainer in ports/74885 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71350 
State-Changed-From-To: open->closed 
State-Changed-By: sem 
State-Changed-When: Sun Dec 12 22:28:37 GMT 2004 
State-Changed-Why:  
Fixed with ports/74885. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71350 
>Unformatted:
