mysql> select version();
+------------+
| version() |
+------------+
| 5.1.45-log |
+------------+
show variables like "have_%";
| have_dynamic_loading | YES | # have_dynamic_loading=yes 表示支持动态加载
| have_innodb | YES |
mysql> install plugin innodb soname 'ha_innodb.so';
Query OK, 0 rows affected (0.58 sec)
mysql> show plugins;
+------------+--------+----------------+--------------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+--------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | ha_innodb.so | GPL|
+------------+--------+----------------+--------------+---------+
mysql> uninstall plugin innodb;Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> install plugin innodb soname 'ha_innodb.so';
ERROR 1125 (HY000): Function 'innodb' already exists
*. 我uninstall后在重新加载,报错。发现是mysql的一个bug,参考http://bugs.mysql.com/bug.php?id=42610
mysql> show plugins;
+------------+---------+----------------+--------------+---------+
| Name | Status | Type | Library | License |
+------------+---------+----------------+--------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | DELETED | STORAGE ENGINE | ha_innodb.so | GPL |
+------------+---------+----------------+--------------+---------+
mysql> show variables like "have_%";
| have_innodb | DISABLED |
mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| InnoDB | NO | Supports transactions, row-level locking, and foreign keys | NULL | NULL | NULL |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
+------------+---------+------------------------------------------------------------+--------------+------+------------+