Bug #11893 libmysqlclient14 incompatible between 4.1 and 5.0
Submitted: 12 Jul 2005 20:11 Modified: 18 Jul 2005 19:17
Reporter: Christian Hammers (Silver Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:Any (any)
Assigned to: Georg Richter CPU Architecture:Any

[12 Jul 2005 20:11] Christian Hammers
Description:
The shared library libmysqlclient.so.14.0.0 did not change its version number in MySQL 5.0 although it became binary incompatible.

That means program that was built against libmysqlclient.so.14 from MySQL 4.1
does *not* work with libmysqlclient.so.14 from MySQL 5.0 as you can
see in the below example.

bye,

-christian- (Debian maintainer of MySQL)

How to repeat:

 # dpkg --list libmysqlclient14
 ii  libmysqlclient14      5.0.7beta-1         mysql database client library
 ii  mysql-client-4.1      4.1.12-2              mysql database client binaries

 # nm --dynamic --print-size /usr/lib/libmysqlclient.so.14.0.0 | grep 'my_charset_latin1$' 
 00049c60 00000068 D my_charset_latin1
  
 # mysql
 mysql: Symbol `my_charset_latin1' has different size in shared object, consider 
 re-linking  
 Segmentation fault

  
 # dpkg --install libmysqlclient14_4.1.12-1_i386.deb 
 dpkg - warning: downgrading libmysqlclient14 from 5.0.7beta-1 to 4.1.12-1.
 ...

 # nm --dynamic --print-size /usr/lib/libmysqlclient.so.14.0.0 | grep 'my_charset_latin1$' 
 00041b00 00000060 D my_charset_latin1
  
 # mysql
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 23 to server version: 4.1.12-Debian_2-log
 ...  

Suggested fix:

If I understand the situation correctly your choices are to

a) revert any changes to the library

b) increase the library interface version from 14 to 15 or 16
   (in case you prefer even numbers for stable releases)

c) *maybe* if only the code changed but not the API did change,
   it would be necessary to name the MySQL-5.0 shared library to
   libmysqlclient.so.14.1.0 to tell the linked that it's fine if
   the size changed but the content is otherwise compatible.
   But I'm no expert on that areay.
[13 Jul 2005 18:38] Jorge del Conde
Thanks for your bug report.
[15 Jul 2005 22:34] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27202
[18 Jul 2005 12:02] Georg Richter
Christian,

thank you for the bug report. Version number increased to 15.
fixed in 5.0.10-beta. cs: 1.322
[18 Jul 2005 19:17] Paul Dubois
Noted in 5.0.10 changelog.