"BUG": "strend" function in libmysql needs to be private

"BUG": "strend" function in libmysql needs to be private

am 13.09.2002 15:46:39 von Ben Goodwin

There are probably other functions that need to be made private, too.. but
this one's directly affecting me.
I'm writing a shared library that loads libmysqlclient; When Solaris 'csh'
uses said library, there's a clash between csh (and/or one of the libs it
uses) and MySQL's 'strend' function. 'strend' will not return proper values
under these circumstances, preventing me from even connecting to the server
on intel, and, worse, core-dumping under sparc. Can you take a peek at
this? I'll provide more info if necessary.
FWIW I renamed the function to _strend, recompiled/installed, and my
problems went away...

Thanks!

-=| Ben




------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Re: "BUG": "strend" function in libmysql needs to be private

am 13.09.2002 15:51:13 von Ben Goodwin

Anti-spam text
How-To-Repeat:
:-)

> ---start of your message----
> There are probably other functions that need to be made private, too.. but
> this one's directly affecting me.
> I'm writing a shared library that loads libmysqlclient; When Solaris 'csh'
> uses said library, there's a clash between csh (and/or one of the libs it
> uses) and MySQL's 'strend' function. 'strend' will not return proper
values
> under these circumstances, preventing me from even connecting to the
server
> on intel, and, worse, core-dumping under sparc. Can you take a peek at
> this? I'll provide more info if necessary.
> FWIW I renamed the function to _strend, recompiled/installed, and my
> problems went away...
>
> Thanks!
>
> -=| Ben




------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12540@lists.mysql.com
To unsubscribe, e-mail

"BUG": "strend" function in libmysql needs to be private

am 17.09.2002 20:15:14 von Michael Widenius

Hi!

>>>>> "Ben" == Ben Goodwin writes:

Ben> There are probably other functions that need to be made private, too.. but
Ben> this one's directly affecting me.
Ben> I'm writing a shared library that loads libmysqlclient; When Solaris 'csh'
Ben> uses said library, there's a clash between csh (and/or one of the libs it
Ben> uses) and MySQL's 'strend' function. 'strend' will not return proper values
Ben> under these circumstances, preventing me from even connecting to the server
Ben> on intel, and, worse, core-dumping under sparc. Can you take a peek at
Ben> this? I'll provide more info if necessary.

strend() is a function we use a lot in the MySQL client code and is
thus included in the libmysqlclient library.

I can't see how csh could affect this in any way as csh doesn't have
anything directly to do with shared libraries. (Except of course if
you are trying to load a shared library inside csh).using a patched csh

Which public library is it that has a conflicting function ?
(I have used Solaris a lot and never seen this problem before)

What is it that core dumps; csh or your application ?
Does your application work if you are running 'sh' ?

Ben> FWIW I renamed the function to _strend, recompiled/installed, and my
Ben> problems went away...

Regards,
Monty

--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Re: "BUG": "strend" function in libmysql needs to be private

am 18.09.2002 20:46:37 von Ben Goodwin

I was about to email bugs/lists back today to basically say I've found a
reasonable workaround.. I'll respond to your message though in case you see
something that needs attention ...

> strend() is a function we use a lot in the MySQL client code and is
> thus included in the libmysqlclient library.

Yeah I've come to realize this .. the 'mysql' client binary started
complaining about not finding strend :-)

> I can't see how csh could affect this in any way as csh doesn't have
> anything directly to do with shared libraries. (Except of course if
> you are trying to load a shared library inside csh).using a patched csh

I'm writing an NSS library, so when csh does ~username expansion, calling
getpwnam, the system automatically loads my library in order to find the
user in MySQL. csh itself has nothing to do with loading the library.

> Which public library is it that has a conflicting function ?
> (I have used Solaris a lot and never seen this problem before)

I don't know, actually. I haven't been able to find it since everything's
stripped and whatnot. I may just not be using the right tools to find it.
I tried running nm/ldd to find it to no avail.

> What is it that core dumps; csh or your application ?
> Does your application work if you are running 'sh' ?

The error happens inside the MySQL client library (since the library starts
using the wrong 'strend'), filtering back down to 'csh' which then dumps.
tcsh, bash, etc work fine.. it's only csh.

I've managed to get around the problem by linking my library with '-B group'
in order to keep the symbols from leaking around where they shouldn't be. I
found that there were other symbols being stomped on, too .. so it wasn't
just 'strend' anymore .. so my workaround seems the best choice.. and I
guess we can consider the matter resolved...
Thanks!

-=| Ben





------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php