提交 6184d330 编写于 作者: wmmhello's avatar wmmhello

fix: comment & ttl

上级 8ace8dfd
......@@ -108,7 +108,7 @@ extern float tsStreamComputDelayRatio; // the delayed computing ration of the
extern int64_t tsMaxRetentWindow;
// build info
extern char td_version[];
extern char version[];
extern char compatible_version[];
extern char gitinfo[];
extern char buildinfo[];
......
......@@ -20,7 +20,7 @@
extern "C" {
#endif
extern char td_version[];
extern char version[];
extern char compatible_version[];
extern char gitinfo[];
extern char buildinfo[];
......
......@@ -397,7 +397,7 @@ const char *taos_data_type(int type) {
}
}
const char *taos_get_client_info() { return td_version; }
const char *taos_get_client_info() { return version; }
int taos_affected_rows(TAOS_RES *res) {
if (res == NULL || TD_RES_TMQ(res)) {
......
......@@ -362,7 +362,7 @@ static int32_t taosAddSystemCfg(SConfig *pCfg) {
if (cfgAddString(pCfg, "os version", info.version, 1) != 0) return -1;
if (cfgAddString(pCfg, "os machine", info.machine, 1) != 0) return -1;
if (cfgAddString(pCfg, "version", td_version, 1) != 0) return -1;
if (cfgAddString(pCfg, "version", version, 1) != 0) return -1;
if (cfgAddString(pCfg, "compatible_version", compatible_version, 1) != 0) return -1;
if (cfgAddString(pCfg, "gitinfo", gitinfo, 1) != 0) return -1;
if (cfgAddString(pCfg, "buildinfo", buildinfo, 1) != 0) return -1;
......
......@@ -114,7 +114,7 @@ static void dmPrintVersion() {
#else
char *releaseName = "community";
#endif
printf("%s version: %s compatible_version: %s\n", releaseName, td_version, compatible_version);
printf("%s version: %s compatible_version: %s\n", releaseName, version, compatible_version);
printf("gitinfo: %s\n", gitinfo);
printf("buildInfo: %s\n", buildinfo);
}
......
......@@ -642,7 +642,7 @@ int32_t mndGetMonitorInfo(SMnode *pMnode, SMonClusterInfo *pClusterInfo, SMonVgr
}
// cluster info
tstrncpy(pClusterInfo->version, td_version, sizeof(pClusterInfo->version));
tstrncpy(pClusterInfo->version, version, sizeof(pClusterInfo->version));
pClusterInfo->monitor_interval = tsMonitorInterval;
pClusterInfo->connections_total = mndGetNumOfConnections(pMnode);
......
......@@ -232,7 +232,7 @@ static int32_t mndProcessConnectReq(SRpcMsg *pReq) {
connectRsp.connType = connReq.connType;
connectRsp.dnodeNum = mndGetDnodeSize(pMnode);
snprintf(connectRsp.sVersion, sizeof(connectRsp.sVersion), "ver:%s\nbuild:%s\ngitinfo:%s", td_version, buildinfo,
snprintf(connectRsp.sVersion, sizeof(connectRsp.sVersion), "ver:%s\nbuild:%s\ngitinfo:%s", version, buildinfo,
gitinfo);
mndGetMnodeEpSet(pMnode, &connectRsp.epSet);
......
......@@ -110,7 +110,7 @@ static char* mndBuildTelemetryReport(SMnode* pMnode) {
snprintf(tmp, sizeof(tmp), "%" PRId64 " kB", tsTotalMemoryKB);
tjsonAddStringToObject(pJson, "memory", tmp);
tjsonAddStringToObject(pJson, "version", td_version);
tjsonAddStringToObject(pJson, "version", version);
tjsonAddStringToObject(pJson, "buildInfo", buildinfo);
tjsonAddStringToObject(pJson, "gitInfo", gitinfo);
tjsonAddStringToObject(pJson, "email", pMgmt->email);
......
......@@ -785,7 +785,7 @@ static void udfdPrintVersion() {
#else
char *releaseName = "community";
#endif
printf("%s version: %s compatible_version: %s\n", releaseName, td_version, compatible_version);
printf("%s version: %s compatible_version: %s\n", releaseName, version, compatible_version);
printf("gitinfo: %s\n", gitinfo);
printf("buildInfo: %s\n", buildinfo);
}
......
......@@ -803,6 +803,7 @@ static void buildCreateTbReq(SVCreateTbReq* pTbReq, const char* tname, STag* pTa
pTbReq->name = strdup(tname);
pTbReq->ctb.suid = suid;
pTbReq->ctb.pTag = (uint8_t*)pTag;
pTbReq->commentLen = -1;
return;
}
......
char td_version[12] = "${TD_VER_NUMBER}";
char version[12] = "${TD_VER_NUMBER}";
char compatible_version[12] = "${TD_VER_COMPATIBLE}";
char gitinfo[48] = "${TD_VER_GIT}";
char buildinfo[64] = "Built at ${TD_VER_DATE}";
......
......@@ -132,17 +132,21 @@ class TDTestCase:
print("============== STEP 3 ===== test child table")
tdSql.execute("create table child_table1 using super_table1 tags(1)")
tdSql.execute("create table child_table1 using super_table1 tags(1) ttl 10")
tdSql.execute("create table child_table2 using super_table1 tags(1) comment ''")
tdSql.execute("create table child_table3 using super_table1 tags(1) comment 'child'")
tdSql.execute("insert into child_table4 using super_table1 tags(1) values(now, 1)")
tdSql.query("show tables like 'child_table1'")
tdSql.checkData(0, 0, 'child_table1')
tdSql.checkData(0, 7, 10)
tdSql.checkData(0, 8, None)
tdSql.query("show tables like 'child_table2'")
tdSql.checkData(0, 0, 'child_table2')
tdSql.checkData(0, 7, 0)
tdSql.checkData(0, 8, '')
......@@ -150,6 +154,11 @@ class TDTestCase:
tdSql.checkData(0, 0, 'child_table3')
tdSql.checkData(0, 8, 'child')
tdSql.query("show tables like 'child_table4'")
tdSql.checkData(0, 0, 'child_table4')
tdSql.checkData(0, 7, 0)
tdSql.checkData(0, 8, None)
tdSql.execute("alter table child_table1 comment 'nihao'")
tdSql.query("show tables like 'child_table1'")
......@@ -171,6 +180,22 @@ class TDTestCase:
tdSql.checkData(0, 0, 'child_table3')
tdSql.checkData(0, 8, 'tdengine')
tdSql.execute("alter table child_table4 comment 'tdengine'")
tdSql.query("show tables like 'child_table4'")
tdSql.checkData(0, 0, 'child_table4')
tdSql.checkData(0, 8, 'tdengine')
tdSql.execute("alter table child_table4 ttl 9")
tdSql.query("show tables like 'child_table4'")
tdSql.checkData(0, 0, 'child_table4')
tdSql.checkData(0, 7, 9)
tdSql.execute("alter table child_table3 ttl 9")
tdSql.query("show tables like 'child_table3'")
tdSql.checkData(0, 0, 'child_table3')
tdSql.checkData(0, 7, 9)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
......@@ -67,7 +67,7 @@ void shellPrintHelp() {
#include <argp.h>
#include <termio.h>
const char *argp_program_version = td_version;
const char *argp_program_version = version;
const char *argp_program_bug_address = SHELL_EMAIL;
static struct argp_option shellOptions[] = {
......@@ -342,7 +342,7 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) {
shell.info.promptHeader = "taos> ";
shell.info.promptContinue = " -> ";
shell.info.promptSize = 6;
snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), "version: %s", td_version);
snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), "version: %s", version);
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
shell.info.osname = "Windows";
......
......@@ -68,7 +68,7 @@ int32_t shellCheckIntSize() {
return 0;
}
void shellPrintVersion() { printf("version: %s\n", td_version); }
void shellPrintVersion() { printf("version: %s\n", version); }
void shellGenerateAuth() {
char secretEncrypt[TSDB_PASSWORD_LEN + 1] = {0};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册