Skip to content

Commit 467b9bb

Browse files
committed
Merge branch 'wl15481' into trunk
Change-Id: I1713889ccd7bc150bab16aece6f5295fd41f6f5e
2 parents bee4abb + 2ee3728 commit 467b9bb

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

jdbc/cppconn/connection.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
#define OPT_OCI_CONFIG_FILE "OPT_OCI_CONFIG_FILE"
138138
#define OPT_AUTHENTICATION_KERBEROS_CLIENT_MODE \
139139
"OPT_AUTHENTICATION_KERBEROS_CLIENT_MODE"
140+
#define OPT_OCI_CLIENT_CONFIG_PROFILE "OPT_OCI_CLIENT_CONFIG_PROFILE"
140141

141142
namespace sql
142143
{

jdbc/driver/mysql_connection.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,24 @@ void MySQL_Connection::init(ConnectOptionsMap & properties)
10291029
OPT_OCI_CONFIG_FILE
10301030
);
10311031
}
1032+
} else if (!it->first.compare(OPT_OCI_CLIENT_CONFIG_PROFILE)) {
1033+
try {
1034+
p_s = (it->second).get<sql::SQLString>();
1035+
} catch (sql::InvalidArgumentException &) {
1036+
throw sql::InvalidArgumentException(
1037+
"Wrong type passed for OPT_OCI_CLIENT_CONFIG_PROFILE. Expected "
1038+
"sql::SQLString.");
1039+
}
1040+
1041+
try {
1042+
proxy->plugin_option(MYSQL_CLIENT_AUTHENTICATION_PLUGIN,
1043+
"authentication_oci_client",
1044+
"authentication-oci-client-config-profile", *p_s);
1045+
} catch (sql::InvalidArgumentException &e) {
1046+
throw ::sql::SQLUnsupportedOptionException(
1047+
"Failed to set config profile for authentication_oci_client plugin",
1048+
OPT_OCI_CLIENT_CONFIG_PROFILE);
1049+
}
10321050

10331051
} else if (!it->first.compare(OPT_AUTHENTICATION_KERBEROS_CLIENT_MODE)) {
10341052
#if defined(_WIN32)

0 commit comments

Comments
 (0)