未验证 提交 d6e21220 编写于 作者: S shenglian-zhou 提交者: GitHub

Merge pull request #9498 from taosdata/fix/TD-11999-2.4

[TD-11999]<fix>(other): remove double quotes from restful_info table using underscore instead
...@@ -458,14 +458,18 @@ static void monBuildMonitorSql(char *sql, int32_t cmd) { ...@@ -458,14 +458,18 @@ static void monBuildMonitorSql(char *sql, int32_t cmd) {
", expire_time int, timeseries_used int, timeseries_total int)", ", expire_time int, timeseries_used int, timeseries_total int)",
tsMonitorDbName); tsMonitorDbName);
} else if (cmd == MON_CMD_CREATE_MT_RESTFUL) { } else if (cmd == MON_CMD_CREATE_MT_RESTFUL) {
int usedLen = 0, len = 0;
int pos = snprintf(sql, SQL_LENGTH, int pos = snprintf(sql, SQL_LENGTH,
"create table if not exists %s.restful_info(ts timestamp", tsMonitorDbName); "create table if not exists %s.restful_info(ts timestamp", tsMonitorDbName);
usedLen += pos;
for (int i = 0; i < tListLen(monHttpStatusTable); ++i) { for (int i = 0; i < tListLen(monHttpStatusTable); ++i) {
pos += snprintf(sql + pos, SQL_LENGTH, ", `%s(%d)` int", len = snprintf(sql + pos, SQL_LENGTH - usedLen, ", %s_%d int",
monHttpStatusTable[i].name, monHttpStatusTable[i].name,
monHttpStatusTable[i].code); monHttpStatusTable[i].code);
usedLen += len;
pos += len;
} }
snprintf(sql + pos, SQL_LENGTH, snprintf(sql + pos, SQL_LENGTH - usedLen,
") tags (dnode_id int, dnode_ep binary(%d))", ") tags (dnode_id int, dnode_ep binary(%d))",
TSDB_EP_LEN); TSDB_EP_LEN);
} else if (cmd == MON_CMD_CREATE_TB_RESTFUL) { } else if (cmd == MON_CMD_CREATE_TB_RESTFUL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册