Bug #37540 'Install plugin' for innodb fails due to .so existing in wrong place by default
Submitted: 20 Jun 2008 7:34 Modified: 24 Jun 2008 22:53
Reporter: Nidhi Shrotriya Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S3 (Non-critical)
Version:5.1.24-rc OS:Linux (i686 athlon i386 GNU/Linux)
Assigned to: Assigned Account CPU Architecture:Any

[20 Jun 2008 7:34] Nidhi Shrotriya
Description:
Got the mysql source 'mysql-5.1.24-rc.tar.gz' and compiled on Linux.
Started the server and connected through the client. 

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show engines
    -> ;
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
| Engine     | Support | Comment                                                   | Transactions | XA | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
| CSV        | YES     | CSV storage engine                                        | NO           | NO | NO         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                     | NO           | NO | NO         |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables | NO           | NO | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance    | NO           | NO | NO         |
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
4 rows in set (0.00 sec)

mysql> install plugin ha_innodb soname 'ha_innodb.so';
ERROR 1126 (HY000): Can't open shared library '/home/ns195518/mysql-5.1.24-rc-install/lib/mysql/plugin/ha_innodb.so' (errno: 22 cannot open shared object file: No such file or directory)

As the above error shows, it couldn't find the .so as it exists
/home/ns195518/mysql-5.1.24-rc-install/lib/mysql/
instead of
'/home/ns195518/mysql-5.1.24-rc-install/lib/mysql/plugin/

One can bet we can set the system variable 'plugin_dir' to set the plugin location or put a link in the right place to this .so, but I believe it makes sense to put the innodb plugin too at the right place while building as for other storage engines under
lib/mysql/plugin/

How to repeat:
As mentioned in the description.
[20 Jun 2008 10:42] Valeriy Kravchuk
Thank you for a problem report. Please, send the exact configure command line used. Had you tried to do the same with recent 5.1.25?
[20 Jun 2008 11:34] Nidhi Shrotriya
I have used 
./BUILD/compile-pentium-debug --prefix=/home/ns195518/mysql-5.1.24-rc-install
make
make install

I have even tried on mysql-6.0-sea and the problem exists, so most probably I believe it to exist in 5.1.25 too.
[24 Jun 2008 22:11] MySQL Verification Team
Thank you for the bug report.

[miguel@hegel test]$ 51/bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.25-rc-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show engines;
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
| Engine     | Support | Comment                                                   | Transactions | XA | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
| CSV        | YES     | CSV storage engine                                        | NO           | NO | NO         | 
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance    | NO           | NO | NO         | 
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables | NO           | NO | NO         | 
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                     | NO           | NO | NO         | 
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
4 rows in set (0.00 sec)

mysql> install plugin ha_innodb soname 'ha_innodb.so';
ERROR 1126 (HY000): Can't open shared library '/home/miguel/test/51/lib/mysql/plugin/ha_innodb.so' (errno: 2 cannot open shared object file: No such file or directory)
mysql> exit
Bye
[miguel@hegel test]$ ls 51/lib/mysql/ha_innodb.so
51/lib/mysql/ha_innodb.so
[miguel@hegel test]$
[24 Jun 2008 22:45] MySQL Verification Team
Work-areound:

[miguel@hegel 51]$ libexec/mysqld --plugin_dir=/home/miguel/test/51/lib/mysql/

[miguel@hegel test]$ 51/bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.25-rc-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> install plugin innodb soname 'ha_innodb.so';  
Query OK, 0 rows affected (1.23 sec)
[24 Jun 2008 22:53] MySQL Verification Team
Duplicate of bug: http://bugs.mysql.com/bug.php?id=36434.