Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9f1b0558
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看板
提交
9f1b0558
编写于
9月 14, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into feature/3.0_interval_hash_optimize
上级
627e7eaf
95ba74f6
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
63 addition
and
19 deletion
+63
-19
include/common/tmsg.h
include/common/tmsg.h
+1
-0
source/common/src/systable.c
source/common/src/systable.c
+2
-1
source/common/src/tmsg.c
source/common/src/tmsg.c
+2
-0
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+6
-3
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+1
-0
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+19
-1
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+1
-0
source/dnode/vnode/src/vnd/vnodeCfg.c
source/dnode/vnode/src/vnd/vnodeCfg.c
+5
-3
source/libs/tdb/src/db/tdbPager.c
source/libs/tdb/src/db/tdbPager.c
+10
-5
tests/system-test/1-insert/delete_data.py
tests/system-test/1-insert/delete_data.py
+4
-0
tests/system-test/1-insert/update_data.py
tests/system-test/1-insert/update_data.py
+12
-6
未找到文件。
include/common/tmsg.h
浏览文件 @
9f1b0558
...
...
@@ -1201,6 +1201,7 @@ typedef struct {
int16_t
sstTrigger
;
int16_t
hashPrefix
;
int16_t
hashSuffix
;
int32_t
tsdbPageSize
;
}
SCreateVnodeReq
;
int32_t
tSerializeSCreateVnodeReq
(
void
*
buf
,
int32_t
bufLen
,
SCreateVnodeReq
*
pReq
);
...
...
source/common/src/systable.c
浏览文件 @
9f1b0558
...
...
@@ -102,9 +102,10 @@ static const SSysDbTableSchema userDBSchema[] = {
{.
name
=
"wal_retention_size"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_BIGINT
,
.
sysInfo
=
true
},
{.
name
=
"wal_roll_period"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
,
.
sysInfo
=
true
},
{.
name
=
"wal_segment_size"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_BIGINT
,
.
sysInfo
=
true
},
{.
name
=
"s
s
t_trigger"
,
.
bytes
=
2
,
.
type
=
TSDB_DATA_TYPE_SMALLINT
,
.
sysInfo
=
true
},
{.
name
=
"s
t
t_trigger"
,
.
bytes
=
2
,
.
type
=
TSDB_DATA_TYPE_SMALLINT
,
.
sysInfo
=
true
},
{.
name
=
"table_prefix"
,
.
bytes
=
2
,
.
type
=
TSDB_DATA_TYPE_SMALLINT
,
.
sysInfo
=
true
},
{.
name
=
"table_suffix"
,
.
bytes
=
2
,
.
type
=
TSDB_DATA_TYPE_SMALLINT
,
.
sysInfo
=
true
},
{.
name
=
"tsdb_pagesize"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
,
.
sysInfo
=
true
},
};
static
const
SSysDbTableSchema
userFuncSchema
[]
=
{
...
...
source/common/src/tmsg.c
浏览文件 @
9f1b0558
...
...
@@ -3782,6 +3782,7 @@ int32_t tSerializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq *pR
if
(
tEncodeI16
(
&
encoder
,
pReq
->
sstTrigger
)
<
0
)
return
-
1
;
if
(
tEncodeI16
(
&
encoder
,
pReq
->
hashPrefix
)
<
0
)
return
-
1
;
if
(
tEncodeI16
(
&
encoder
,
pReq
->
hashSuffix
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
&
encoder
,
pReq
->
tsdbPageSize
)
<
0
)
return
-
1
;
tEndEncode
(
&
encoder
);
...
...
@@ -3857,6 +3858,7 @@ int32_t tDeserializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq *
if
(
tDecodeI16
(
&
decoder
,
&
pReq
->
sstTrigger
)
<
0
)
return
-
1
;
if
(
tDecodeI16
(
&
decoder
,
&
pReq
->
hashPrefix
)
<
0
)
return
-
1
;
if
(
tDecodeI16
(
&
decoder
,
&
pReq
->
hashSuffix
)
<
0
)
return
-
1
;
if
(
tDecodeI32
(
&
decoder
,
&
pReq
->
tsdbPageSize
)
<
0
)
return
-
1
;
tEndDecode
(
&
decoder
);
tDecoderClear
(
&
decoder
);
...
...
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
9f1b0558
...
...
@@ -173,6 +173,7 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) {
pCfg
->
hashMethod
=
pCreate
->
hashMethod
;
pCfg
->
hashPrefix
=
pCreate
->
hashPrefix
;
pCfg
->
hashSuffix
=
pCreate
->
hashSuffix
;
pCfg
->
tsdbPageSize
=
pCreate
->
tsdbPageSize
*
1024
;
pCfg
->
standby
=
pCfg
->
standby
;
pCfg
->
syncCfg
.
myIndex
=
pCreate
->
selfIndex
;
...
...
@@ -222,9 +223,11 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
return
-
1
;
}
dInfo
(
"vgId:%d, start to create vnode, tsma:%d standby:%d cacheLast:%d cacheLastSize:%d sstTrigger:%d"
,
createReq
.
vgId
,
createReq
.
isTsma
,
createReq
.
standby
,
createReq
.
cacheLast
,
createReq
.
cacheLastSize
,
createReq
.
sstTrigger
);
dInfo
(
"vgId:%d, start to create vnode, tsma:%d standby:%d cacheLast:%d cacheLastSize:%d sstTrigger:%d "
"tsdbPageSize:%d"
,
createReq
.
vgId
,
createReq
.
isTsma
,
createReq
.
standby
,
createReq
.
cacheLast
,
createReq
.
cacheLastSize
,
createReq
.
sstTrigger
,
createReq
.
tsdbPageSize
);
dInfo
(
"vgId:%d, hashMethod:%d begin:%u end:%u prefix:%d surfix:%d"
,
createReq
.
vgId
,
createReq
.
hashMethod
,
createReq
.
hashBegin
,
createReq
.
hashEnd
,
createReq
.
hashPrefix
,
createReq
.
hashSuffix
);
vmGenerateVnodeCfg
(
&
createReq
,
&
vnodeCfg
);
...
...
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
9f1b0558
...
...
@@ -308,6 +308,7 @@ typedef struct {
int16_t
hashPrefix
;
int16_t
hashSuffix
;
int16_t
sstTrigger
;
int32_t
tsdbPageSize
;
int32_t
numOfRetensions
;
SArray
*
pRetensions
;
int32_t
walRetentionPeriod
;
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
9f1b0558
...
...
@@ -31,7 +31,7 @@
#include "systable.h"
#define DB_VER_NUMBER 1
#define DB_RESERVE_SIZE 5
8
#define DB_RESERVE_SIZE 5
4
static
SSdbRaw
*
mndDbActionEncode
(
SDbObj
*
pDb
);
static
SSdbRow
*
mndDbActionDecode
(
SSdbRaw
*
pRaw
);
...
...
@@ -128,6 +128,7 @@ static SSdbRaw *mndDbActionEncode(SDbObj *pDb) {
SDB_SET_INT16
(
pRaw
,
dataPos
,
pDb
->
cfg
.
sstTrigger
,
_OVER
)
SDB_SET_INT16
(
pRaw
,
dataPos
,
pDb
->
cfg
.
hashPrefix
,
_OVER
)
SDB_SET_INT16
(
pRaw
,
dataPos
,
pDb
->
cfg
.
hashSuffix
,
_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pDb
->
cfg
.
tsdbPageSize
,
_OVER
)
SDB_SET_RESERVE
(
pRaw
,
dataPos
,
DB_RESERVE_SIZE
,
_OVER
)
SDB_SET_DATALEN
(
pRaw
,
dataPos
,
_OVER
)
...
...
@@ -214,10 +215,20 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) {
SDB_GET_INT16
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
sstTrigger
,
_OVER
)
SDB_GET_INT16
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
hashPrefix
,
_OVER
)
SDB_GET_INT16
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
hashSuffix
,
_OVER
)
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
tsdbPageSize
,
_OVER
)
SDB_GET_RESERVE
(
pRaw
,
dataPos
,
DB_RESERVE_SIZE
,
_OVER
)
taosInitRWLatch
(
&
pDb
->
lock
);
if
(
pDb
->
cfg
.
tsdbPageSize
<=
TSDB_MIN_TSDB_PAGESIZE
)
{
mInfo
(
"db:%s, tsdbPageSize set from %d to default %d"
,
pDb
->
name
,
pDb
->
cfg
.
tsdbPageSize
,
TSDB_DEFAULT_TSDB_PAGESIZE
);
}
if
(
pDb
->
cfg
.
sstTrigger
<=
TSDB_MIN_STT_TRIGGER
)
{
mInfo
(
"db:%s, sstTrigger set from %d to default %d"
,
pDb
->
name
,
pDb
->
cfg
.
sstTrigger
,
TSDB_DEFAULT_SST_TRIGGER
);
}
terrno
=
0
;
_OVER:
...
...
@@ -262,6 +273,7 @@ static int32_t mndDbActionUpdate(SSdb *pSdb, SDbObj *pOld, SDbObj *pNew) {
pOld
->
cfg
.
cacheLast
=
pNew
->
cfg
.
cacheLast
;
pOld
->
cfg
.
replications
=
pNew
->
cfg
.
replications
;
pOld
->
cfg
.
sstTrigger
=
pNew
->
cfg
.
sstTrigger
;
pOld
->
cfg
.
tsdbPageSize
=
pNew
->
cfg
.
tsdbPageSize
;
taosWUnLockLatch
(
&
pOld
->
lock
);
return
0
;
}
...
...
@@ -341,6 +353,7 @@ static int32_t mndCheckDbCfg(SMnode *pMnode, SDbCfg *pCfg) {
if
(
pCfg
->
sstTrigger
<
TSDB_MIN_STT_TRIGGER
||
pCfg
->
sstTrigger
>
TSDB_MAX_STT_TRIGGER
)
return
-
1
;
if
(
pCfg
->
hashPrefix
<
TSDB_MIN_HASH_PREFIX
||
pCfg
->
hashPrefix
>
TSDB_MAX_HASH_PREFIX
)
return
-
1
;
if
(
pCfg
->
hashSuffix
<
TSDB_MIN_HASH_SUFFIX
||
pCfg
->
hashSuffix
>
TSDB_MAX_HASH_SUFFIX
)
return
-
1
;
if
(
pCfg
->
tsdbPageSize
<
TSDB_MIN_TSDB_PAGESIZE
||
pCfg
->
tsdbPageSize
>
TSDB_MAX_TSDB_PAGESIZE
)
return
-
1
;
terrno
=
0
;
return
terrno
;
...
...
@@ -377,6 +390,7 @@ static void mndSetDefaultDbCfg(SDbCfg *pCfg) {
if
(
pCfg
->
sstTrigger
<=
0
)
pCfg
->
sstTrigger
=
TSDB_DEFAULT_SST_TRIGGER
;
if
(
pCfg
->
hashPrefix
<
0
)
pCfg
->
hashPrefix
=
TSDB_DEFAULT_HASH_PREFIX
;
if
(
pCfg
->
hashSuffix
<
0
)
pCfg
->
hashSuffix
=
TSDB_DEFAULT_HASH_SUFFIX
;
if
(
pCfg
->
tsdbPageSize
<=
0
)
pCfg
->
tsdbPageSize
=
TSDB_DEFAULT_TSDB_PAGESIZE
;
}
static
int32_t
mndSetCreateDbRedoLogs
(
SMnode
*
pMnode
,
STrans
*
pTrans
,
SDbObj
*
pDb
,
SVgObj
*
pVgroups
)
{
...
...
@@ -496,6 +510,7 @@ static int32_t mndCreateDb(SMnode *pMnode, SRpcMsg *pReq, SCreateDbReq *pCreate,
.
sstTrigger
=
pCreate
->
sstTrigger
,
.
hashPrefix
=
pCreate
->
hashPrefix
,
.
hashSuffix
=
pCreate
->
hashSuffix
,
.
tsdbPageSize
=
pCreate
->
tsdbPageSize
,
};
dbObj
.
cfg
.
numOfRetensions
=
pCreate
->
numOfRetensions
;
...
...
@@ -1726,6 +1741,9 @@ static void mndDumpDbInfoData(SMnode *pMnode, SSDataBlock *pBlock, SDbObj *pDb,
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
rows
,
(
const
char
*
)
&
pDb
->
cfg
.
hashSuffix
,
false
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
rows
,
(
const
char
*
)
&
pDb
->
cfg
.
tsdbPageSize
,
false
);
}
taosMemoryFree
(
buf
);
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
9f1b0558
...
...
@@ -237,6 +237,7 @@ void *mndBuildCreateVnodeReq(SMnode *pMnode, SDnodeObj *pDnode, SDbObj *pDb, SVg
createReq
.
sstTrigger
=
pDb
->
cfg
.
sstTrigger
;
createReq
.
hashPrefix
=
pDb
->
cfg
.
hashPrefix
;
createReq
.
hashSuffix
=
pDb
->
cfg
.
hashSuffix
;
createReq
.
tsdbPageSize
=
pDb
->
cfg
.
tsdbPageSize
;
for
(
int32_t
v
=
0
;
v
<
pVgroup
->
replica
;
++
v
)
{
SReplica
*
pReplica
=
&
createReq
.
replicas
[
v
];
...
...
source/dnode/vnode/src/vnd/vnodeCfg.c
浏览文件 @
9f1b0558
...
...
@@ -115,6 +115,7 @@ int vnodeEncodeConfig(const void *pObj, SJson *pJson) {
if
(
tjsonAddIntegerToObject
(
pJson
,
"hashMethod"
,
pCfg
->
hashMethod
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"hashPrefix"
,
pCfg
->
hashPrefix
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"hashSuffix"
,
pCfg
->
hashSuffix
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"tsdbPageSize"
,
pCfg
->
tsdbPageSize
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"syncCfg.replicaNum"
,
pCfg
->
syncCfg
.
replicaNum
)
<
0
)
return
-
1
;
if
(
tjsonAddIntegerToObject
(
pJson
,
"syncCfg.myIndex"
,
pCfg
->
syncCfg
.
myIndex
)
<
0
)
return
-
1
;
...
...
@@ -215,7 +216,7 @@ int vnodeDecodeConfig(const SJson *pJson, void *pObj) {
tjsonGetNumberValue
(
pJson
,
"wal.level"
,
pCfg
->
walCfg
.
level
,
code
);
if
(
code
<
0
)
return
-
1
;
tjsonGetNumberValue
(
pJson
,
"sstTrigger"
,
pCfg
->
sttTrigger
,
code
);
if
(
code
<
0
)
return
-
1
;
if
(
code
<
0
)
pCfg
->
sttTrigger
=
TSDB_DEFAULT_SST_TRIGGER
;
tjsonGetNumberValue
(
pJson
,
"hashBegin"
,
pCfg
->
hashBegin
,
code
);
if
(
code
<
0
)
return
-
1
;
tjsonGetNumberValue
(
pJson
,
"hashEnd"
,
pCfg
->
hashEnd
,
code
);
...
...
@@ -223,9 +224,9 @@ int vnodeDecodeConfig(const SJson *pJson, void *pObj) {
tjsonGetNumberValue
(
pJson
,
"hashMethod"
,
pCfg
->
hashMethod
,
code
);
if
(
code
<
0
)
return
-
1
;
tjsonGetNumberValue
(
pJson
,
"hashPrefix"
,
pCfg
->
hashPrefix
,
code
);
if
(
code
<
0
)
return
-
1
;
if
(
code
<
0
)
pCfg
->
hashPrefix
=
TSDB_DEFAULT_HASH_PREFIX
;
tjsonGetNumberValue
(
pJson
,
"hashSuffix"
,
pCfg
->
hashSuffix
,
code
);
if
(
code
<
0
)
return
-
1
;
if
(
code
<
0
)
pCfg
->
hashSuffix
=
TSDB_DEFAULT_HASH_SUFFIX
;
tjsonGetNumberValue
(
pJson
,
"syncCfg.replicaNum"
,
pCfg
->
syncCfg
.
replicaNum
,
code
);
if
(
code
<
0
)
return
-
1
;
...
...
@@ -255,6 +256,7 @@ int vnodeDecodeConfig(const SJson *pJson, void *pObj) {
}
tjsonGetNumberValue
(
pJson
,
"tsdbPageSize"
,
pCfg
->
tsdbPageSize
,
code
);
if
(
code
<
0
)
pCfg
->
tsdbPageSize
=
TSDB_DEFAULT_TSDB_PAGESIZE
*
1024
;
return
0
;
}
...
...
source/libs/tdb/src/db/tdbPager.c
浏览文件 @
9f1b0558
...
...
@@ -185,10 +185,10 @@ int tdbPagerWrite(SPager *pPager, SPage *pPage) {
// ref page one more time so the page will not be release
tdbRefPage
(
pPage
);
tdbDebug
(
"pcache/mdirty page %p/%d/%d"
,
pPage
,
TDB_PAGE_PGNO
(
pPage
),
pPage
->
id
);
/*
// Set page as dirty
pPage
->
isDirty
=
1
;
/*
// Add page to dirty list(TODO: NOT use O(n^2) algorithm)
for (ppPage = &pPager->pDirty; (*ppPage) && TDB_PAGE_PGNO(*ppPage) < TDB_PAGE_PGNO(pPage);
ppPage = &((*ppPage)->pDirtyNext)) {
...
...
@@ -260,6 +260,7 @@ int tdbPagerCommit(SPager *pPager, TXN *pTxn) {
pPage
->
isDirty
=
0
;
// tRBTreeDrop(&pPager->rbt, (SRBTreeNode *)pPage);
tdbPCacheRelease
(
pPager
->
pCache
,
pPage
,
pTxn
);
}
...
...
@@ -345,15 +346,19 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) {
}
*/
// 3, release the dirty pages
for
(
pPage
=
pPager
->
pDirty
;
pPage
;
pPage
=
pPager
->
pDirty
)
{
pPager
->
pDirty
=
pPage
->
pDirtyNext
;
pPage
->
pDirtyNext
=
NULL
;
SRBTreeIter
iter
=
tRBTreeIterCreate
(
&
pPager
->
rbt
,
1
);
SRBTreeNode
*
pNode
=
NULL
;
while
((
pNode
=
tRBTreeIterNext
(
&
iter
))
!=
NULL
)
{
pPage
=
(
SPage
*
)
pNode
;
pPage
->
isDirty
=
0
;
// tRBTreeDrop(&pPager->rbt, (SRBTreeNode *)pPage);
tdbPCacheRelease
(
pPager
->
pCache
,
pPage
,
pTxn
);
}
tRBTreeCreate
(
&
pPager
->
rbt
,
pageCmpFn
);
// 4, remove the journal file
tdbOsClose
(
pPager
->
jfd
);
tdbOsRemove
(
pPager
->
jFileName
);
...
...
tests/system-test/1-insert/delete_data.py
浏览文件 @
9f1b0558
...
...
@@ -81,6 +81,7 @@ class TDTestCase:
'binary'
:
self
.
binary_val
,
'nchar'
:
self
.
nchar_val
}
def
insert_base_data
(
self
,
col_type
,
tbname
,
rows
,
base_data
):
for
i
in
range
(
rows
):
if
col_type
.
lower
()
==
'tinyint'
:
...
...
@@ -290,6 +291,9 @@ class TDTestCase:
self
.
delete_data_ntb
()
self
.
delete_data_ctb
()
self
.
delete_data_stb
()
tdDnodes
.
stoptaosd
(
1
)
tdDnodes
.
starttaosd
(
1
)
self
.
delete_data_ntb
()
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/system-test/1-insert/update_data.py
浏览文件 @
9f1b0558
...
...
@@ -154,10 +154,12 @@ class TDTestCase:
up_bool
=
random
.
randint
(
0
,
100
)
%
2
up_float
=
random
.
uniform
(
constant
.
FLOAT_MIN
,
constant
.
FLOAT_MAX
)
up_double
=
random
.
uniform
(
constant
.
DOUBLE_MIN
*
(
1E-300
),
constant
.
DOUBLE_MAX
*
(
1E-300
))
binary_length
=
random
.
randint
(
0
,
self
.
str_length
)
nchar_length
=
random
.
randint
(
0
,
self
.
str_length
)
up_binary
=
tdCom
.
getLongName
(
binary_length
)
up_nchar
=
tdCom
.
getLongName
(
nchar_length
)
binary_length
=
[]
for
i
in
range
(
self
.
str_length
+
1
):
binary_length
.
append
(
i
)
nchar_length
=
[]
for
i
in
range
(
self
.
str_length
+
1
):
nchar_length
.
append
(
i
)
for
col_name
,
col_type
in
column_dict
.
items
():
if
tb_type
==
'ntb'
:
tdSql
.
execute
(
f
'create table
{
tbname
}
(ts timestamp,
{
col_name
}
{
col_type
}
)'
)
...
...
@@ -188,9 +190,13 @@ class TDTestCase:
elif
col_type
.
lower
()
==
'double'
:
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_double
,
dbname
)
elif
'binary'
in
col_type
.
lower
():
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_binary
,
dbname
)
for
i
in
binary_length
:
up_binary
=
tdCom
.
getLongName
(
i
)
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_binary
,
dbname
)
elif
'nchar'
in
col_type
.
lower
():
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_nchar
,
dbname
)
for
i
in
nchar_length
:
up_nchar
=
tdCom
.
getLongName
(
i
)
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_nchar
,
dbname
)
elif
col_type
.
lower
()
==
'timestamp'
:
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
self
.
ts
+
1
,
dbname
)
tdSql
.
execute
(
f
'insert into
{
tbname
}
values(
{
self
.
ts
}
,null)'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录