Bug #48351 Inconsistent library names for semisync plugin
Submitted: 27 Oct 2009 14:22 Modified: 6 Mar 2010 23:55
Reporter: Vladislav Vaintroub Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:next-mr OS:Any
Assigned to: Zhenxing He CPU Architecture:Any

[27 Oct 2009 14:22] Vladislav Vaintroub
Description:
The currently used convention of the plugin library names is such that 
no "lib" prefixes are used for them on Unix - the plugin is not intended to be linked with executable but rather loaded at runtime.

So , the plugin names are typically ha_<storage_engine>.so, ha_<storage_engine>.dll etc. Other (currently unixish) plugins like mypluglib etc do not have lib prefix in them.

It is different for the new semisync plugin. Its name is prefixed with lib on Unix but not on Windows (libsemisync_master.so vs semisync_master.dll). This does not affect functionality, only does not follow so far established conventions.

How to repeat:
compare plugin/semisync/Makefile.am amd plugin/semisync/CMakeLists.txt

Suggested fix:
get rid of lib prefix for semisync plugin on Unix.
[20 Nov 2009 4:00] 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/commits/91028

3124 He Zhenxing	2009-11-20
      Bug#48351 Inconsistent library names for semisync plugin
      
      The semisync plugin library names on Unix like systems were prefixed with
      'lib', which did not follow the conventions.
      
      Fix the problem by removing the 'lib' prefix on Unix systems.
     @ mysql-test/mysql-test-run.pl
        Remove 'lib' prefix for semisync plugin library names
     @ plugin/semisync/Makefile.am
        Remove 'lib' prefix for semisync plugin library names
     @ plugin/semisync/plug.in
        Remove 'lib' prefix for semisync plugin library names
[27 Nov 2009 8:50] 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/commits/91871

3123 He Zhenxing	2009-11-27
      Bug#48351 Inconsistent library names for semisync plugin
      
      The semisync plugin library names on Unix like systems were prefixed with
      'lib', which did not follow the conventions.
      
      Fix the problem by removing the 'lib' prefix on Unix systems.
     @ mysql-test/mysql-test-run.pl
        Remove 'lib' prefix for semisync plugin library names
     @ plugin/semisync/Makefile.am
        Remove 'lib' prefix for semisync plugin library names
     @ plugin/semisync/plug.in
        Remove 'lib' prefix for semisync plugin library names
[27 Nov 2009 16:49] Joerg Bruehe
That patch is incomplete and will break packaging:

The name "libsemisync" is listed in the "spec" files used to build the RPMs, so any name change must be done in these files in sync.

Without this, not only will be the semisync plugin be missing in the RPMs, but rather the creation of RPM packages will fail (because missing a listed file is considered fatal).

Please align with the build team when pushing this change.
Also, see bug#49170 for a related issue.

Note that already the introduction of the semisync plugin was incomplete, because it was not added to the RPM spec file or to Windows distributions;
I had to do both as last-minute patches when I built 5.5.0-beta.

In general, adding files or changing names should not be done without involving the build team.
[29 Nov 2009 2:10] 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/commits/92005

2907 He Zhenxing	2009-11-29 [merge]
      Merge fix of bug#48351 from 5.1-rep-semisync
[1 Dec 2009 3:19] 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/commits/92204

3740 He Zhenxing	2009-12-01 [merge]
      Manual merge Bug#48351 from 5.1-rep-semisync to 6.0-codebase-bugfixing
[1 Dec 2009 4:19] 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/commits/92206

3741 He Zhenxing	2009-12-01 [merge]
      Manual merge bug#48351
[11 Dec 2009 6:01] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091211055901-yp18b3c7xuhl87rf) (version source revid:alik@sun.com-20091211055401-43rjwq7gjed6ds83) (merge vers: 6.0.14-alpha) (pib:13)
[11 Dec 2009 6:03] Bugs System
Pushed into 5.6.0-beta (revid:alik@sun.com-20091211055628-ltr7fero363uev7r) (version source revid:alik@sun.com-20091211055453-717czhtezc74u8db) (merge vers: 5.6.0-beta) (pib:13)
[15 Dec 2009 20:40] 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/commits/94274

