diff options
Diffstat (limited to 'dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch')
-rw-r--r-- | dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch new file mode 100644 index 000000000000..2868a3c024af --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch @@ -0,0 +1,43 @@ +--- 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 { |