aboutsummaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-dispatcher-common
diff options
context:
space:
mode:
authorJoss Armstrong <joss.armstrong@ericsson.com>2019-03-19 18:26:44 +0000
committerTakamune Cho <takamune.cho@att.com>2019-03-21 00:12:13 +0000
commit8c06462b211d573926ee1101759d818f846ea7f5 (patch)
treee0b6cc8fee0828b0a60cddbd7cd586dcbf418782 /appc-dispatcher/appc-dispatcher-common
parent6e87544710647d9d1e55f3e8a72fe361d244e8b7 (diff)
Change identifier in database query
Future release of MariaDB adds a keyword currently used as an identifier Issue-ID: APPC-1548 Change-Id: I4ced052e6acb816797024f5581f14f5f969d357f Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-dispatcher/appc-dispatcher-common')
-rw-r--r--appc-dispatcher/appc-dispatcher-common/transaction-recorder/src/main/java/org/onap/appc/transactionrecorder/impl/TransactionRecorderImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/transaction-recorder/src/main/java/org/onap/appc/transactionrecorder/impl/TransactionRecorderImpl.java b/appc-dispatcher/appc-dispatcher-common/transaction-recorder/src/main/java/org/onap/appc/transactionrecorder/impl/TransactionRecorderImpl.java
index 12a3457d0..15ed9ad4b 100644
--- a/appc-dispatcher/appc-dispatcher-common/transaction-recorder/src/main/java/org/onap/appc/transactionrecorder/impl/TransactionRecorderImpl.java
+++ b/appc-dispatcher/appc-dispatcher-common/transaction-recorder/src/main/java/org/onap/appc/transactionrecorder/impl/TransactionRecorderImpl.java
@@ -195,7 +195,7 @@ public class TransactionRecorderImpl implements TransactionRecorder {
private boolean checkIfNullInstanceEntryExist(String key, String requestId) throws APPCException {
logger.debug("Entered checkIfNullInstanceEntryExist");
- String nullInstanceCheckQuery = new String("SELECT COUNT(*) as ROWS FROM " +
+ String nullInstanceCheckQuery = new String("SELECT COUNT(*) as ROWCOUNT FROM " +
TransactionConstants.TRANSACTIONS + WHERE +
TRANSACTION_ID.getColumnName() + " = ? AND " +
REQUEST_ID.getColumnName() + " = ? ");
@@ -208,7 +208,7 @@ public class TransactionRecorderImpl implements TransactionRecorder {
CachedRowSet rowSet = dbLibService.getData(nullInstanceCheckQuery, nullInstanceCheckParams, SCHEMA);
int noRows = 0;
if (rowSet != null && rowSet.first()) {
- noRows = rowSet.getInt("ROWS");
+ noRows = rowSet.getInt("ROWCOUNT");
logger.info("No of Rows in Transactions Table with TRANSACTION_ID: " +
null + "~" + key + " and REQUEST_ID " + requestId + " is: " + noRows);
}