Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wolfi323:branches:home:wolfi323:branches:home:dliw
mysql-connector-cpp
mysql-connector-cpp-mariadb.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mysql-connector-cpp-mariadb.patch of Package mysql-connector-cpp
Index: b/jdbc/cppconn/version_info.h.cmake =================================================================== --- a/jdbc/cppconn/version_info.h.cmake +++ b/jdbc/cppconn/version_info.h.cmake @@ -48,5 +48,6 @@ #define MYCPPCONN_STATIC_MYSQL_VERSION "@MYSQL_VERSION@" #define MYCPPCONN_STATIC_MYSQL_VERSION_ID @MYSQL_NUM_VERSION@ +#define MYCPPCONN_MARIADB_BUILD #define MYCPPCONN_BOOST_VERSION @Boost_VERSION@ Index: b/jdbc/driver/mysql_connection.cpp =================================================================== --- a/jdbc/driver/mysql_connection.cpp +++ b/jdbc/driver/mysql_connection.cpp @@ -268,7 +268,7 @@ {OPT_CAN_HANDLE_EXPIRED_PASSWORDS, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, true}, {OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_RESET, true}, {OPT_RECONNECT, MYSQL_OPT_RECONNECT, true}, -#if MYCPPCONN_STATIC_MYSQL_VERSION_ID < 80000 +#if MYCPPCONN_STATIC_MYSQL_VERSION_ID < 80000 || defined(MYCPPCONN_MARIADB_BUILD) {"sslVerify", MYSQL_OPT_SSL_VERIFY_SERVER_CERT, false}, // Deprecated {"sslEnforce", MYSQL_OPT_SSL_ENFORCE, false} // Deprecated #else @@ -290,9 +290,9 @@ {OPT_MAX_ALLOWED_PACKET, MYSQL_OPT_MAX_ALLOWED_PACKET, false}, {OPT_NET_BUFFER_LENGTH, MYSQL_OPT_NET_BUFFER_LENGTH, false}, #endif - {OPT_SSL_MODE, MYSQL_OPT_SSL_MODE , false}, - {"OPT_SSL_MODE", MYSQL_OPT_SSL_MODE , false}, -#if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 + //{OPT_SSL_MODE, MYSQL_OPT_SSL_MODE , false}, + //{"OPT_SSL_MODE", MYSQL_OPT_SSL_MODE , false}, +#if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 && !defined(MYCPPCONN_MARIADB_BUILD) {OPT_RETRY_COUNT, MYSQL_OPT_RETRY_COUNT, false}, #endif }; @@ -321,7 +321,7 @@ {OPT_TLS_VERSION, MYSQL_OPT_TLS_VERSION, true}, {"OPT_TLS_VERSION", MYSQL_OPT_TLS_VERSION, true}, #endif - {OPT_LOAD_DATA_LOCAL_DIR, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, false} + //{OPT_LOAD_DATA_LOCAL_DIR, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, false} }; @@ -330,7 +330,7 @@ inline ::sql::mysql::MySQL_Connection_Options option_conversion(unsigned long client_version, int option) { - #if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 + #if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 && !defined(MYCPPCONN_MARIADB_BUILD) if(client_version <80011) { switch (option) { @@ -421,6 +421,7 @@ }; +#if !defined(MYCPPCONN_MARIADB_BUILD) /* A callback setter object arranges for WebAuthn/Fido authentication callbacks to be used by the WebAuthn clientlib authentication plugin. @@ -544,6 +545,7 @@ std::mutex MySQL_Driver::WebAuthn_Callback_Setter::mutex; sql::mysql::MySQL_Driver *MySQL_Driver::WebAuthn_Callback_Setter::driver = nullptr; +#endif // !defined(MYCPPCONN_MARIADB_BUILD) /* @@ -637,7 +639,7 @@ int client_exp_pwd = false; bool opt_dns_srv = false; bool opt_multi_host = false; -#if MYCPPCONN_STATIC_MYSQL_VERSION_ID < 80000 +#if MYCPPCONN_STATIC_MYSQL_VERSION_ID < 80000 || defined(MYCPPCONN_MARIADB_BUILD) bool secure_auth= true; #endif @@ -648,7 +648,7 @@ } else { throw sql::InvalidArgumentException("No string value passed for password"); } - } else if (!it->first.compare(OPT_PASSWORD1)) { + /*} else if (!it->first.compare(OPT_PASSWORD1)) { try { p_s = (it->second).get< sql::SQLString >(); } catch (sql::InvalidArgumentException&) { @@ -684,7 +684,7 @@ } else { throw sql::InvalidArgumentException("No string value passed for password3"); } - } else if (!it->first.compare(OPT_PORT)) { + */} else if (!it->first.compare(OPT_PORT)) { try { p_i = (it->second).get< int >(); } catch (sql::InvalidArgumentException&) { @@ -948,7 +948,7 @@ } catch (sql::InvalidArgumentException&) { throw sql::InvalidArgumentException("Wrong type passed for useLegacyAuth expected sql::SQLString"); } - #if MYCPPCONN_STATIC_MYSQL_VERSION_ID < 80000 + #if MYCPPCONN_STATIC_MYSQL_VERSION_ID < 80000 || defined(MYCPPCONN_MARIADB_BUILD) if (p_b) { secure_auth= !*p_b; } else { @@ -997,7 +997,7 @@ } else if (!it->first.compare(OPT_CONNECT_ATTR_RESET)) { proxy->options(MYSQL_OPT_CONNECT_ATTR_RESET, 0); - #if MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80000 + #if MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80000 && !defined(MYCPPCONN_MARIADB_BUILD) //Deprecated } else if (!it->first.compare("sslVerify")) { @@ -1012,7 +1012,6 @@ : SSL_MODE_PREFERRED; proxy->options(MYSQL_OPT_SSL_MODE, &ssl_mode_val); - #endif } else if (!it->first.compare(OPT_OCI_CONFIG_FILE)) { try { p_s= (it->second).get<sql::SQLString>(); @@ -1074,6 +1073,7 @@ OPT_AUTHENTICATION_KERBEROS_CLIENT_MODE); } #endif // defined(_WIN32) + #endif // MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80000 && !defined(MYCPPCONN_MARIADB_BUILD) } else if (!it->first.compare(OPT_PLUGIN_DIR)) { // Nothing to do here: this option was handeld before the loop @@ -1100,6 +1100,7 @@ } /* End of cycle on connection options map */ + #if !defined(MYCPPCONN_MARIADB_BUILD) if (oci_plugin_is_loaded) { if (properties.find(OPT_OCI_CONFIG_FILE) == properties.end()) { // If OCI plugin is loaded, but oci-config-file is not explicitly set @@ -1128,6 +1129,7 @@ } } + #endif #undef PROCESS_CONNSTR_OPTION @@ -1147,7 +1149,7 @@ } -#if MYCPPCONN_STATIC_MYSQL_VERSION_ID < 80000 +#if MYCPPCONN_STATIC_MYSQL_VERSION_ID < 80000 || defined(MYCPPCONN_MARIADB_BUILD) try { proxy->options(MYSQL_SECURE_AUTH, &secure_auth); } catch (sql::InvalidArgumentException& e) { @@ -1542,6 +1544,7 @@ } + #if !defined(MYCPPCONN_MARIADB_BUILD) /* Note: If needed the setter will update callback functions registered with webauthn/fido authentication plugins to call the callback stored @@ -1551,6 +1554,7 @@ MySQL_Driver::WebAuthn_Callback_Setter setter{*static_cast<MySQL_Driver*>(driver), proxy.get()}; + #endif // !defined(MYCPPCONN_MARIADB_BUILD) //Connect loop { @@ -1914,7 +1918,7 @@ #endif } else if (!optionName.compare(OPT_LOAD_DATA_LOCAL_DIR)) { - proxy->options(MYSQL_OPT_LOAD_DATA_LOCAL_DIR, optionValue); + //proxy->options(MYSQL_OPT_LOAD_DATA_LOCAL_DIR, optionValue); } return this; } Index: b/jdbc/driver/mysql_connection_options.h =================================================================== --- a/jdbc/driver/mysql_connection_options.h +++ b/jdbc/driver/mysql_connection_options.h @@ -41,7 +41,7 @@ namespace mysql enum MySQL_Connection_Options { -#if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 +#if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 && !defined(MYCPPCONN_MARIADB_BUILD) MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, @@ -92,8 +92,8 @@ enum MySQL_Connection_Options MYSQL_OPT_SSL_ENFORCE, #if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 50700 MYSQL_OPT_MAX_ALLOWED_PACKET, MYSQL_OPT_NET_BUFFER_LENGTH, - MYSQL_OPT_TLS_VERSION, - MYSQL_OPT_SSL_MODE + MYSQL_OPT_TLS_VERSION +// MYSQL_OPT_SSL_MODE #endif //MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 50700 #endif //MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 Index: b/jdbc/driver/mysql_resultset_metadata.h =================================================================== --- a/jdbc/driver/mysql_resultset_metadata.h +++ b/jdbc/driver/mysql_resultset_metadata.h @@ -38,7 +38,7 @@ #include <cppconn/resultset_metadata.h> #include <cppconn/version_info.h> -#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004) +#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004 && !defined(MYCPPCONN_MARIADB_BUILD)) struct MYSQL_FIELD; #else struct st_mysql_field; Index: b/jdbc/driver/nativeapi/libmysql_static_proxy.cpp =================================================================== --- a/jdbc/driver/nativeapi/libmysql_static_proxy.cpp +++ b/jdbc/driver/nativeapi/libmysql_static_proxy.cpp @@ -326,7 +326,7 @@ int LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg) { #if MYSQL_VERSION_ID >= 50703 - if (::mysql_get_option(mysql, option, arg)) { + if (::mysql_get_option(mysql, option, const_cast<void*>(arg))) { throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()"); } else { return 0; Index: b/jdbc/driver/nativeapi/mysql_native_connection_wrapper.cpp =================================================================== --- a/jdbc/driver/nativeapi/mysql_native_connection_wrapper.cpp +++ b/jdbc/driver/nativeapi/mysql_native_connection_wrapper.cpp @@ -97,11 +97,11 @@ get_mysql_option(sql::mysql::MySQL_Conne case sql::mysql::MYSQL_OPT_MAX_ALLOWED_PACKET: return ::MYSQL_OPT_MAX_ALLOWED_PACKET; case sql::mysql::MYSQL_OPT_NET_BUFFER_LENGTH: return ::MYSQL_OPT_NET_BUFFER_LENGTH; case sql::mysql::MYSQL_OPT_TLS_VERSION: return ::MYSQL_OPT_TLS_VERSION; - case sql::mysql::MYSQL_OPT_SSL_MODE: return ::MYSQL_OPT_SSL_MODE; + //case sql::mysql::MYSQL_OPT_SSL_MODE: return ::MYSQL_OPT_SSL_MODE; #endif -#if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 +#if MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80000 && !defined(MYCPPCONN_MARIADB_BUILD) case sql::mysql::MYSQL_OPT_RETRY_COUNT: return ::MYSQL_OPT_RETRY_COUNT; case sql::mysql::MYSQL_OPT_GET_SERVER_PUBLIC_KEY: return ::MYSQL_OPT_GET_SERVER_PUBLIC_KEY; case sql::mysql::MYSQL_OPT_OPTIONAL_RESULTSET_METADATA: return ::MYSQL_OPT_OPTIONAL_RESULTSET_METADATA; Index: b/jdbc/driver/nativeapi/mysql_native_connection_wrapper.h =================================================================== --- a/jdbc/driver/nativeapi/mysql_native_connection_wrapper.h +++ b/jdbc/driver/nativeapi/mysql_native_connection_wrapper.h @@ -69,7 +69,7 @@ unsigned long m_client_flag; bool m_dns_srv = false; -#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004) +#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004 && !defined(MYCPPCONN_MARIADB_BUILD)) struct MYSQL* mysql; #else struct st_mysql* mysql; Index: b/jdbc/driver/nativeapi/mysql_native_resultset_wrapper.h =================================================================== --- a/jdbc/driver/nativeapi/mysql_native_resultset_wrapper.h +++ b/jdbc/driver/nativeapi/mysql_native_resultset_wrapper.h @@ -38,7 +38,7 @@ #include "native_resultset_wrapper.h" #include "../cppconn/version_info.h" -#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004) +#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004 && !defined(MYCPPCONN_MARIADB_BUILD)) struct MYSQL_RES; struct MYSQL; #else Index: b/jdbc/driver/nativeapi/mysql_native_statement_wrapper.h =================================================================== --- a/jdbc/driver/nativeapi/mysql_native_statement_wrapper.h +++ b/jdbc/driver/nativeapi/mysql_native_statement_wrapper.h @@ -38,7 +38,7 @@ #include "native_statement_wrapper.h" -#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004) +#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004 && !defined(MYCPPCONN_MARIADB_BUILD)) struct MYSQL_STMT; #else struct st_mysql_stmt; Index: b/jdbc/driver/nativeapi/native_connection_wrapper.h =================================================================== --- a/jdbc/driver/nativeapi/native_connection_wrapper.h +++ b/jdbc/driver/nativeapi/native_connection_wrapper.h @@ -41,7 +41,7 @@ #include "../mysql_connection_options.h" -#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80004) +#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID >= 80004 && !defined(MYCPPCONN_MARIADB_BUILD)) struct MYSQL_BIND; #else struct st_mysql_bind; Index: b/jdbc/driver/nativeapi/native_resultset_wrapper.h =================================================================== --- a/jdbc/driver/nativeapi/native_resultset_wrapper.h +++ b/jdbc/driver/nativeapi/native_resultset_wrapper.h @@ -41,7 +41,7 @@ #include "../cppconn/version_info.h" #include "../mysql_util.h" -#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004) +#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004 && !defined(MYCPPCONN_MARIADB_BUILD)) struct MYSQL_FIELD; #else struct st_mysql_field; Index: b/jdbc/driver/nativeapi/native_statement_wrapper.h =================================================================== --- a/jdbc/driver/nativeapi/native_statement_wrapper.h 2023-03-23 17:32:48.000000000 +0100 +++ b/jdbc/driver/nativeapi/native_statement_wrapper.h 2023-06-11 18:31:20.354495130 +0200 @@ -42,7 +42,7 @@ #include "../mysql_util.h" #include "../mysql_statement_options.h" -#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004) +#if (MYCPPCONN_STATIC_MYSQL_VERSION_ID > 80004 && !defined(MYCPPCONN_MARIADB_BUILD)) struct MYSQL_BIND; struct MYSQL_RES; #else Index: b/jdbc/FindMySQL.cmake =================================================================== --- a/jdbc/FindMySQL.cmake +++ b/jdbc/FindMySQL.cmake @@ -505,6 +505,8 @@ elseif(MYSQL_CONFIG_EXECUTABLE) "\"${MYSQL_CONFIG_EXECUTABLE}\"") endif() + list(GET MYSQL_INCLUDE_DIR 0 MYSQL_INCLUDE_DIR) + if(NOT EXISTS "${MYSQL_INCLUDE_DIR}/mysql.h") message(FATAL_ERROR "Could not find \"mysql.h\" in \"${MYSQL_INCLUDE_DIR}\" " "found from running \"${MYSQL_CONFIG_EXECUTABLE}\"")
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor