1 Star 0 Fork 8

kianli/mysql

forked from OpenCloudOS Stream/mysql 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
support-protobuf-24.2.patch 2.38 KB
一键复制 编辑 原始数据 按行查看 历史
ZoeDong 提交于 2023-09-20 13:20 . Rebuild for protobuf-24.2
diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake
index 93c917d..a9dfb9e 100644
--- a/cmake/protobuf.cmake
+++ b/cmake/protobuf.cmake
@@ -121,10 +121,14 @@ MACRO(MYSQL_CHECK_PROTOBUF)
IF(WITH_PROTOBUF STREQUAL "bundled")
MYSQL_USE_BUNDLED_PROTOBUF()
ELSE()
- FIND_PACKAGE(Protobuf)
+ FIND_PACKAGE(protobuf REQUIRED CONFIG)
ENDIF()
- IF(NOT PROTOBUF_FOUND)
+ SET(PROTOBUF_LIBRARY "protobuf::libprotobuf")
+ SET(PROTOBUF_PROTOC_EXECUTABLE "protobuf::protoc")
+ SET(PROTOBUF_PROTOC_LIBRARY "protobuf::libprotoc")
+
+ IF(NOT protobuf_FOUND)
MESSAGE(WARNING "Protobuf libraries/headers could not be found")
ENDIF()
@@ -136,7 +140,7 @@ MACRO(MYSQL_CHECK_PROTOBUF)
MESSAGE(WARNING "The protoc library could not be found")
ENDIF()
- IF(NOT PROTOBUF_FOUND OR
+ IF(NOT protobuf_FOUND OR
NOT PROTOBUF_PROTOC_EXECUTABLE OR
NOT PROTOBUF_PROTOC_LIBRARY)
MESSAGE(FATAL_ERROR "Use bundled protobuf, or install missing packages")
diff --git a/plugin/x/tests/driver/connector/connection_manager.cc b/plugin/x/tests/driver/connector/connection_manager.cc
index 1cdacaa..d29d338 100644
--- a/plugin/x/tests/driver/connector/connection_manager.cc
+++ b/plugin/x/tests/driver/connector/connection_manager.cc
@@ -33,8 +33,6 @@
#include "plugin/x/tests/driver/processor/variable_names.h"
-google::protobuf::LogHandler *g_lh = nullptr;
-
Connection_manager::Connection_manager(const Connection_options &co,
Variable_container *variables,
const Console &console_with_flow_history,
@@ -43,14 +41,6 @@ Connection_manager::Connection_manager(const Connection_options &co,
m_variables(variables),
m_console_with_flow_history(console_with_flow_history),
m_console(console) {
- g_lh = google::protobuf::SetLogHandler([](google::protobuf::LogLevel level,
- const char *filename, int line,
- const std::string &message) {
- if (g_lh) g_lh(level, filename, line, message);
- DBUG_LOG("debug",
- "Protobuf error (level:" << level << ", filename:" << filename
- << ":" << line << ", text:" << message);
- });
m_variables->make_special_variable(
k_variable_option_user,
new Variable_dynamic_string(m_default_connection_options.user));
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kianli/mysql.git
git@gitee.com:kianli/mysql.git
kianli
mysql
mysql
master

搜索帮助

Cb406eda 1850385 E526c682 1850385