aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/mysql-connector-cpp/protobuf-source.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/mysql-connector-cpp/protobuf-source.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/mysql-connector-cpp/protobuf-source.patch')
-rw-r--r--vcpkg/ports/mysql-connector-cpp/protobuf-source.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/vcpkg/ports/mysql-connector-cpp/protobuf-source.patch b/vcpkg/ports/mysql-connector-cpp/protobuf-source.patch
new file mode 100644
index 0000000..4412dec
--- /dev/null
+++ b/vcpkg/ports/mysql-connector-cpp/protobuf-source.patch
@@ -0,0 +1,61 @@
+diff --git a/cdk/protocol/mysqlx/protocol.cc b/cdk/protocol/mysqlx/protocol.cc
+index d4589c27..c61deca4 100644
+--- a/cdk/protocol/mysqlx/protocol.cc
++++ b/cdk/protocol/mysqlx/protocol.cc
+@@ -117,18 +117,15 @@ namespace mysqlx {
+ Protobuf log handler initialization.
+ */
+
+-static void log_handler(LogLevel level, const char* filename, int line, const std::string& message);
+
+ #ifdef _WIN32
+ BOOL CALLBACK log_handler_init(PINIT_ONCE, PVOID, PVOID*)
+ {
+- SetLogHandler(&log_handler);
+ return TRUE;
+ }
+ #else
+ static void log_handler_init()
+ {
+- SetLogHandler(log_handler);
+ }
+ #endif
+
+@@ -289,37 +286,6 @@ Message* mk_message(Protocol_side side, msg_type_t msg_type)
+ situation occurs in Protobuf (such as parsing error etc).
+ */
+
+-static void log_handler(
+- LogLevel level, const char* /*filename*/, int /*line*/,
+- const std::string& message
+-)
+-{
+- switch(level)
+- {
+- case LOGLEVEL_FATAL:
+- case LOGLEVEL_ERROR:
+- /*
+- With this code the error description is:
+-
+- MMM: Protobuf error (cdk:NNN)
+-
+- where MMM is the message and NNN is the protbuf error code.
+-
+- TODO: Change description to:
+-
+- Protobuf error: MMM (cdk:NNN)
+- */
+- throw_error(cdkerrc::protobuf_error, message);
+-
+- case LOGLEVEL_WARNING:
+- case LOGLEVEL_INFO:
+- default:
+- {
+- // just ignore for now
+- // TODO: this could be used for logging in the future
+- }
+- }
+-}
+
+ /*
+ Implementation of protobuf's ZeroCopyOutputStream which stores