Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8ace8dfd
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8ace8dfd
编写于
6月 17, 2022
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:add ttl/comment function & fix global version shadows a variable
上级
2bd2996e
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
215 addition
and
30 deletion
+215
-30
include/common/tglobal.h
include/common/tglobal.h
+1
-1
include/util/version.h
include/util/version.h
+1
-1
source/client/src/clientMain.c
source/client/src/clientMain.c
+1
-1
source/common/src/tglobal.c
source/common/src/tglobal.c
+1
-1
source/dnode/mgmt/exe/dmMain.c
source/dnode/mgmt/exe/dmMain.c
+1
-1
source/dnode/mnode/impl/src/mndMain.c
source/dnode/mnode/impl/src/mndMain.c
+2
-2
source/dnode/mnode/impl/src/mndProfile.c
source/dnode/mnode/impl/src/mndProfile.c
+1
-1
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+3
-2
source/dnode/mnode/impl/src/mndTelem.c
source/dnode/mnode/impl/src/mndTelem.c
+1
-1
source/dnode/vnode/src/meta/metaTable.c
source/dnode/vnode/src/meta/metaTable.c
+7
-4
source/libs/function/src/udfd.c
source/libs/function/src/udfd.c
+1
-1
source/libs/parser/src/parAstCreater.c
source/libs/parser/src/parAstCreater.c
+8
-2
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+2
-8
source/util/src/version.c.in
source/util/src/version.c.in
+1
-1
tests/system-test/2-query/ttl_comment.py
tests/system-test/2-query/ttl_comment.py
+181
-0
tools/shell/src/shellArguments.c
tools/shell/src/shellArguments.c
+2
-2
tools/shell/src/shellUtil.c
tools/shell/src/shellUtil.c
+1
-1
未找到文件。
include/common/tglobal.h
浏览文件 @
8ace8dfd
...
...
@@ -108,7 +108,7 @@ extern float tsStreamComputDelayRatio; // the delayed computing ration of the
extern
int64_t
tsMaxRetentWindow
;
// build info
extern
char
version
[];
extern
char
td_
version
[];
extern
char
compatible_version
[];
extern
char
gitinfo
[];
extern
char
buildinfo
[];
...
...
include/util/version.h
浏览文件 @
8ace8dfd
...
...
@@ -20,7 +20,7 @@
extern
"C"
{
#endif
extern
char
version
[];
extern
char
td_
version
[];
extern
char
compatible_version
[];
extern
char
gitinfo
[];
extern
char
buildinfo
[];
...
...
source/client/src/clientMain.c
浏览文件 @
8ace8dfd
...
...
@@ -397,7 +397,7 @@ const char *taos_data_type(int type) {
}
}
const
char
*
taos_get_client_info
()
{
return
version
;
}
const
char
*
taos_get_client_info
()
{
return
td_
version
;
}
int
taos_affected_rows
(
TAOS_RES
*
res
)
{
if
(
res
==
NULL
||
TD_RES_TMQ
(
res
))
{
...
...
source/common/src/tglobal.c
浏览文件 @
8ace8dfd
...
...
@@ -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"
,
version
,
1
)
!=
0
)
return
-
1
;
if
(
cfgAddString
(
pCfg
,
"version"
,
td_
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
;
...
...
source/dnode/mgmt/exe/dmMain.c
浏览文件 @
8ace8dfd
...
...
@@ -114,7 +114,7 @@ static void dmPrintVersion() {
#else
char
*
releaseName
=
"community"
;
#endif
printf
(
"%s version: %s compatible_version: %s
\n
"
,
releaseName
,
version
,
compatible_version
);
printf
(
"%s version: %s compatible_version: %s
\n
"
,
releaseName
,
td_
version
,
compatible_version
);
printf
(
"gitinfo: %s
\n
"
,
gitinfo
);
printf
(
"buildInfo: %s
\n
"
,
buildinfo
);
}
...
...
source/dnode/mnode/impl/src/mndMain.c
浏览文件 @
8ace8dfd
...
...
@@ -117,7 +117,7 @@ static void *mndThreadFp(void *param) {
setThreadName
(
"mnode-timer"
);
while
(
1
)
{
if
(
lastTime
%
(
1
00
)
==
0
)
{
// sleep 1 day for ttl
if
(
lastTime
%
(
8640
00
)
==
0
)
{
// sleep 1 day for ttl
mndPushTtlTime
(
pMnode
);
}
...
...
@@ -642,7 +642,7 @@ int32_t mndGetMonitorInfo(SMnode *pMnode, SMonClusterInfo *pClusterInfo, SMonVgr
}
// cluster info
tstrncpy
(
pClusterInfo
->
version
,
version
,
sizeof
(
pClusterInfo
->
version
));
tstrncpy
(
pClusterInfo
->
version
,
td_
version
,
sizeof
(
pClusterInfo
->
version
));
pClusterInfo
->
monitor_interval
=
tsMonitorInterval
;
pClusterInfo
->
connections_total
=
mndGetNumOfConnections
(
pMnode
);
...
...
source/dnode/mnode/impl/src/mndProfile.c
浏览文件 @
8ace8dfd
...
...
@@ -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
\n
build:%s
\n
gitinfo:%s"
,
version
,
buildinfo
,
snprintf
(
connectRsp
.
sVersion
,
sizeof
(
connectRsp
.
sVersion
),
"ver:%s
\n
build:%s
\n
gitinfo:%s"
,
td_
version
,
buildinfo
,
gitinfo
);
mndGetMnodeEpSet
(
pMnode
,
&
connectRsp
.
epSet
);
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
8ace8dfd
...
...
@@ -280,7 +280,7 @@ static int32_t mndStbActionUpdate(SSdb *pSdb, SStbObj *pOld, SStbObj *pNew) {
}
}
if
(
pOld
->
commentLen
<
pNew
->
commentLen
)
{
if
(
pOld
->
commentLen
<
pNew
->
commentLen
&&
pNew
->
commentLen
>
0
)
{
void
*
comment
=
taosMemoryMalloc
(
pNew
->
commentLen
+
1
);
if
(
comment
!=
NULL
)
{
taosMemoryFree
(
pOld
->
comment
);
...
...
@@ -291,6 +291,7 @@ static int32_t mndStbActionUpdate(SSdb *pSdb, SStbObj *pOld, SStbObj *pNew) {
taosWUnLockLatch
(
&
pOld
->
lock
);
}
}
pOld
->
commentLen
=
pNew
->
commentLen
;
if
(
pOld
->
ast1Len
<
pNew
->
ast1Len
)
{
void
*
pAst1
=
taosMemoryMalloc
(
pNew
->
ast1Len
);
...
...
@@ -325,7 +326,7 @@ static int32_t mndStbActionUpdate(SSdb *pSdb, SStbObj *pOld, SStbObj *pNew) {
pOld
->
numOfTags
=
pNew
->
numOfTags
;
memcpy
(
pOld
->
pColumns
,
pNew
->
pColumns
,
pOld
->
numOfColumns
*
sizeof
(
SSchema
));
memcpy
(
pOld
->
pTags
,
pNew
->
pTags
,
pOld
->
numOfTags
*
sizeof
(
SSchema
));
if
(
pNew
->
commentLen
!=
0
)
{
if
(
pNew
->
commentLen
>
0
)
{
memcpy
(
pOld
->
comment
,
pNew
->
comment
,
pNew
->
commentLen
+
1
);
}
if
(
pNew
->
ast1Len
!=
0
)
{
...
...
source/dnode/mnode/impl/src/mndTelem.c
浏览文件 @
8ace8dfd
...
...
@@ -110,7 +110,7 @@ static char* mndBuildTelemetryReport(SMnode* pMnode) {
snprintf
(
tmp
,
sizeof
(
tmp
),
"%"
PRId64
" kB"
,
tsTotalMemoryKB
);
tjsonAddStringToObject
(
pJson
,
"memory"
,
tmp
);
tjsonAddStringToObject
(
pJson
,
"version"
,
version
);
tjsonAddStringToObject
(
pJson
,
"version"
,
td_
version
);
tjsonAddStringToObject
(
pJson
,
"buildInfo"
,
buildinfo
);
tjsonAddStringToObject
(
pJson
,
"gitInfo"
,
gitinfo
);
tjsonAddStringToObject
(
pJson
,
"email"
,
pMgmt
->
email
);
...
...
source/dnode/vnode/src/meta/metaTable.c
浏览文件 @
8ace8dfd
...
...
@@ -400,8 +400,8 @@ static void metaBuildTtlIdxKey(STtlIdxKey *ttlKey, const SMetaEntry *pME){
if
(
ttlDays
<=
0
)
return
;
//
ttlKey->dtime = ctime / 1000 + ttlDays * 24 * 60 * 60;
ttlKey
->
dtime
=
ctime
/
1000
+
ttlDays
;
ttlKey
->
dtime
=
ctime
/
1000
+
ttlDays
*
24
*
60
*
60
;
//
ttlKey->dtime = ctime / 1000 + ttlDays;
ttlKey
->
uid
=
pME
->
uid
;
}
...
...
@@ -499,7 +499,6 @@ static int metaAlterTableColumn(SMeta *pMeta, int64_t version, SVAlterTbReq *pAl
tDecoderInit
(
&
dc
,
entry
.
pBuf
,
nData
);
ret
=
metaDecodeEntry
(
&
dc
,
&
entry
);
ASSERT
(
ret
==
0
);
tDecoderClear
(
&
dc
);
if
(
entry
.
type
!=
TSDB_NORMAL_TABLE
)
{
terrno
=
TSDB_CODE_VND_INVALID_TABLE_ACTION
;
...
...
@@ -597,12 +596,16 @@ static int metaAlterTableColumn(SMeta *pMeta, int64_t version, SVAlterTbReq *pAl
if
(
pNewSchema
)
taosMemoryFree
(
pNewSchema
);
tdbTbcClose
(
pTbDbc
);
tdbTbcClose
(
pUidIdxc
);
tDecoderClear
(
&
dc
);
return
0
;
_err:
if
(
entry
.
pBuf
)
taosMemoryFree
(
entry
.
pBuf
);
tdbTbcClose
(
pTbDbc
);
tdbTbcClose
(
pUidIdxc
);
tDecoderClear
(
&
dc
);
return
-
1
;
}
...
...
@@ -800,7 +803,6 @@ static int metaUpdateTableOptions(SMeta *pMeta, int64_t version, SVAlterTbReq *p
tDecoderInit
(
&
dc
,
entry
.
pBuf
,
nData
);
ret
=
metaDecodeEntry
(
&
dc
,
&
entry
);
ASSERT
(
ret
==
0
);
tDecoderClear
(
&
dc
);
entry
.
version
=
version
;
metaWLock
(
pMeta
);
...
...
@@ -834,6 +836,7 @@ static int metaUpdateTableOptions(SMeta *pMeta, int64_t version, SVAlterTbReq *p
tdbTbcClose
(
pTbDbc
);
tdbTbcClose
(
pUidIdxc
);
tDecoderClear
(
&
dc
);
if
(
entry
.
pBuf
)
taosMemoryFree
(
entry
.
pBuf
);
return
0
;
}
...
...
source/libs/function/src/udfd.c
浏览文件 @
8ace8dfd
...
...
@@ -785,7 +785,7 @@ static void udfdPrintVersion() {
#else
char
*
releaseName
=
"community"
;
#endif
printf
(
"%s version: %s compatible_version: %s
\n
"
,
releaseName
,
version
,
compatible_version
);
printf
(
"%s version: %s compatible_version: %s
\n
"
,
releaseName
,
td_
version
,
compatible_version
);
printf
(
"gitinfo: %s
\n
"
,
gitinfo
);
printf
(
"buildInfo: %s
\n
"
,
buildinfo
);
}
...
...
source/libs/parser/src/parAstCreater.c
浏览文件 @
8ace8dfd
...
...
@@ -895,9 +895,15 @@ SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType
case
TABLE_OPTION_ROLLUP
:
((
STableOptions
*
)
pOptions
)
->
pRollupFuncs
=
pVal
;
break
;
case
TABLE_OPTION_TTL
:
((
STableOptions
*
)
pOptions
)
->
ttl
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
case
TABLE_OPTION_TTL
:{
int64_t
ttl
=
taosStr2Int64
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
if
(
ttl
>
INT32_MAX
){
ttl
=
INT32_MAX
;
}
// ttl can not be smaller than 0, because there is a limitation in sql.y (TTL NK_INTEGER)
((
STableOptions
*
)
pOptions
)
->
ttl
=
ttl
;
break
;
}
case
TABLE_OPTION_SMA
:
((
STableOptions
*
)
pOptions
)
->
pSma
=
pVal
;
break
;
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
8ace8dfd
...
...
@@ -2810,9 +2810,6 @@ static int32_t checkCreateTable(STranslateContext* pCxt, SCreateTableStmt* pStmt
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
checkTableRollupOption
(
pCxt
,
pStmt
->
pOptions
->
pRollupFuncs
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
checkRangeOption
(
pCxt
,
"ttl"
,
pStmt
->
pOptions
->
ttl
,
TSDB_MIN_TABLE_TTL
,
INT32_MAX
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
checkTableSmaOption
(
pCxt
,
pStmt
);
}
...
...
@@ -4995,11 +4992,8 @@ static int32_t buildUpdateOptionsReq(STranslateContext* pCxt, SAlterTableStmt* p
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
-
1
!=
pStmt
->
pOptions
->
ttl
)
{
code
=
checkRangeOption
(
pCxt
,
"ttl"
,
pStmt
->
pOptions
->
ttl
,
TSDB_MIN_TABLE_TTL
,
INT32_MAX
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
pReq
->
updateTTL
=
true
;
pReq
->
newTTL
=
pStmt
->
pOptions
->
ttl
;
}
pReq
->
updateTTL
=
true
;
pReq
->
newTTL
=
pStmt
->
pOptions
->
ttl
;
}
if
(
TSDB_CODE_SUCCESS
==
code
){
...
...
source/util/src/version.c.in
浏览文件 @
8ace8dfd
char version[12] = "${TD_VER_NUMBER}";
char
td_
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}";
...
...
tests/system-test/2-query/ttl_comment.py
0 → 100644
浏览文件 @
8ace8dfd
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, db_test.stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
tdLog
from
util.cases
import
tdCases
from
util.sql
import
tdSql
class
TDTestCase
:
def
caseDescription
(
self
):
'''
ttl/comment test
'''
return
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
error
(
"create table ttl_table1(ts timestamp, i int) ttl 1.1"
)
tdSql
.
error
(
"create table ttl_table2(ts timestamp, i int) ttl 1e1"
)
tdSql
.
error
(
"create table ttl_table3(ts timestamp, i int) ttl -1"
)
print
(
"============== STEP 1 ===== test normal table"
)
tdSql
.
execute
(
"create table normal_table1(ts timestamp, i int)"
)
tdSql
.
execute
(
"create table normal_table2(ts timestamp, i int) comment '' ttl 3"
)
tdSql
.
execute
(
"create table normal_table3(ts timestamp, i int) ttl 2100000000020 comment 'hello'"
)
tdSql
.
query
(
"show tables like 'normal_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table1'
)
tdSql
.
checkData
(
0
,
7
,
0
)
tdSql
.
checkData
(
0
,
8
,
None
)
tdSql
.
query
(
"show tables like 'normal_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table2'
)
tdSql
.
checkData
(
0
,
7
,
3
)
tdSql
.
checkData
(
0
,
8
,
''
)
tdSql
.
query
(
"show tables like 'normal_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table3'
)
tdSql
.
checkData
(
0
,
7
,
2147483647
)
tdSql
.
checkData
(
0
,
8
,
'hello'
)
tdSql
.
execute
(
"alter table normal_table1 comment 'nihao'"
)
tdSql
.
query
(
"show tables like 'normal_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table1'
)
tdSql
.
checkData
(
0
,
8
,
'nihao'
)
tdSql
.
execute
(
"alter table normal_table1 comment ''"
)
tdSql
.
query
(
"show tables like 'normal_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table1'
)
tdSql
.
checkData
(
0
,
8
,
''
)
tdSql
.
execute
(
"alter table normal_table2 comment 'fly'"
)
tdSql
.
query
(
"show tables like 'normal_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table2'
)
tdSql
.
checkData
(
0
,
8
,
'fly'
)
tdSql
.
execute
(
"alter table normal_table3 comment 'fly'"
)
tdSql
.
query
(
"show tables like 'normal_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table3'
)
tdSql
.
checkData
(
0
,
8
,
'fly'
)
tdSql
.
execute
(
"alter table normal_table1 ttl 1"
)
tdSql
.
query
(
"show tables like 'normal_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table1'
)
tdSql
.
checkData
(
0
,
7
,
1
)
tdSql
.
execute
(
"alter table normal_table3 ttl 0"
)
tdSql
.
query
(
"show tables like 'normal_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table3'
)
tdSql
.
checkData
(
0
,
7
,
0
)
print
(
"============== STEP 2 ===== test super table"
)
tdSql
.
execute
(
"create table super_table1(ts timestamp, i int) tags(t int)"
)
tdSql
.
execute
(
"create table super_table2(ts timestamp, i int) tags(t int) comment ''"
)
tdSql
.
execute
(
"create table super_table3(ts timestamp, i int) tags(t int) comment 'super'"
)
tdSql
.
query
(
"show stables like 'super_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table1'
)
tdSql
.
checkData
(
0
,
6
,
None
)
tdSql
.
query
(
"show stables like 'super_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table2'
)
tdSql
.
checkData
(
0
,
6
,
''
)
tdSql
.
query
(
"show stables like 'super_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table3'
)
tdSql
.
checkData
(
0
,
6
,
'super'
)
tdSql
.
execute
(
"alter table super_table1 comment 'nihao'"
)
tdSql
.
query
(
"show stables like 'super_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table1'
)
tdSql
.
checkData
(
0
,
6
,
'nihao'
)
tdSql
.
execute
(
"alter table super_table1 comment ''"
)
tdSql
.
query
(
"show stables like 'super_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table1'
)
tdSql
.
checkData
(
0
,
6
,
''
)
tdSql
.
execute
(
"alter table super_table2 comment 'fly'"
)
tdSql
.
query
(
"show stables like 'super_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table2'
)
tdSql
.
checkData
(
0
,
6
,
'fly'
)
tdSql
.
execute
(
"alter table super_table3 comment 'tdengine'"
)
tdSql
.
query
(
"show stables like 'super_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table3'
)
tdSql
.
checkData
(
0
,
6
,
'tdengine'
)
print
(
"============== STEP 3 ===== test child table"
)
tdSql
.
execute
(
"create table child_table1 using super_table1 tags(1)"
)
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
.
query
(
"show tables like 'child_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table1'
)
tdSql
.
checkData
(
0
,
8
,
None
)
tdSql
.
query
(
"show tables like 'child_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table2'
)
tdSql
.
checkData
(
0
,
8
,
''
)
tdSql
.
query
(
"show tables like 'child_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table3'
)
tdSql
.
checkData
(
0
,
8
,
'child'
)
tdSql
.
execute
(
"alter table child_table1 comment 'nihao'"
)
tdSql
.
query
(
"show tables like 'child_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table1'
)
tdSql
.
checkData
(
0
,
8
,
'nihao'
)
tdSql
.
execute
(
"alter table child_table1 comment ''"
)
tdSql
.
query
(
"show tables like 'child_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table1'
)
tdSql
.
checkData
(
0
,
8
,
''
)
tdSql
.
execute
(
"alter table child_table2 comment 'fly'"
)
tdSql
.
query
(
"show tables like 'child_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table2'
)
tdSql
.
checkData
(
0
,
8
,
'fly'
)
tdSql
.
execute
(
"alter table child_table3 comment 'tdengine'"
)
tdSql
.
query
(
"show tables like 'child_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table3'
)
tdSql
.
checkData
(
0
,
8
,
'tdengine'
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tools/shell/src/shellArguments.c
浏览文件 @
8ace8dfd
...
...
@@ -67,7 +67,7 @@ void shellPrintHelp() {
#include <argp.h>
#include <termio.h>
const
char
*
argp_program_version
=
version
;
const
char
*
argp_program_version
=
td_
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"
,
version
);
snprintf
(
shell
.
info
.
programVersion
,
sizeof
(
shell
.
info
.
programVersion
),
"version: %s"
,
td_
version
);
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
shell
.
info
.
osname
=
"Windows"
;
...
...
tools/shell/src/shellUtil.c
浏览文件 @
8ace8dfd
...
...
@@ -68,7 +68,7 @@ int32_t shellCheckIntSize() {
return
0
;
}
void
shellPrintVersion
()
{
printf
(
"version: %s
\n
"
,
version
);
}
void
shellPrintVersion
()
{
printf
(
"version: %s
\n
"
,
td_
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录