diff options
author | Jim Hahn <jrh3@att.com> | 2019-11-05 14:47:08 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-11-05 14:47:08 -0500 |
commit | 4d7e396e00ef92364e3ea8dd6e35922dc5fae72c (patch) | |
tree | 03e44fa861d5adea2286b93b3bc307efee6f90c5 /feature-distributed-locking/src/main/java/org/onap | |
parent | a8147165ecff5deae8d7c8ba9a241454f2a9481c (diff) |
Fix syntax error in DistributedLock "DELETE"
Changed the "DELETE" to "DELETE FROM" to fix this error:
You have an error in your SQL syntax; check the manual that corresponds
to your MariaDB server version for the right syntax to use
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I10a398c13dc3da547d2b3ea47564ab0d5761a2ee
Diffstat (limited to 'feature-distributed-locking/src/main/java/org/onap')
-rw-r--r-- | feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java index 6f83ea15..7d58b8d5 100644 --- a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java +++ b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java @@ -769,8 +769,8 @@ public class DistributedLockManager extends LockManager<DistributedLockManager.D */ protected void doDbDelete(Connection conn) throws SQLException { logger.debug("delete lock record {}", this); - try (PreparedStatement stmt = - conn.prepareStatement("DELETE pooling.locks WHERE resourceId=? AND host=? AND owner=?")) { + try (PreparedStatement stmt = conn + .prepareStatement("DELETE FROM pooling.locks WHERE resourceId=? AND host=? AND owner=?")) { stmt.setString(1, getResourceId()); stmt.setString(2, this.hostName); |