Bug #42716 Certain plugins can not be disabled via --skip
Submitted: 9 Feb 2009 21:23 Modified: 9 Feb 2009 22:31
Reporter: Calvin Sun Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Storage Engine API Severity:S2 (Serious)
Version:5.1.31 OS:Any
Assigned to: CPU Architecture:Any

[9 Feb 2009 21:23] Calvin Sun
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)
[9 Feb 2009 22:31] MySQL Verification Team
Thank you for the bug report.

c:\dbs>c:\dbs\5.1p\bin\mysql -uroot --port=3511 --prompt="mysql 5.1 >"
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.32-Win64-log Source distribution

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

mysql 5.1 >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     |
| ARCHIVE             | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| BLACKHOLE           | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| CSV                 | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| EXAMPLE             | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| InnoDB              | DISABLED | STORAGE ENGINE     | NULL    | GPL     |
| INNODB_TRX          | DISABLED | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCKS        | ACTIVE   | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCK_WAITS   | DISABLED | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP          | DISABLED | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP_RESET    | DISABLED | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM       | DISABLED | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM_RESET | DISABLED | INFORMATION SCHEMA | NULL    | GPL     |
| partition           | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| FEDERATED           | DISABLED | STORAGE ENGINE     | NULL    | GPL     |
+---------------------+----------+--------------------+---------+---------+
18 rows in set (0.01 sec)