You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/12 12:49:13 UTC
[GitHub] [skywalking-java] wu-sheng commented on a diff in pull request #154: Support default database(not set through JDBC URL) in mysql-5.x plugin
wu-sheng commented on code in PR #154:
URL: https://github.com/apache/skywalking-java/pull/154#discussion_r848395885
##########
apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/ConnectionCreate5xInterceptor.java:
##########
@@ -42,7 +43,8 @@ public void beforeMethod(Class clazz, Method method, Object[] allArguments, Clas
public Object afterMethod(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes,
Object ret) {
if (ret instanceof EnhancedInstance) {
- ConnectionInfo connectionInfo = ConnectionCache.get(allArguments[0].toString(), allArguments[1].toString(), allArguments[3].toString());
+ String database = Objects.isNull(allArguments[3]) ? "" : allArguments[3].toString();
Review Comment:
Good to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org