From ca2ef342021280e8bb5b041f55f7317718314428 Mon Sep 17 00:00:00 2001 From: ruben Date: Fri, 13 Mar 2020 21:37:51 +0000 Subject: [PATCH] Added missing flag in handshake for MariaDB --- include/mysql/impl/capabilities.hpp | 7 ++++--- test/unit/serialization.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/mysql/impl/capabilities.hpp b/include/mysql/impl/capabilities.hpp index 05729d4f..2a57f375 100644 --- a/include/mysql/impl/capabilities.hpp +++ b/include/mysql/impl/capabilities.hpp @@ -24,7 +24,7 @@ constexpr std::uint32_t CLIENT_SSL = 2048; // Use SSL encryption for the session constexpr std::uint32_t CLIENT_IGNORE_SIGPIPE = 4096; // Client only flag constexpr std::uint32_t CLIENT_TRANSACTIONS = 8192; // Client knows about transactions constexpr std::uint32_t CLIENT_RESERVED = 16384; // DEPRECATED: Old flag for 4.1 protocol -constexpr std::uint32_t CLIENT_RESERVED2 = 32768; // DEPRECATED: Old flag for 4.1 authentication \ CLIENT_SECURE_CONNECTION +constexpr std::uint32_t CLIENT_SECURE_CONNECTION = 32768; // DEPRECATED: Old flag for 4.1 authentication, required by MariaDB constexpr std::uint32_t CLIENT_MULTI_STATEMENTS = (1UL << 16); // Enable/disable multi-stmt support constexpr std::uint32_t CLIENT_MULTI_RESULTS = (1UL << 17); // Enable/disable multi-results constexpr std::uint32_t CLIENT_PS_MULTI_RESULTS = (1UL << 18); // Multi-results and OUT parameters in PS-protocol @@ -95,7 +95,8 @@ constexpr capabilities mandatory_capabilities { CLIENT_PROTOCOL_41 | CLIENT_PLUGIN_AUTH | CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | - CLIENT_DEPRECATE_EOF + CLIENT_DEPRECATE_EOF | + CLIENT_SECURE_CONNECTION }; constexpr capabilities optional_capabilities {0}; @@ -105,4 +106,4 @@ constexpr capabilities optional_capabilities {0}; -#endif \ No newline at end of file +#endif diff --git a/test/unit/serialization.cpp b/test/unit/serialization.cpp index b37a902c..b924df41 100644 --- a/test/unit/serialization.cpp +++ b/test/unit/serialization.cpp @@ -307,7 +307,7 @@ constexpr std::uint32_t hanshake_caps = CLIENT_IGNORE_SIGPIPE | CLIENT_TRANSACTIONS | CLIENT_RESERVED | // old flag, but set in this frame - CLIENT_RESERVED2 | // old flag, but set in this frame + CLIENT_SECURE_CONNECTION | // old flag, but set in this frame CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS | CLIENT_PS_MULTI_RESULTS | @@ -358,7 +358,7 @@ constexpr std::uint32_t handshake_response_caps = CLIENT_PROTOCOL_41 | CLIENT_INTERACTIVE | CLIENT_TRANSACTIONS | - CLIENT_RESERVED2 | + CLIENT_SECURE_CONNECTION | CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS | CLIENT_PS_MULTI_RESULTS |