You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/02/24 08:27:08 UTC
[incubator-skywalking] branch scope-refactor updated: Fix a wrong
mysql alarm query.
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch scope-refactor
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git
The following commit(s) were added to refs/heads/scope-refactor by this push:
new 690a479 Fix a wrong mysql alarm query.
690a479 is described below
commit 690a479bc9e8ceb35c60290d41c097d61392aff3
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Feb 24 16:26:59 2019 +0800
Fix a wrong mysql alarm query.
---
.../oap/server/storage/plugin/jdbc/mysql/MySQLAlarmQueryDAO.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLAlarmQueryDAO.java b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLAlarmQueryDAO.java
index 9f88bc4..3c67196 100644
--- a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLAlarmQueryDAO.java
+++ b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLAlarmQueryDAO.java
@@ -44,6 +44,7 @@ public class MySQLAlarmQueryDAO implements IAlarmQueryDAO {
StringBuilder sql = new StringBuilder();
List<Object> parameters = new ArrayList<>(10);
sql.append("from ").append(AlarmRecord.INDEX_NAME).append(" where ");
+ sql.append(" 1=1 ");
sql.append(" and ").append(AlarmRecord.SCOPE).append(" = ?");
parameters.add(scopeId.intValue());
if (startTB != 0 && endTB != 0) {