Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2686 - Mysql++ api segfaults with the gentoo mysql database
Summary: Mysql++ api segfaults with the gentoo mysql database
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Donny Davies (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-12 20:11 UTC by Charles Kerr
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
this is an example use that will sefgault (tst.cpp,285 bytes, text/plain)
2002-05-17 12:50 UTC, Charles Kerr
Details
Makefile for the tst file (Makefile,1.53 KB, text/plain)
2002-05-17 12:52 UTC, Charles Kerr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Kerr 2002-05-12 20:11:08 UTC
If one installs mysql from the www.mysql.org/com website, and takes the 
standard configure, when one adds mysql++ (the programming api), all works.

but when mysql++ is installed with the gentoo mysql, any attempt to access the 
mysql++ library results in a segfault.
Comment 1 Donny Davies (RETIRED) gentoo-dev 2002-05-14 02:08:47 UTC
it would be nice if you included extra information.

Comment 2 Charles Kerr 2002-05-17 12:50:43 UTC
Created attachment 1029 [details]
this is an example use that will sefgault

If built on a maching not using the ebuild version of msyql, the mysql++ api
doesn't segfault.  but with gentoo, this program will segfault.
Comment 3 Charles Kerr 2002-05-17 12:52:03 UTC
Created attachment 1030 [details]
Makefile for the tst file

This is the make file for the test file attached earlier.

Essentially, I can not get the mysql++ API to work successfully on gentoo with
the msyql ebuild.
Comment 4 Charles Kerr 2002-05-18 14:22:21 UTC
The following patch will fix this segfault (posted at 
http://marc.theaimsgroup.com/?l=mysql-bugs&m=101553136709356&w=2):

Any chance that getting into the mysql.ebuild ?

> Fix:
--- mysql-3.23.49/libmysql/libmysql.c   Thu Feb 14 19:30:17 2002
+++ mysql-3.23.49.fix/libmysql/libmysql.c       Thu Mar  7 18:36:31 2002
@@ -712,7 +712,7 @@
          *end=0;                               /* Remove '=' */
        }
        /* Change all '_' in variable name to '-' */
-       for (end= *option ; (end= strcend(end,'_')) ; )
+       for (end= *option ; *(end= strcend(end,'_')) ; )
          *end= '-';
        switch (find_type(*option+2,&option_types,2)) {
        case 1:                         /* port */


Comment 5 Donny Davies (RETIRED) gentoo-dev 2002-06-08 22:15:47 UTC
looks like your patch is now in mysql-3.23.50.  i've added
a new ebuild that should fix this.