Skip to content

Commit 5be92a5

Browse files
fix(health): Fixed the broken lock-wait detection
1 parent 6ac42c1 commit 5be92a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/iemr/admin/service/health/HealthService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ private boolean hasLockWaits(Connection connection) {
375375
"WHERE (state = 'Waiting for table metadata lock' " +
376376
" OR state = 'Waiting for row lock' " +
377377
" OR state = 'Waiting for lock') " +
378-
"AND user = USER()")) {
378+
"AND user = SUBSTRING_INDEX(USER(), '@', 1)")) {
379379
stmt.setQueryTimeout(2);
380380
try (ResultSet rs = stmt.executeQuery()) {
381381
if (rs.next()) {

0 commit comments

Comments
 (0)