From 21c7a46b44c21dc4f93edf6a654238bab9664b10 Mon Sep 17 00:00:00 2001 From: slguan Date: Tue, 10 Sep 2019 09:53:04 +0800 Subject: [PATCH] fix the issue #487 --- src/client/src/tscProfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscProfile.c b/src/client/src/tscProfile.c index ebdf3bd91d..770e61e278 100644 --- a/src/client/src/tscProfile.c +++ b/src/client/src/tscProfile.c @@ -76,8 +76,8 @@ void tscSaveSlowQuery(SSqlObj *pSql) { tscTrace("%p query time:%ld sql:%s", pSql, pSql->res.useconds, pSql->sqlstr); char *sql = malloc(200); - int len = snprintf(sql, 200, "insert into sys.slowquery values(now, '%s', %lld, %lld, '", pSql->pTscObj->user, - pSql->stime, pSql->res.useconds); + int len = snprintf(sql, 200, "insert into %s.slowquery values(now, '%s', %lld, %lld, '", tsMonitorDbName, + pSql->pTscObj->user, pSql->stime, pSql->res.useconds); int sqlLen = snprintf(sql + len, TSDB_SHOW_SQL_LEN, "%s", pSql->sqlstr); if (sqlLen > TSDB_SHOW_SQL_LEN - 1) { sqlLen = len + TSDB_SHOW_SQL_LEN - 1; -- GitLab