Bug #5857 Client libraries namespace pollution
Submitted: 2 Oct 2004 9:47 Modified: 14 Jun 2013 0:10
Reporter: Matthias Urlichs Email Updates:
Status: Verified Impact on me:
Category:MySQL Server Severity:S4 (Feature request)
Version:all OS:Linux (Linux)
Assigned to: Assigned Account CPU Architecture:Any

[2 Oct 2004 9:47] Matthias Urlichs
Sometimes, multiple mysqlclient libraries are dynamically linked into the same program. One common example is the Apache server, which can link to php, perl, python, mysql authentication, a mysql-based NSS module, et al. All of these can be compiled separately and thus may use different client library versions.

This basically causes crashes because the wrong library is used in name resolution.

How to repeat:
See http://bugs.debian.org/270555 for a real-world example.

Suggested fix:
Use versioned symbols in the .

Apply the patch I'll append to this bug.

(The list of exported symbols in libmysqlclient.vers might have to be extended.)
[2 Oct 2004 9:49] Matthias Urlichs
turned off "showstopper" flag. It's not _that_ serious.
[2 Oct 2004 9:49] Matthias Urlichs
turned off "showstopper" flag. It's not _that_ serious.
[2 Oct 2004 9:51] Matthias Urlichs
preliminary patch, not yet tested

Attachment: mysql.versioning.patch (text/x-patch), 3.79 KiB.

[2 Oct 2004 21:24] MySQL Verification Team
Changing status para feature request.
[5 Oct 2004 11:16] Matthias Urlichs
completed patch

Attachment: mysql.versioning.patch (text/x-patch), 7.61 KiB.

[5 Oct 2004 11:19] Matthias Urlichs
Note that this patch also reveals that libmysqlclient exports a number of procedures which are not prefixed with mysql_* or my_*.

IMHO that should be fixed; namespace pollution is an ongoing problem in large projects.

Personally I'd consider this to be somewhat more severe than "feature request".
[11 Oct 2004 20:54] Sergei Golubchik
agree. but let's keep namespace pollution a separate bug entry (just so that we could fix those two problems independently)
[6 Apr 2006 11:03] Sergey Vojtovich
First problem (that is unversioned symbols in shared library) was fixed by patch for BUG#3074.
Second problem (that is namespace pollution) is to be fixed later, since it is not completely clear how to fix it.
[29 Dec 2017 21:15] Daniƫl van Eeden
Isn't this fixed in 5.7 and newer?