Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
dedbb754
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
dedbb754
编写于
7月 20, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/td-4647-2
上级
ff7aec3b
e8b3fde4
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
342 addition
and
340 deletion
+342
-340
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+195
-193
tests/pytest/query/query1970YearsAf.py
tests/pytest/query/query1970YearsAf.py
+4
-4
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
...ytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
+27
-27
tests/pytest/tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
.../tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
+19
-19
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
...ytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
+77
-77
tests/pytest/tools/taosdemoTest.py
tests/pytest/tools/taosdemoTest.py
+2
-2
tests/pytest/wal/sdbComp.py
tests/pytest/wal/sdbComp.py
+18
-18
未找到文件。
src/kit/taosdemo/taosdemo.c
浏览文件 @
dedbb754
...
@@ -71,8 +71,8 @@ extern char configDir[];
...
@@ -71,8 +71,8 @@ extern char configDir[];
#define HEAD_BUFF_LEN TSDB_MAX_COLUMNS*24 // 16*MAX_COLUMNS + (192+32)*2 + insert into ..
#define HEAD_BUFF_LEN TSDB_MAX_COLUMNS*24 // 16*MAX_COLUMNS + (192+32)*2 + insert into ..
#define
MAX_SQL_SIZE 65536
#define
COL_BUFFER_LEN (TSDB_MAX_BYTES_PER_ROW - 50)
#define BUFFER_SIZE
(65536*2
)
#define BUFFER_SIZE
(50 + TSDB_DB_NAME_LEN + TSDB_TABLE_NAME_LEN + TSDB_MAX_BYTES_PER_ROW + TSDB_MAX_TAGS_LEN
)
#define COND_BUF_LEN (BUFFER_SIZE - 30)
#define COND_BUF_LEN (BUFFER_SIZE - 30)
#define MAX_USERNAME_SIZE 64
#define MAX_USERNAME_SIZE 64
#define MAX_PASSWORD_SIZE 64
#define MAX_PASSWORD_SIZE 64
...
@@ -80,7 +80,6 @@ extern char configDir[];
...
@@ -80,7 +80,6 @@ extern char configDir[];
#define MAX_TB_NAME_SIZE 64
#define MAX_TB_NAME_SIZE 64
#define MAX_DATA_SIZE (16*TSDB_MAX_COLUMNS)+20 // max record len: 16*MAX_COLUMNS, timestamp string and ,('') need extra space
#define MAX_DATA_SIZE (16*TSDB_MAX_COLUMNS)+20 // max record len: 16*MAX_COLUMNS, timestamp string and ,('') need extra space
#define OPT_ABORT 1
/* –abort */
#define OPT_ABORT 1
/* –abort */
#define STRING_LEN 60000
#define MAX_PREPARED_RAND 1000000
#define MAX_PREPARED_RAND 1000000
#define MAX_FILE_NAME_LEN 256 // max file name length on linux is 255.
#define MAX_FILE_NAME_LEN 256 // max file name length on linux is 255.
...
@@ -2707,7 +2706,7 @@ static int createSuperTable(
...
@@ -2707,7 +2706,7 @@ static int createSuperTable(
char
command
[
BUFFER_SIZE
]
=
"
\0
"
;
char
command
[
BUFFER_SIZE
]
=
"
\0
"
;
char
cols
[
STRING
_LEN
]
=
"
\0
"
;
char
cols
[
COL_BUFFER
_LEN
]
=
"
\0
"
;
int
colIndex
;
int
colIndex
;
int
len
=
0
;
int
len
=
0
;
...
@@ -2723,55 +2722,55 @@ static int createSuperTable(
...
@@ -2723,55 +2722,55 @@ static int createSuperTable(
char
*
dataType
=
superTbl
->
columns
[
colIndex
].
dataType
;
char
*
dataType
=
superTbl
->
columns
[
colIndex
].
dataType
;
if
(
strcasecmp
(
dataType
,
"BINARY"
)
==
0
)
{
if
(
strcasecmp
(
dataType
,
"BINARY"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING
_LEN
-
len
,
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER
_LEN
-
len
,
",
col
%d %s(%d)"
,
colIndex
,
"BINARY"
,
",
C
%d %s(%d)"
,
colIndex
,
"BINARY"
,
superTbl
->
columns
[
colIndex
].
dataLen
);
superTbl
->
columns
[
colIndex
].
dataLen
);
lenOfOneRow
+=
superTbl
->
columns
[
colIndex
].
dataLen
+
3
;
lenOfOneRow
+=
superTbl
->
columns
[
colIndex
].
dataLen
+
3
;
}
else
if
(
strcasecmp
(
dataType
,
"NCHAR"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"NCHAR"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING
_LEN
-
len
,
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER
_LEN
-
len
,
",
col
%d %s(%d)"
,
colIndex
,
"NCHAR"
,
",
C
%d %s(%d)"
,
colIndex
,
"NCHAR"
,
superTbl
->
columns
[
colIndex
].
dataLen
);
superTbl
->
columns
[
colIndex
].
dataLen
);
lenOfOneRow
+=
superTbl
->
columns
[
colIndex
].
dataLen
+
3
;
lenOfOneRow
+=
superTbl
->
columns
[
colIndex
].
dataLen
+
3
;
}
else
if
(
strcasecmp
(
dataType
,
"INT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"INT"
)
==
0
)
{
if
((
g_args
.
demo_mode
)
&&
(
colIndex
==
1
))
{
if
((
g_args
.
demo_mode
)
&&
(
colIndex
==
1
))
{
len
+=
snprintf
(
cols
+
len
,
STRING
_LEN
-
len
,
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER
_LEN
-
len
,
", VOLTAGE INT"
);
", VOLTAGE INT"
);
}
else
{
}
else
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col
%d %s"
,
colIndex
,
"INT"
);
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER_LEN
-
len
,
", C
%d %s"
,
colIndex
,
"INT"
);
}
}
lenOfOneRow
+=
11
;
lenOfOneRow
+=
11
;
}
else
if
(
strcasecmp
(
dataType
,
"BIGINT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"BIGINT"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col
%d %s"
,
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER_LEN
-
len
,
", C
%d %s"
,
colIndex
,
"BIGINT"
);
colIndex
,
"BIGINT"
);
lenOfOneRow
+=
21
;
lenOfOneRow
+=
21
;
}
else
if
(
strcasecmp
(
dataType
,
"SMALLINT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"SMALLINT"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col
%d %s"
,
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER_LEN
-
len
,
", C
%d %s"
,
colIndex
,
"SMALLINT"
);
colIndex
,
"SMALLINT"
);
lenOfOneRow
+=
6
;
lenOfOneRow
+=
6
;
}
else
if
(
strcasecmp
(
dataType
,
"TINYINT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"TINYINT"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col
%d %s"
,
colIndex
,
"TINYINT"
);
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER_LEN
-
len
,
", C
%d %s"
,
colIndex
,
"TINYINT"
);
lenOfOneRow
+=
4
;
lenOfOneRow
+=
4
;
}
else
if
(
strcasecmp
(
dataType
,
"BOOL"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"BOOL"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col
%d %s"
,
colIndex
,
"BOOL"
);
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER_LEN
-
len
,
", C
%d %s"
,
colIndex
,
"BOOL"
);
lenOfOneRow
+=
6
;
lenOfOneRow
+=
6
;
}
else
if
(
strcasecmp
(
dataType
,
"FLOAT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"FLOAT"
)
==
0
)
{
if
(
g_args
.
demo_mode
)
{
if
(
g_args
.
demo_mode
)
{
if
(
colIndex
==
0
)
{
if
(
colIndex
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING
_LEN
-
len
,
", CURRENT FLOAT"
);
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER
_LEN
-
len
,
", CURRENT FLOAT"
);
}
else
if
(
colIndex
==
2
)
{
}
else
if
(
colIndex
==
2
)
{
len
+=
snprintf
(
cols
+
len
,
STRING
_LEN
-
len
,
", PHASE FLOAT"
);
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER
_LEN
-
len
,
", PHASE FLOAT"
);
}
}
}
else
{
}
else
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col
%d %s"
,
colIndex
,
"FLOAT"
);
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER_LEN
-
len
,
", C
%d %s"
,
colIndex
,
"FLOAT"
);
}
}
lenOfOneRow
+=
22
;
lenOfOneRow
+=
22
;
}
else
if
(
strcasecmp
(
dataType
,
"DOUBLE"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"DOUBLE"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col
%d %s"
,
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER_LEN
-
len
,
", C
%d %s"
,
colIndex
,
"DOUBLE"
);
colIndex
,
"DOUBLE"
);
lenOfOneRow
+=
42
;
lenOfOneRow
+=
42
;
}
else
if
(
strcasecmp
(
dataType
,
"TIMESTAMP"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"TIMESTAMP"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col
%d %s"
,
len
+=
snprintf
(
cols
+
len
,
COL_BUFFER_LEN
-
len
,
", C
%d %s"
,
colIndex
,
"TIMESTAMP"
);
colIndex
,
"TIMESTAMP"
);
lenOfOneRow
+=
21
;
lenOfOneRow
+=
21
;
}
else
{
}
else
{
...
@@ -2803,60 +2802,63 @@ static int createSuperTable(
...
@@ -2803,60 +2802,63 @@ static int createSuperTable(
return
-
1
;
return
-
1
;
}
}
char
tags
[
STRING
_LEN
]
=
"
\0
"
;
char
tags
[
TSDB_MAX_TAGS
_LEN
]
=
"
\0
"
;
int
tagIndex
;
int
tagIndex
;
len
=
0
;
len
=
0
;
int
lenOfTagOfOneRow
=
0
;
int
lenOfTagOfOneRow
=
0
;
len
+=
snprintf
(
tags
+
len
,
STRING
_LEN
-
len
,
"("
);
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS
_LEN
-
len
,
"("
);
for
(
tagIndex
=
0
;
tagIndex
<
superTbl
->
tagCount
;
tagIndex
++
)
{
for
(
tagIndex
=
0
;
tagIndex
<
superTbl
->
tagCount
;
tagIndex
++
)
{
char
*
dataType
=
superTbl
->
tags
[
tagIndex
].
dataType
;
char
*
dataType
=
superTbl
->
tags
[
tagIndex
].
dataType
;
if
(
strcasecmp
(
dataType
,
"BINARY"
)
==
0
)
{
if
(
strcasecmp
(
dataType
,
"BINARY"
)
==
0
)
{
if
((
g_args
.
demo_mode
)
&&
(
tagIndex
==
1
))
{
if
((
g_args
.
demo_mode
)
&&
(
tagIndex
==
1
))
{
len
+=
snprintf
(
tags
+
len
,
STRING
_LEN
-
len
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS
_LEN
-
len
,
"location BINARY(%d), "
,
"location BINARY(%d), "
,
superTbl
->
tags
[
tagIndex
].
dataLen
);
superTbl
->
tags
[
tagIndex
].
dataLen
);
}
else
{
}
else
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s(%d), "
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
tagIndex
,
"BINARY"
,
superTbl
->
tags
[
tagIndex
].
dataLen
);
"t%d %s(%d), "
,
tagIndex
,
"BINARY"
,
superTbl
->
tags
[
tagIndex
].
dataLen
);
}
}
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
3
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
3
;
}
else
if
(
strcasecmp
(
dataType
,
"NCHAR"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"NCHAR"
)
==
0
)
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s(%d), "
,
tagIndex
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"t%d %s(%d), "
,
tagIndex
,
"NCHAR"
,
superTbl
->
tags
[
tagIndex
].
dataLen
);
"NCHAR"
,
superTbl
->
tags
[
tagIndex
].
dataLen
);
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
3
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
3
;
}
else
if
(
strcasecmp
(
dataType
,
"INT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"INT"
)
==
0
)
{
if
((
g_args
.
demo_mode
)
&&
(
tagIndex
==
0
))
{
if
((
g_args
.
demo_mode
)
&&
(
tagIndex
==
0
))
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"groupId INT, "
);
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"groupId INT, "
);
}
else
{
}
else
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s, "
,
tagIndex
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"INT"
);
"t%d %s, "
,
tagIndex
,
"INT"
);
}
}
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
11
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
11
;
}
else
if
(
strcasecmp
(
dataType
,
"BIGINT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"BIGINT"
)
==
0
)
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s, "
,
tagIndex
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"BIGINT"
);
"
t%d %s, "
,
tagIndex
,
"
BIGINT"
);
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
21
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
21
;
}
else
if
(
strcasecmp
(
dataType
,
"SMALLINT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"SMALLINT"
)
==
0
)
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s, "
,
tagIndex
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"SMALLINT"
);
"
t%d %s, "
,
tagIndex
,
"
SMALLINT"
);
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
6
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
6
;
}
else
if
(
strcasecmp
(
dataType
,
"TINYINT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"TINYINT"
)
==
0
)
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s, "
,
tagIndex
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"TINYINT"
);
"
t%d %s, "
,
tagIndex
,
"
TINYINT"
);
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
4
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
4
;
}
else
if
(
strcasecmp
(
dataType
,
"BOOL"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"BOOL"
)
==
0
)
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s, "
,
tagIndex
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"BOOL"
);
"
t%d %s, "
,
tagIndex
,
"
BOOL"
);
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
6
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
6
;
}
else
if
(
strcasecmp
(
dataType
,
"FLOAT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"FLOAT"
)
==
0
)
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s, "
,
tagIndex
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"FLOAT"
);
"
t%d %s, "
,
tagIndex
,
"
FLOAT"
);
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
22
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
22
;
}
else
if
(
strcasecmp
(
dataType
,
"DOUBLE"
)
==
0
)
{
}
else
if
(
strcasecmp
(
dataType
,
"DOUBLE"
)
==
0
)
{
len
+=
snprintf
(
tags
+
len
,
STRING_LEN
-
len
,
"t%d %s, "
,
tagIndex
,
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS_LEN
-
len
,
"DOUBLE"
);
"
t%d %s, "
,
tagIndex
,
"
DOUBLE"
);
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
42
;
lenOfTagOfOneRow
+=
superTbl
->
tags
[
tagIndex
].
dataLen
+
42
;
}
else
{
}
else
{
taos_close
(
taos
);
taos_close
(
taos
);
...
@@ -2867,7 +2869,7 @@ static int createSuperTable(
...
@@ -2867,7 +2869,7 @@ static int createSuperTable(
}
}
len
-=
2
;
len
-=
2
;
len
+=
snprintf
(
tags
+
len
,
STRING
_LEN
-
len
,
")"
);
len
+=
snprintf
(
tags
+
len
,
TSDB_MAX_TAGS
_LEN
-
len
,
")"
);
superTbl
->
lenOfTagOfOneRow
=
lenOfTagOfOneRow
;
superTbl
->
lenOfTagOfOneRow
=
lenOfTagOfOneRow
;
...
@@ -3026,7 +3028,7 @@ static void* createTable(void *sarg)
...
@@ -3026,7 +3028,7 @@ static void* createTable(void *sarg)
uint64_t
lastPrintTime
=
taosGetTimestampMs
();
uint64_t
lastPrintTime
=
taosGetTimestampMs
();
int
buff_len
;
int
buff_len
;
buff_len
=
BUFFER_SIZE
/
8
;
buff_len
=
BUFFER_SIZE
;
pThreadInfo
->
buffer
=
calloc
(
buff_len
,
1
);
pThreadInfo
->
buffer
=
calloc
(
buff_len
,
1
);
if
(
pThreadInfo
->
buffer
==
NULL
)
{
if
(
pThreadInfo
->
buffer
==
NULL
)
{
...
@@ -3188,7 +3190,7 @@ static int startMultiThreadCreateChildTable(
...
@@ -3188,7 +3190,7 @@ static int startMultiThreadCreateChildTable(
}
}
static
void
createChildTables
()
{
static
void
createChildTables
()
{
char
tblColsBuf
[
MAX_SQL_SIZE
];
char
tblColsBuf
[
TSDB_MAX_BYTES_PER_ROW
];
int
len
;
int
len
;
for
(
int
i
=
0
;
i
<
g_Dbs
.
dbCount
;
i
++
)
{
for
(
int
i
=
0
;
i
<
g_Dbs
.
dbCount
;
i
++
)
{
...
@@ -3220,21 +3222,21 @@ static void createChildTables() {
...
@@ -3220,21 +3222,21 @@ static void createChildTables() {
}
}
}
else
{
}
else
{
// normal table
// normal table
len
=
snprintf
(
tblColsBuf
,
MAX_SQL_SIZE
,
"(TS TIMESTAMP"
);
len
=
snprintf
(
tblColsBuf
,
TSDB_MAX_BYTES_PER_ROW
,
"(TS TIMESTAMP"
);
for
(
int
j
=
0
;
j
<
g_args
.
num_of_CPR
;
j
++
)
{
for
(
int
j
=
0
;
j
<
g_args
.
num_of_CPR
;
j
++
)
{
if
((
strncasecmp
(
g_args
.
datatype
[
j
],
"BINARY"
,
strlen
(
"BINARY"
))
==
0
)
if
((
strncasecmp
(
g_args
.
datatype
[
j
],
"BINARY"
,
strlen
(
"BINARY"
))
==
0
)
||
(
strncasecmp
(
g_args
.
datatype
[
j
],
||
(
strncasecmp
(
g_args
.
datatype
[
j
],
"NCHAR"
,
strlen
(
"NCHAR"
))
==
0
))
{
"NCHAR"
,
strlen
(
"NCHAR"
))
==
0
))
{
snprintf
(
tblColsBuf
+
len
,
MAX_SQL_SIZE
-
len
,
snprintf
(
tblColsBuf
+
len
,
TSDB_MAX_BYTES_PER_ROW
-
len
,
",
COL
%d %s(%d)"
,
j
,
g_args
.
datatype
[
j
],
g_args
.
len_of_binary
);
",
C
%d %s(%d)"
,
j
,
g_args
.
datatype
[
j
],
g_args
.
len_of_binary
);
}
else
{
}
else
{
snprintf
(
tblColsBuf
+
len
,
MAX_SQL_SIZE
-
len
,
snprintf
(
tblColsBuf
+
len
,
TSDB_MAX_BYTES_PER_ROW
-
len
,
",
COL
%d %s"
,
j
,
g_args
.
datatype
[
j
]);
",
C
%d %s"
,
j
,
g_args
.
datatype
[
j
]);
}
}
len
=
strlen
(
tblColsBuf
);
len
=
strlen
(
tblColsBuf
);
}
}
snprintf
(
tblColsBuf
+
len
,
MAX_SQL_SIZE
-
len
,
")"
);
snprintf
(
tblColsBuf
+
len
,
TSDB_MAX_BYTES_PER_ROW
-
len
,
")"
);
verbosePrint
(
"%s() LN%d: dbName: %s num of tb: %"
PRId64
" schema: %s
\n
"
,
verbosePrint
(
"%s() LN%d: dbName: %s num of tb: %"
PRId64
" schema: %s
\n
"
,
__func__
,
__LINE__
,
__func__
,
__LINE__
,
...
@@ -7986,7 +7988,7 @@ static void initOfQueryMeta() {
...
@@ -7986,7 +7988,7 @@ static void initOfQueryMeta() {
tstrncpy
(
g_queryInfo
.
password
,
TSDB_DEFAULT_PASS
,
MAX_PASSWORD_SIZE
);
tstrncpy
(
g_queryInfo
.
password
,
TSDB_DEFAULT_PASS
,
MAX_PASSWORD_SIZE
);
}
}
static
void
setParaFromArg
(){
static
void
setParaFromArg
()
{
if
(
g_args
.
host
)
{
if
(
g_args
.
host
)
{
tstrncpy
(
g_Dbs
.
host
,
g_args
.
host
,
MAX_HOSTNAME_SIZE
);
tstrncpy
(
g_Dbs
.
host
,
g_args
.
host
,
MAX_HOSTNAME_SIZE
);
}
else
{
}
else
{
...
@@ -8022,10 +8024,10 @@ static void setParaFromArg(){
...
@@ -8022,10 +8024,10 @@ static void setParaFromArg(){
g_Dbs
.
do_aggreFunc
=
true
;
g_Dbs
.
do_aggreFunc
=
true
;
char
dataString
[
STRING_LEN
];
char
dataString
[
TSDB_MAX_BYTES_PER_ROW
];
char
**
data_type
=
g_args
.
datatype
;
char
**
data_type
=
g_args
.
datatype
;
memset
(
dataString
,
0
,
STRING_LEN
);
memset
(
dataString
,
0
,
TSDB_MAX_BYTES_PER_ROW
);
if
(
strcasecmp
(
data_type
[
0
],
"BINARY"
)
==
0
if
(
strcasecmp
(
data_type
[
0
],
"BINARY"
)
==
0
||
strcasecmp
(
data_type
[
0
],
"BOOL"
)
==
0
||
strcasecmp
(
data_type
[
0
],
"BOOL"
)
==
0
...
@@ -8143,7 +8145,7 @@ static void querySqlFile(TAOS* taos, char* sqlFile)
...
@@ -8143,7 +8145,7 @@ static void querySqlFile(TAOS* taos, char* sqlFile)
}
}
int
read_len
=
0
;
int
read_len
=
0
;
char
*
cmd
=
calloc
(
1
,
MAX_SQL_SIZE
);
char
*
cmd
=
calloc
(
1
,
TSDB_MAX_BYTES_PER_ROW
);
size_t
cmd_len
=
0
;
size_t
cmd_len
=
0
;
char
*
line
=
NULL
;
char
*
line
=
NULL
;
size_t
line_len
=
0
;
size_t
line_len
=
0
;
...
@@ -8151,7 +8153,7 @@ static void querySqlFile(TAOS* taos, char* sqlFile)
...
@@ -8151,7 +8153,7 @@ static void querySqlFile(TAOS* taos, char* sqlFile)
double
t
=
taosGetTimestampMs
();
double
t
=
taosGetTimestampMs
();
while
((
read_len
=
tgetline
(
&
line
,
&
line_len
,
fp
))
!=
-
1
)
{
while
((
read_len
=
tgetline
(
&
line
,
&
line_len
,
fp
))
!=
-
1
)
{
if
(
read_len
>=
MAX_SQL_SIZE
)
continue
;
if
(
read_len
>=
TSDB_MAX_BYTES_PER_ROW
)
continue
;
line
[
--
read_len
]
=
'\0'
;
line
[
--
read_len
]
=
'\0'
;
if
(
read_len
==
0
||
isCommentLine
(
line
))
{
// line starts with #
if
(
read_len
==
0
||
isCommentLine
(
line
))
{
// line starts with #
...
@@ -8174,7 +8176,7 @@ static void querySqlFile(TAOS* taos, char* sqlFile)
...
@@ -8174,7 +8176,7 @@ static void querySqlFile(TAOS* taos, char* sqlFile)
tmfclose
(
fp
);
tmfclose
(
fp
);
return
;
return
;
}
}
memset
(
cmd
,
0
,
MAX_SQL_SIZE
);
memset
(
cmd
,
0
,
TSDB_MAX_BYTES_PER_ROW
);
cmd_len
=
0
;
cmd_len
=
0
;
}
}
...
...
tests/pytest/query/query1970YearsAf.py
浏览文件 @
dedbb754
...
@@ -194,12 +194,12 @@ class TDTestCase:
...
@@ -194,12 +194,12 @@ class TDTestCase:
tdSql
.
checkRows
(
680
)
tdSql
.
checkRows
(
680
)
tdSql
.
query
(
tdSql
.
query
(
"select diff(c
ol
1) from t0 where t0.ts >= '1970-01-01 00:00:00.000' "
"select diff(c1) from t0 where t0.ts >= '1970-01-01 00:00:00.000' "
)
)
tdSql
.
checkRows
(
679
)
tdSql
.
checkRows
(
679
)
tdSql
.
query
(
tdSql
.
query
(
"select t0,c
ol
1 from stb2 where stb2.ts < '1970-01-01 00:00:00.000' order by ts"
"select t0,c1 from stb2 where stb2.ts < '1970-01-01 00:00:00.000' order by ts"
)
)
tdSql
.
checkRows
(
43200
)
tdSql
.
checkRows
(
43200
)
...
...
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
浏览文件 @
dedbb754
...
@@ -76,7 +76,7 @@ class TDTestCase:
...
@@ -76,7 +76,7 @@ class TDTestCase:
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_100 values(%d, %d, %d,'test90.%s')'''
tdSql
.
execute
(
'''insert into stb00_100 values(%d, %d, %d,'test90.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test99%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test99%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_9999' limit 10"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_9999' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -86,7 +86,7 @@ class TDTestCase:
...
@@ -86,7 +86,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test98%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test98%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_8888' limit 10"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_8888' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -96,7 +96,7 @@ class TDTestCase:
...
@@ -96,7 +96,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test97%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test97%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_7777' limit 10"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_7777' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -106,7 +106,7 @@ class TDTestCase:
...
@@ -106,7 +106,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test96%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test96%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_6666' limit 10"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_6666' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -116,7 +116,7 @@ class TDTestCase:
...
@@ -116,7 +116,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test95%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test95%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_5555' limit 10"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_5555' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -126,7 +126,7 @@ class TDTestCase:
...
@@ -126,7 +126,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test94%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test94%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_4444' limit 10"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_4444' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -136,7 +136,7 @@ class TDTestCase:
...
@@ -136,7 +136,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test93%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test93%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_3333' limit 100"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_3333' limit 100"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -146,7 +146,7 @@ class TDTestCase:
...
@@ -146,7 +146,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test92%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test92%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_2222' limit 100"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_2222' limit 100"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -156,7 +156,7 @@ class TDTestCase:
...
@@ -156,7 +156,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test91%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test91%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_1111' limit 100"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_1111' limit 100"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
@@ -166,7 +166,7 @@ class TDTestCase:
...
@@ -166,7 +166,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where c
ol
2 like 'test90%' "
)
tdSql
.
query
(
"select * from stb0 where c2 like 'test90%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_100' limit 100"
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_100' limit 100"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
...
...
tests/pytest/tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
浏览文件 @
dedbb754
...
@@ -73,8 +73,8 @@ class TDTestCase:
...
@@ -73,8 +73,8 @@ class TDTestCase:
#regular table
#regular table
sql
=
"create table tb(ts timestamp, "
sql
=
"create table tb(ts timestamp, "
for
i
in
range
(
1022
):
for
i
in
range
(
1022
):
sql
+=
"c
ol
%d binary(14), "
%
(
i
+
1
)
sql
+=
"c%d binary(14), "
%
(
i
+
1
)
sql
+=
"c
ol1023 binary(22))"
sql
+=
"c
1023 binary(22))"
tdSql
.
execute
(
sql
)
tdSql
.
execute
(
sql
)
for
i
in
range
(
4
):
for
i
in
range
(
4
):
...
@@ -99,8 +99,8 @@ class TDTestCase:
...
@@ -99,8 +99,8 @@ class TDTestCase:
sql
=
"create table tb1(ts timestamp, "
sql
=
"create table tb1(ts timestamp, "
for
i
in
range
(
4094
):
for
i
in
range
(
4094
):
sql
+=
"c
ol
%d binary(14), "
%
(
i
+
1
)
sql
+=
"c%d binary(14), "
%
(
i
+
1
)
sql
+=
"c
ol4095 binary(22))"
sql
+=
"c
4095 binary(22))"
tdSql
.
execute
(
sql
)
tdSql
.
execute
(
sql
)
for
i
in
range
(
4
):
for
i
in
range
(
4
):
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
浏览文件 @
dedbb754
...
@@ -262,7 +262,7 @@ class TDTestCase:
...
@@ -262,7 +262,7 @@ class TDTestCase:
# insert: sample json
# insert: sample json
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-sample.json -y "
%
binPath
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-sample.json -y "
%
binPath
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
query
(
"select c
ol
2 from stb0"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
tdSql
.
query
(
"select * from stb1 where t1=-127"
)
tdSql
.
query
(
"select * from stb1 where t1=-127"
)
tdSql
.
checkRows
(
20
)
tdSql
.
checkRows
(
20
)
...
...
tests/pytest/tools/taosdemoTest.py
浏览文件 @
dedbb754
...
@@ -59,11 +59,11 @@ class TDTestCase:
...
@@ -59,11 +59,11 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
self
.
numberOfTables
*
self
.
numberOfRecords
)
tdSql
.
checkData
(
0
,
0
,
self
.
numberOfTables
*
self
.
numberOfRecords
)
tdSql
.
query
(
tdSql
.
query
(
"select sum(c
ol
1) from test.meters interval(1h) sliding(30m)"
)
"select sum(c1) from test.meters interval(1h) sliding(30m)"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
tdSql
.
query
(
"select apercentile(c
ol
1, 1) from test.meters interval(100s)"
)
"select apercentile(c1, 1) from test.meters interval(100s)"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
error
(
"select loc, count(loc) from test.meters"
)
tdSql
.
error
(
"select loc, count(loc) from test.meters"
)
...
...
tests/pytest/wal/sdbComp.py
浏览文件 @
dedbb754
...
@@ -72,14 +72,14 @@ class TDTestCase:
...
@@ -72,14 +72,14 @@ class TDTestCase:
tdSql
.
execute
(
"drop table if exists stb1_0"
)
tdSql
.
execute
(
"drop table if exists stb1_0"
)
tdSql
.
execute
(
"drop table if exists stb1_1"
)
tdSql
.
execute
(
"drop table if exists stb1_1"
)
tdSql
.
execute
(
"insert into stb0_0 values(1614218412000,8637,78.861045,'R','bf3')(1614218422000,8637,98.861045,'R','bf3')"
)
tdSql
.
execute
(
"insert into stb0_0 values(1614218412000,8637,78.861045,'R','bf3')(1614218422000,8637,98.861045,'R','bf3')"
)
tdSql
.
execute
(
"alter table db2.stb0 add column c
ol
4 int"
)
tdSql
.
execute
(
"alter table db2.stb0 add column c4 int"
)
tdSql
.
execute
(
"alter table db2.stb0 drop column c
ol
2"
)
tdSql
.
execute
(
"alter table db2.stb0 drop column c2"
)
tdSql
.
execute
(
"alter table db2.stb0 add tag t3 int;"
)
tdSql
.
execute
(
"alter table db2.stb0 add tag t3 int;"
)
tdSql
.
execute
(
"alter table db2.stb0 drop tag t1"
)
tdSql
.
execute
(
"alter table db2.stb0 drop tag t1"
)
tdSql
.
execute
(
"create table if not exists stb2_0 (ts timestamp, c
ol0 int, col
1 float) "
)
tdSql
.
execute
(
"create table if not exists stb2_0 (ts timestamp, c
0 int, c
1 float) "
)
tdSql
.
execute
(
"insert into stb2_0 values(1614218412000,8637,78.861045)"
)
tdSql
.
execute
(
"insert into stb2_0 values(1614218412000,8637,78.861045)"
)
tdSql
.
execute
(
"alter table stb2_0 add column c
ol
2 binary(4)"
)
tdSql
.
execute
(
"alter table stb2_0 add column c2 binary(4)"
)
tdSql
.
execute
(
"alter table stb2_0 drop column c
ol
1"
)
tdSql
.
execute
(
"alter table stb2_0 drop column c1"
)
tdSql
.
execute
(
"insert into stb2_0 values(1614218422000,8638,'R')"
)
tdSql
.
execute
(
"insert into stb2_0 values(1614218422000,8638,'R')"
)
# stop taosd and compact wal file
# stop taosd and compact wal file
...
@@ -112,7 +112,7 @@ class TDTestCase:
...
@@ -112,7 +112,7 @@ class TDTestCase:
# delete useless file
# delete useless file
testcaseFilename
=
os
.
path
.
split
(
__file__
)[
-
1
]
testcaseFilename
=
os
.
path
.
split
(
__file__
)[
-
1
]
os
.
system
(
"rm -rf ./insert_res.txt"
)
os
.
system
(
"rm -rf ./insert_res.txt"
)
os
.
system
(
"rm -rf wal/%s.sql"
%
testcaseFilename
)
os
.
system
(
"rm -rf wal/%s.sql"
%
testcaseFilename
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录