You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-...

44 lines
1.9 KiB

--- a/driver/mysql_connection.cpp
+++ b/driver/mysql_connection.cpp
@@ -1067,6 +1067,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 */
+#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
} else if ( proxy->get_server_version() >= 50703 ) {
try {
if (GET_CONN_OPTION(optionName, optionValue, intOptions)) {
@@ -1080,6 +1081,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
}
}
/* }}} */
@@ -1097,11 +1099,13 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName)
MY_CHARSET_INFO cs;
proxy->get_character_set_info(&cs);
return cs.dir ? sql::SQLString(cs.dir) : "";
+#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
} else if ( proxy->get_server_version() >= 50703 ) {
const char* optionValue= NULL;
if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) {
return optionValue ? sql::SQLString(optionValue) : "";
}
+#endif
}
return "";
}
--- a/driver/nativeapi/libmysql_static_proxy.cpp
+++ b/driver/nativeapi/libmysql_static_proxy.cpp
@@ -325,7 +325,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 ) && !defined ( MARIADB_VERSION_ID )
if (::mysql_get_option(mysql, option, arg)) {
throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()");
} else {