From e5427cdc5ea7b783b82a8d4eea49368cb2685270 Mon Sep 17 00:00:00 2001
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
Date: Tue, 13 Jun 2023 00:04:32 +0100
Subject: [PATCH 20/21] Skip code not compatible with libprotobuf >=4.22.0

---
 plugin/x/tests/driver/connector/connection_manager.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/plugin/x/tests/driver/connector/connection_manager.cc b/plugin/x/tests/driver/connector/connection_manager.cc
index bf411893641..babaf844a98 100644
--- a/plugin/x/tests/driver/connector/connection_manager.cc
+++ b/plugin/x/tests/driver/connector/connection_manager.cc
@@ -33,7 +33,9 @@
 
 #include "plugin/x/tests/driver/processor/variable_names.h"
 
+#if GOOGLE_PROTOBUF_VERSION < 4022000
 google::protobuf::LogHandler *g_lh = nullptr;
+#endif
 
 Connection_manager::Connection_manager(const Connection_options &co,
                                        Variable_container *variables,
@@ -43,6 +45,7 @@ Connection_manager::Connection_manager(const Connection_options &co,
       m_variables(variables),
       m_console_with_flow_history(console_with_flow_history),
       m_console(console) {
+#if GOOGLE_PROTOBUF_VERSION < 4022000
   g_lh = google::protobuf::SetLogHandler([](google::protobuf::LogLevel level,
                                             const char *filename, int line,
                                             const std::string &message) {
@@ -51,6 +54,7 @@ Connection_manager::Connection_manager(const Connection_options &co,
              "Protobuf error (level:" << level << ", filename:" << filename
                                       << ":" << line << ", text:" << message);
   });
+#endif
   m_variables->make_special_variable(
       k_variable_option_user,
       new Variable_dynamic_string(m_default_connection_options.user));
-- 
2.41.0

