Bug #47350 Support innodb plugin without separate shared object
Submitted: 16 Sep 2009 3:30 Modified: 27 Nov 2010 2:46
Reporter: Mark Callaghan Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S4 (Feature request)
Version:5.1.38 OS:Any
Assigned to: Vasil Dimov CPU Architecture:Any
Tags: innodb, plugin

[16 Sep 2009 3:30] Mark Callaghan
Description:
I want to use the Innodb plugin with MySQL 5.1 but I don't want to use a separate shared object for it. I can get that with a small change to storage/innodb_plugin/plug.in

How to repeat:
Make the changes below, ./configure --with-plugin-innodb_plugin --without-plugin-innobase, make

To use this during tests: ./mysql-test-run.pl --mysqld--plugin-innodb ...

Suggested fix:
Add this to storage/innodb_plugin/plug.in:
MYSQL_PLUGIN_STATIC(innodb_plugin,  [libinnobase.a])

and then run autoconf in the top directory
[16 Sep 2009 3:39] Mark Callaghan
fix synopsis
[17 Sep 2009 5:37] MySQL Verification Team
Verified as described.
[17 Sep 2009 5:43] MySQL Verification Team
Here's the patch I used

--- storage/innodb_plugin/plug.in.orig  2009-08-21 22:12:40.000000000 +1000
+++ storage/innodb_plugin/plug.in       2009-09-17 11:29:46.000000000 +1000
@@ -17,6 +17,7 @@
 MYSQL_STORAGE_ENGINE(innodb_plugin,, [InnoDB Storage Engine],
         [Transactional Tables using InnoDB], [max,max-no-ndb])
 MYSQL_PLUGIN_DIRECTORY(innodb_plugin, [storage/innodb_plugin])
+MYSQL_PLUGIN_STATIC(innodb_plugin,   [libinnobase.a])
 MYSQL_PLUGIN_DYNAMIC(innodb_plugin,  [ha_innodb_plugin.la])
 MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
   AC_CHECK_HEADERS(sched.h)
[23 Nov 2010 9:53] Vasil Dimov
With the patch above:

./configure
ok, both innodb and innodb_plugin are compiled as dynamic plugins

./configure --with-plugins=max
or any other combination that would try to link statically both innodbs fails
[23 Nov 2010 16:37] Vasil Dimov
Maybe we can add a _commented_ line in storage/innodb_plugin/plug.in:

# enable if you know what you are doing
#MYSQL_PLUGIN_STATIC(innodb_plugin,   [libinnobase.a])

because it would be tricky to handle this correctly, the right solution:

* Allows InnoDB Plugin to be compiled statically
* Emits a human-readable error at ./configure time if both InnoDB and
  InnoDB Plugin are going to be compiled statically. E.g. the user has
  specified ./configure --with-plugins=innobase,innodb_plugin
* Handle gracefully --with-plugins=max which without tweaks would try to 
  link both InnoDBs statically, in this case it should compile InnoDB 
  statically and InnoDB Plugin dynamically.

This problem is 5.1 specific and does not exist in 5.5 and above.
[23 Nov 2010 16:40] Vasil Dimov
Mark, what do you think?
[25 Nov 2010 7:01] 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/124969

3661 Vasil Dimov	2010-11-25
      Bug#47350 Support innodb plugin without separate shared object
      
      Add a _commented_ workaround for Bug#47350. The full solution is tricky
      to get right as explained in the bug report. It is not worth the effort
      to extend the deprecated autotools framework to support conflicting
      plugins and would be too risky for MySQL 5.1 (GA).
[26 Nov 2010 14:59] Mark Callaghan
If this is only a problem in 5.1 then I don't mind if it isn't fixed. Eventually I need to learn about cmake
[26 Nov 2010 20:48] Vladislav Vaintroub
In 5.5, innodb is builtin by default.

It is possible to make it shared, if one really wants it, using 
cmake . -DWITH_INNOBASE_STORAGE_ENIGNE=0
[27 Nov 2010 2:46] Calvin Sun
Based on previous comments.
[22 Dec 2010 21:31] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (version source revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (merge vers: 5.6.1) (pib:24)
[8 Jan 2011 15:10] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:vasil.dimov@oracle.com-20110108150508-gpanhz48z8069qot) (version source revid:vasil.dimov@oracle.com-20110108150048-b1y9m8xe72hay0ch) (merge vers: 5.5.9) (pib:24)
[8 Jan 2011 15:12] Bugs System
Pushed into mysql-5.1 5.1.55 (revid:vasil.dimov@oracle.com-20110108145923-0tjqdpa5w3d6tuwn) (version source revid:vasil.dimov@oracle.com-20110108145923-0tjqdpa5w3d6tuwn) (merge vers: 5.1.55) (pib:24)