Skip to content

Commit

Permalink
Fix SqlQuery type mismatching issue
Browse files Browse the repository at this point in the history
We have used a static variable to keep Sql Query type hence when more than one DataServices is deployed the query type becomes inconsistent. Fix this by removing the static context.

Fixes: wso2/api-manager#2520
  • Loading branch information
malakaganga committed Mar 1, 2024
1 parent 3d3fbce commit f11022d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public class SQLQuery extends ExpressionQuery implements BatchRequestParticipant

private boolean timeConvertEnabled = true;

private static QueryType sqlQueryType;
private QueryType sqlQueryType;

/**
* thread local variable to keep the ordinal of the ref cursor if there is any
Expand Down Expand Up @@ -2571,7 +2571,7 @@ public QueryType setSqlQueryType(String query) {
return sqlQueryType = sqlQueryType(query);
}

public static QueryType sqlQueryType(String sqlQuery) {
public QueryType sqlQueryType(String sqlQuery) {

String query;
try {
Expand Down

0 comments on commit f11022d

Please sign in to comment.