Changeset View
Changeset View
Standalone View
Standalone View
files/001-fix-mariadb.patch
- This file was added.
| --- a/driver/mysql_connection.cpp | |||||
| +++ b/driver/mysql_connection.cpp | |||||
| @@ -1023,6 +1023,7 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName, void * opti | |||||
| proxy->get_character_set_info(&cs); | |||||
| *(static_cast<int *>(optionValue)) = cs.mbmaxlen; | |||||
| /* mysql_get_option() was added in mysql 5.7.3 version */ | |||||
| +#ifndef MARIADB_BASE_VERSION | |||||
| } else if ( proxy->get_server_version() >= 50703 ) { | |||||
| try { | |||||
| if (GET_CONN_OPTION(optionName, optionValue, intOptions)) { | |||||
| @@ -1036,6 +1037,7 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName, void * opti | |||||
| CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str()); | |||||
| throw e; | |||||
| } | |||||
| +#endif | |||||
| } | |||||
| } | |||||
| /* }}} */ | |||||
| diff --git a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp | |||||
| index 6f8bda9..19f6f6c 100644 | |||||
| --- a/driver/nativeapi/libmysql_static_proxy.cpp | |||||
| +++ b/driver/nativeapi/libmysql_static_proxy.cpp | |||||
| @@ -319,7 +319,7 @@ LibmysqlStaticProxy::options(MYSQL * mysql, enum mysql_option option, const void | |||||
| int | |||||
| LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg) | |||||
| { | |||||
| -#if MYSQL_VERSION_ID >= 50703 | |||||
| +#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION ) | |||||
| if (::mysql_get_option(mysql, option, arg)) { | |||||
| throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()"); | |||||
| } else { | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.