Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 77662 - mysql RPM's do not provide a thread safe library
Summary: mysql RPM's do not provide a thread safe library
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: mysql
Version: 2.1
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Patrick Macdonald
QA Contact: David Lawrence
URL:
Whiteboard:
: 85816 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-11 17:09 UTC by James Olin Oden
Modified: 2007-11-30 22:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-02-25 19:31:41 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2003:093 high SHIPPED_LIVE : Updated MySQL packages fix vulnerabilities 2003-04-29 04:00:00 UTC
Red Hat Product Errata RHSA-2003:094 normal SHIPPED_LIVE Important: mysql security update 2003-04-28 04:00:00 UTC

Description James Olin Oden 2002-11-11 17:09:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Tekelec)

Description of problem:
The mysql RPM does not provide the thread safe version of the 
mysql client library:

   libmysqlclient_r.so

I have searched through all the mysql RPM's using:

   rpm -ql (rpm_name) 

and have not found this.  Further more, if one links against the provided 
libmysqlclient.so and runs the function:

   mysql_thread_safe()

It returns false (i.e. that the mysql client linked against is not
thread safe).


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.  Create the following program:
        #include <stdio.h>
        #include <stdlib.h>


        main() {
                printf("mysql_thread_safe  %s\n", mysql_thread_safe
() ? "yes" : "no");
                exit(0);
        }

2.  Compile and link it against the libmysqlclient library:

   gcc msyqltest.c -L/usr/lib/mysql -lmysqlclient -lz


3. Run the program.  



Actual Results:  The program output:

   mysql_thread_safe  no


Expected Results:  The program output:

   mysql_thread_safe  yes

If on the other hand you download the latest mysql RPM's from 
www.mysql.org, remove the RedHat ones and install the MySQL ones,
and then link against mysqlclient_r the result will be the expected
results.





	

Additional info:

Comment 1 Patrick Macdonald 2003-02-04 19:37:34 UTC
This is an enhancement request that we'll look into.  At the moment, we ship
the normal mysqlclient library, not the thread safe one.  The reason why your
test is failing is that you are linking to the non thread safe library.  The
results of your test (ie, mysql_thread_safe no) was the correct output.

To create the thread safe client library, one must configure the build with
--enable-thread-safe-client, which will produce the libmysqlclient_r library.

Comment 2 James Olin Oden 2003-02-05 13:43:34 UTC
The reason I was linking to the non-thread-safe client library is a thread safe 
client library is not provided by the RedHat RPM.  The description of the 
bug points this out:

   mysql RPM's do not provide a thread safe client library

This probably meant that I understood there was no thread 
safe client library provided in the first place.

Comment 3 Patrick Macdonald 2003-02-05 14:36:32 UTC
And all I was stating was that you listed "Expect Results: mysql_thread_safe
yes"
which is not what you should be expecting when linking against libmysqlclient.
Anyway, we're looking at it now.

Comment 4 Patrick Macdonald 2003-02-05 14:42:18 UTC
Interesting... Netscape ate the summary line.  Replacing

Comment 5 Patrick Macdonald 2003-02-25 19:31:41 UTC
This has been fixed.  The thread safe client is now being built and the
provided test case performs correctly.

Comment 6 Patrick Macdonald 2003-03-10 16:31:34 UTC
*** Bug 85816 has been marked as a duplicate of this bug. ***

Comment 7 Mark J. Cox 2003-04-28 12:52:49 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2003-094.html



Note You need to log in before you can comment on or make changes to this bug.