2918 Alexander Nozdrin	2009-12-15 [merge]
      Backporing patch for Bug#48351 (Inconsistent library names for semisync plugin)
      from mysql-next-mr-bugfixing to mysql-trunk-bugfixing.
      
      Original revision:
      ------------------------------------------------------------
      revision-id: zhenxing.he@sun.com-20091127084945-wng7gakygduv3q8k
      committer: He Zhenxing <zhenxing.he@sun.com>
      branch nick: 5.1-rep-semisync
      timestamp: Fri 2009-11-27 16:49:45 +0800
      message:
        Bug#48351 Inconsistent library names for semisync plugin
        
        The semisync plugin library names on Unix like systems were prefixed with
        'lib', which did not follow the conventions.
        
        Fix the problem by removing the 'lib' prefix on Unix systems.
      ------------------------------------------------------------
[21 Dec 2009 15:39] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091221153807-80nxoli1tw1z9bxn) (version source revid:alik@sun.com-20091215205224-v4xxef6r433ha367) (merge vers: 6.0.14-alpha) (pib:15)
[21 Dec 2009 15:40] Bugs System
Pushed into 5.5.1-m2 (revid:alik@sun.com-20091221153538-ifi3mxf3y10ozxin) (version source revid:alik@sun.com-20091215204020-88heddplmusfooub) (merge vers: 5.5.0-beta) (pib:15)
[21 Dec 2009 15:41] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20091221153659-d7bt0fh6mhhclxuf) (version source revid:alik@sun.com-20091215204708-2ttqmc4r279i26a2) (pib:15)
[23 Dec 2009 12:22] Joerg Bruehe
I commented on Nov 27 that this patch is incomplete and will break packaging.

However, that did not help:
This incomplete change reached "trunk" and broke the RPM build of 5.5.1-m2, so that I have to repeat it.

Please:
When you change a name (file name, identifier, ...),
don't just rely on your knowledge where it should appear
but also use "grep" through the whole tree.

And when you get a comment like mine of Nov 27,
then don't ignore it but check -
it might be correct!
[11 Jan 2010 17:21] Paul Dubois
Noted in 5.5.1, 6.0.14 changelogs.

The file names for the semisynchronous plugins were prefixed with
lib, unlike file names for other plugins. The file names no longer
have a lib prefix.

This change introduces an incompatibility if the plugins had been
installed using the previous names. To handle this, uninstall the
older version before installing the newer version. For example, use
these statements for the master side plugins on Unix:

mysql> UNINSTALL PLUGIN rpl_semi_sync_master; 
mysql> INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';

If you do not uninstall the older version first, attempting to
install the newer version results in an error:

mysql> INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
ERROR 1125 (HY000): Function 'rpl_semi_sync_master' already exists

For the slave side, similar statements apply:

mysql> UNINSTALL PLUGIN rpl_semi_sync_slave; 
mysql> INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';

Setting report to NDI pending push to Celosia.
[15 Jan 2010 0:25] Bugs System
Pushed into 5.5.2-m2 (revid:build@mysql.com-20100115001040-7nxzvnnng1c1qhep) (version source revid:build@mysql.com-20100115001040-7nxzvnnng1c1qhep) (merge vers: 5.5.2-m2) (pib:16)
[15 Jan 2010 1:58] Paul Dubois
Already fixed in 5.5.x.
[5 Feb 2010 11:48] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100204063540-9czpdmpixi3iw2yb) (version source revid:alik@sun.com-20100119163614-172adculixyu26j5) (pib:16)
[5 Feb 2010 11:52] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100205113942-oqovjy0eoqbarn7i) (version source revid:alfranio.correia@sun.com-20100121210527-rbuheu5rnsmcakh1) (merge vers: 5.5.99-m3) (pib:16)
[5 Feb 2010 17:02] Paul Dubois
Setting report to Need Merge pending push to Celosia.
[6 Mar 2010 10:51] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20091211201717-03qf8ckwiw0np80p) (merge vers: 5.6.0-beta) (pib:16)