Bug #96281 | Can't initialize function 'clone'; Plugin initialization function failed | ||
---|---|---|---|
Submitted: | 23 Jul 2019 6:42 | Modified: | 13 Sep 2019 11:51 |
Reporter: | Simon Mudd (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Clone Plugin | Severity: | S3 (Non-critical) |
Version: | 8.0.17 | OS: | CentOS (7) |
Assigned to: | CPU Architecture: | x86 | |
Tags: | Clone, install plugin failed |
[23 Jul 2019 6:42]
Simon Mudd
[23 Jul 2019 7:44]
Simon Mudd
Also to be clear on exact version used: [root@myhost ~]# rpm -q centos-release centos-release-7-6.1810.2.el7.centos.x86_64 [root@myhost ~]# rpm -qi mysql-community-server Name : mysql-community-server Version : 8.0.17 Release : 1.el7 Architecture: x86_64 Install Date: Tue 23 Jul 2019 08:28:36 AM CEST ... Size : 1942521369 Source RPM : mysql-community-8.0.17-1.el7.src.rpm Build Date : Wed 26 Jun 2019 09:45:53 PM CEST Build Host : siv28.no.oracle.com Packager : MySQL Release Engineering <mysql-build@oss.oracle.com>
[23 Jul 2019 7:47]
MySQL Verification Team
Hello Simon, Thank you for the report and feedback. regards, Umesh
[23 Jul 2019 7:52]
MySQL Verification Team
Test results - 8.0.17
Attachment: 96281.results (application/octet-stream, text), 4.22 KiB.
[23 Jul 2019 9:59]
Simon Mudd
Umesh: thanks for confirming that you can repeat this. Secondly there is some confusion on whether this should work on a slave with --read-only configured. Documentation at https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-installation.html makes no reference to this so I think some clarification is needed as to whether it should work or not and any read-only settings that are expected. Personally I think that it should be possible to load the plugin on the server to be used as the clone source where --read-only or maybe even --super-read-only is set. Let's clarify current requirements and then we can figure out if they seem too strict for the sort of use case I would want to use them on. I was also asked about using this on a master: if the master does not run 8.0.17 that involves some sort of downtime as the master is upgraded and cloning from a master adds more load to a master and is clearly not something I would want to do for a semi-sync or asynchronous replication setup (if it can be avoided).
[23 Jul 2019 17:38]
Simon Mudd
Se seems the cause is this: usert@myhost [(none)]> show global variables like 'sql_require%'; +-------------------------+-------+ | Variable_name | Value | +-------------------------+-------+ | sql_require_primary_key | ON | +-------------------------+-------+ 1 row in set (0.00 sec) Changing this to 0 allows the plugin to be loaded. I've not checked the PS tables that get created but suspect that they have no primary key. Probably for these types of tables this check should not be enforced as these tables are not replicated anyway.
[23 Jul 2019 17:44]
Simon Mudd
Just to say thanks to those at Oracle who poked and found the cause. A suggestion that comes from this if possible would be to some how make the lower level error get bubbled up and reported during the P_S initialisation so that if there's a failure the actual cause is visible. The generic PFS error is not really helpful.
[25 Jul 2019 5:44]
MySQL Verification Team
Updated category
[30 Aug 2019 2:08]
Bingxi Wu
the variables explicit_defaults_for_timestamp = off also effect install fail.
[12 Sep 2019 15:48]
Paul DuBois
Posted by developer: Fixed in 8.0.18. With sql_require_primary_key enabled, clone plugin initialization failed because it created two dynamic Performance Schema tables, which do not support indexes or primary keys. The effect of sql_require_primary_key is not limited to storage engines that can participate in replication (currently all storage engines except the Performance Schema)
[13 Sep 2019 11:51]
Simon Mudd
Typo? "The effect of sql_require_primary_key is now limited to storage engines that can participate in replication" perhaps?
[13 Sep 2019 22:42]
Paul DuBois
Yes, "now limited" not "not limited". Thanks for spotting that.
[28 Sep 2019 7:09]
MySQL Verification Team
Bug #96657 marked as duplicate of this one
[29 Jan 2021 7:40]
yonghua Lin
以下的三个参数已经设置为 off了,为什么clone plugin还是安装失败,报错信息 2021-01-29T15:18:35.356002+08:00 9 [ERROR] [MY-013272] [Clone] Plugin Clone reported: 'Client: PFS table creation failed.' 2021-01-29T15:18:35.356056+08:00 9 [ERROR] [MY-010202] [Server] Plugin 'clone' init function returned error. 2021-01-29T15:18:35.356083+08:00 9 [Note] [MY-010733] [Server] Shutting down plugin 'clone'
[29 Jan 2021 7:40]
yonghua Lin
The following three parameters have already been set to OFF. Why does the Clone Plugin still fail to install 2021-01-29T15:18:33.356002 + 08:009 [ERROR] [MM-013272] [Clone] Plugin cloning: 'Client: PFS table creation failed.' 2021-01-29T15:18:35.356056+08:00 9 [ERROR] [MY-010202] [Server] Plugin 'clone' init function returned ERROR. [Note] [MY-010733] [Server] disable 'clone' plugin
[29 Jan 2021 7:41]
yonghua Lin
The following three parameters have already been set to OFF. Why does the Clone Plugin still fail to install sql_require_primary_key read_only explicit_defaults_for_timestamp 2021-01-29T15:18:33.356002 + 08:009 [ERROR] [MM-013272] [Clone] Plugin cloning: 'Client: PFS table creation failed.' 2021-01-29T15:18:35.356056+08:00 9 [ERROR] [MY-010202] [Server] Plugin 'clone' init function returned ERROR. [Note] [MY-010733] [Server] disable 'clone' plugin