Description:
All of the plugins (including I_S) should be able to be disabled via --skip parameter. But INNODB_LOCKS can not be disabled even skip-innodb_locks is specified.
It appears the server is confused with innodb_locks and innodb_locks_unsafe_for_binlog. If innodb_locks_unsafe_for_binlog is removed from the source, then innodb_locks can be disabled by skip-innodb_locks.
How to repeat:
1) MySQL 5.1.31 (likely earlier versions have the same problem)
2) InnoDB Plugin source to replace storage/innobase
3) Build mysqld
4) Start mysqld with --skip-innodb_locks
Here are some outputs on Windwos:
bin> mysqld --console --standalone --skip-innodb --skip-innodb_cmp --skip-innodb_trx --skip-innodb_locks --skip-innodb_lock_waits --skip-innodb_cmp_reset --skip-innodb_cmpmem --skip-innodb_cmpmem_reset
090205 14:32:08 [Note] Plugin 'InnoDB' disabled by command line option
090205 14:32:08 [Note] Plugin 'INNODB_TRX' disabled by command line option
090205 14:32:08 [Note] Plugin 'INNODB_LOCK_WAITS' disabled by command line option
090205 14:32:08 [Note] Plugin 'INNODB_CMP' disabled by command line option
090205 14:32:08 [Note] Plugin 'INNODB_CMP_RESET' disabled by command line option
090205 14:32:08 [Note] Plugin 'INNODB_CMPMEM' disabled by command line option
090205 14:32:08 [Note] Plugin 'INNODB_CMPMEM_RESET' disabled by command line option
090205 14:32:09 [ERROR] Function 'INNODB_LOCKS' already exists
090205 14:32:09 [Warning] Couldn't load plugin named 'INNODB_LOCKS' with soname
'ha_innodb.dll'.
090205 14:32:09 InnoDB: highest supported file format is Barracuda.
In this case, INNODB_LOCKS is not disabled.
You can see all plugins refer to the dynamic plugin, except innodb_locks:
mysql> show plugins;
+---------------------+--------+--------------------+---------------+---------+
| Name | Status | Type | Library | License |
+---------------------+--------+--------------------+---------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | <-- this one still refers to the builtin engine
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | ha_innodb.dll | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
+---------------------+--------+--------------------+---------------+---------+
14 rows in set (0.00 sec)
The following is from a special version of mysqld, which has innodb_locks_unsafe_for_binlog removed from the InnoDB source.
bin>mysqld --console --standalone --skip-innodb --skip-innodb_cmp --skip-innodb_trx --skip-innodb_locks --skip-innodb_lock_waits --skip-innodb_cmp_reset --skip-innodb_cmpmem --skip-innodb_cmpmem_reset
090205 17:24:26 [Note] Plugin 'InnoDB' disabled by command line option
090205 17:24:26 [Note] Plugin 'INNODB_TRX' disabled by command line option
090205 17:24:26 [Note] Plugin 'INNODB_LOCKS' disabled by command line option
090205 17:24:26 [Note] Plugin 'INNODB_LOCK_WAITS' disabled by command line option
090205 17:24:26 [Note] Plugin 'INNODB_CMP' disabled by command line option
090205 17:24:26 [Note] Plugin 'INNODB_CMP_RESET' disabled by command line option
090205 17:24:26 [Note] Plugin 'INNODB_CMPMEM' disabled by command line option
090205 17:24:26 [Note] Plugin 'INNODB_CMPMEM_RESET' disabled by command line option
090205 17:24:26 InnoDB: highest supported file format is Barracuda.
mysql> show plugins;
+---------------------+--------+--------------------+---------------+---------+
| Name | Status | Type | Library | License |
+---------------------+--------+--------------------+---------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | ha_innodb.dll | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL | <-- it refers to the new plugin now
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | ha_innodb.dll | GPL |
+---------------------+--------+--------------------+---------------+---------+
14 rows in set (0.39 sec)