代码改变世界

MySQL Bug:No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request

  潇湘隐者  阅读(403)  评论(0编辑  收藏  举报

监控发现公司一台MySQL 8.0.26 的错误日志中出现大量下面告警信息:

 

[Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.

 

  搜索资料发现,其实这个是一个Bug来着(详情见参考资料的链接),如果MySQL实例没有任何MySQL keyring组件的话,就可能遇到这个Bug

 

[13 May 12:43] Marcelo Altmann

Description:

I

If your server is started without any keyring component, querying performance_schema.keyring_component_status logs an warning to the error log:

 

 

 

 

2021-05-13T12:06:03.625555Z 112 [Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.

 

 

 

How to repeat:

 

 

Start MySQL without any keyring component and log verbosity = 3.

 

Run: SELECT * FROM  performance_schema.keyring_component_status;

 

[13 May 12:50] MySQL Verification Team

Hello Marcelo,

 

 

 

 

Thank you for the report and feedback.

 

 

 

 

regards,

 

Umesh

 

[26 Aug 16:27] Marcelo Altmann

Patch generated based on tag mysql-8.0.26

 

 

 

 

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

 

Contribution: bug_103684.patch (application/octet-stream, text), 824 bytes.

[27 Aug 14:00] MySQL Verification Team

Thank you for your contribution.

 

 

 

 

regards,

 

Umesh

 

 

检查验证,确实没有任何mysql  keyring组件

 

mysql> SELECT * FROM performance_schema.keyring_component_status;
Empty set (0.00 sec)
mysql>

 

bug_103684.patch资料如下

 

diff --git a/sql/server_component/mysql_server_keyring_lockable_imp.cc b/sql/server_component/mysql_server_keyring_lockable_imp.cc
index 9c94d2ee8c5..7b6eb414e7d 100644
--- a/sql/server_component/mysql_server_keyring_lockable_imp.cc
+++ b/sql/server_component/mysql_server_keyring_lockable_imp.cc
@@ -391,7 +391,8 @@ DEFINE_BOOL_METHOD(Keyring_metadata_query_service_impl::is_initialized, ()) {
 DEFINE_BOOL_METHOD(Keyring_metadata_query_service_impl::init,
                    (my_h_keyring_component_metadata_iterator *
                     metadata_iterator)) {
-  if (check_service(internal_keyring_component_metadata_query,
+  if (internal_keyring_component_metadata_query == nullptr ||
+      check_service(internal_keyring_component_metadata_query,
                     COMPONENT_METADATA_QUERY))
     return true;
 

 

 

 

参考资料:

https://bugs.mysql.com/bug.php?id=103684

https://dev.mysql.com/doc/dev/mysql-server/latest/group__group__keyring__component__services__inventory.html

编辑推荐:
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
历史上的今天:
2017-09-13 RHEL下SendMail修改发邮箱地址
2014-09-13 ORACLE 10g 数据库体系结构图
2014-09-13 ORACLE 9i 数据库体系结构图
2013-09-13 Linux 平台安装Oracle Database 12c
2010-09-13 查看数据库、表、索引的物理存储情况
点击右上角即可分享
微信分享提示