Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f740fd61
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f740fd61
编写于
6月 15, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: use 'duration' instead of 'days' for create database
上级
19ab15b1
变更
54
隐藏空白更改
内联
并排
Showing
54 changed file
with
94 addition
and
94 deletion
+94
-94
tests/pytest/alter/alter_replica.py
tests/pytest/alter/alter_replica.py
+1
-1
tests/pytest/functions/function_max.py
tests/pytest/functions/function_max.py
+1
-1
tests/pytest/functions/function_min.py
tests/pytest/functions/function_min.py
+1
-1
tests/pytest/functions/queryTestCases.py
tests/pytest/functions/queryTestCases.py
+1
-1
tests/pytest/insert/before_1970.py
tests/pytest/insert/before_1970.py
+1
-1
tests/pytest/insert/retentionpolicy.py
tests/pytest/insert/retentionpolicy.py
+1
-1
tests/pytest/multilevel/fileDistributionSameLevel.py
tests/pytest/multilevel/fileDistributionSameLevel.py
+2
-2
tests/pytest/multilevel/retentionTest.py
tests/pytest/multilevel/retentionTest.py
+1
-1
tests/pytest/perfbenchmark/bug3433.py
tests/pytest/perfbenchmark/bug3433.py
+1
-1
tests/pytest/perfbenchmark/joinPerformance.py
tests/pytest/perfbenchmark/joinPerformance.py
+1
-1
tests/pytest/perfbenchmark/taosdemoInsert.py
tests/pytest/perfbenchmark/taosdemoInsert.py
+1
-1
tests/pytest/query/query1970YearsAf.py
tests/pytest/query/query1970YearsAf.py
+1
-1
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
...demoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
+1
-1
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
...st/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
+1
-1
tests/pytest/tools/taosdumpTest.py
tests/pytest/tools/taosdumpTest.py
+3
-3
tests/pytest/tools/taosdumpTestNanoSupport.py
tests/pytest/tools/taosdumpTestNanoSupport.py
+1
-1
tests/pytest/update/merge_commit_data-0.py
tests/pytest/update/merge_commit_data-0.py
+1
-1
tests/pytest/update/merge_commit_data.py
tests/pytest/update/merge_commit_data.py
+1
-1
tests/pytest/update/merge_commit_data2.py
tests/pytest/update/merge_commit_data2.py
+1
-1
tests/pytest/update/merge_commit_data2_update0.py
tests/pytest/update/merge_commit_data2_update0.py
+1
-1
tests/pytest/update/merge_commit_last.py
tests/pytest/update/merge_commit_last.py
+1
-1
tests/pytest/util/sql.py
tests/pytest/util/sql.py
+1
-1
tests/pytest/util/taosdemoCfg.py
tests/pytest/util/taosdemoCfg.py
+1
-1
tests/script/general/db/alter_option.sim
tests/script/general/db/alter_option.sim
+8
-8
tests/script/general/db/backup/keep.sim
tests/script/general/db/backup/keep.sim
+2
-2
tests/script/general/db/topic1.sim
tests/script/general/db/topic1.sim
+15
-15
tests/script/general/import/commit.sim
tests/script/general/import/commit.sim
+2
-2
tests/script/general/import/replica1.sim
tests/script/general/import/replica1.sim
+1
-1
tests/script/general/parser/alter.sim
tests/script/general/parser/alter.sim
+1
-1
tests/script/general/parser/alter__for_community_version.sim
tests/script/general/parser/alter__for_community_version.sim
+1
-1
tests/script/general/parser/create_db.sim
tests/script/general/parser/create_db.sim
+3
-3
tests/script/general/parser/create_db__for_community_version.sim
...cript/general/parser/create_db__for_community_version.sim
+3
-3
tests/script/tsim/db/alter_option.sim
tests/script/tsim/db/alter_option.sim
+7
-7
tests/script/tsim/db/basic6.sim
tests/script/tsim/db/basic6.sim
+2
-2
tests/script/tsim/db/create_all_options.sim
tests/script/tsim/db/create_all_options.sim
+2
-2
tests/script/tsim/insert/commit-merge0.sim
tests/script/tsim/insert/commit-merge0.sim
+1
-1
tests/script/tsim/query/interval-offset.sim
tests/script/tsim/query/interval-offset.sim
+1
-1
tests/script/tsim/stable/alter_count.sim
tests/script/tsim/stable/alter_count.sim
+1
-1
tests/script/tsim/stable/alter_import.sim
tests/script/tsim/stable/alter_import.sim
+1
-1
tests/script/unique/db/commit.sim
tests/script/unique/db/commit.sim
+1
-1
tests/script/unique/import/replica2.sim
tests/script/unique/import/replica2.sim
+1
-1
tests/script/unique/import/replica3.sim
tests/script/unique/import/replica3.sim
+1
-1
tests/script/windows/db/basic.sim
tests/script/windows/db/basic.sim
+2
-2
tests/system-test/0-others/udfTest.py
tests/system-test/0-others/udfTest.py
+1
-1
tests/system-test/0-others/udf_cluster.py
tests/system-test/0-others/udf_cluster.py
+1
-1
tests/system-test/0-others/udf_create.py
tests/system-test/0-others/udf_create.py
+1
-1
tests/system-test/0-others/udf_restart_taosd.py
tests/system-test/0-others/udf_restart_taosd.py
+1
-1
tests/system-test/2-query/abs.py
tests/system-test/2-query/abs.py
+1
-1
tests/system-test/2-query/sample.py
tests/system-test/2-query/sample.py
+1
-1
tests/system-test/6-cluster/5dnode1mnode.py
tests/system-test/6-cluster/5dnode1mnode.py
+1
-1
tests/system-test/6-cluster/5dnode2mnode.py
tests/system-test/6-cluster/5dnode2mnode.py
+2
-2
tests/system-test/6-cluster/5dnode3mnodeDrop.py
tests/system-test/6-cluster/5dnode3mnodeDrop.py
+1
-1
tests/system-test/6-cluster/5dnode3mnodeStop.py
tests/system-test/6-cluster/5dnode3mnodeStop.py
+1
-1
tests/system-test/6-cluster/5dnode3mnodeStopInsert.py
tests/system-test/6-cluster/5dnode3mnodeStopInsert.py
+1
-1
未找到文件。
tests/pytest/alter/alter_replica.py
浏览文件 @
f740fd61
...
...
@@ -42,7 +42,7 @@ class TDTestCase:
tdDnodes
.
start
(
3
)
def
run
(
self
):
tdSql
.
execute
(
'create database db replica 3 d
ays
7'
)
tdSql
.
execute
(
'create database db replica 3 d
uration
7'
)
tdSql
.
execute
(
'use db'
)
for
tid
in
range
(
1
,
11
):
tdSql
.
execute
(
'create table tb%d(ts timestamp, i int)'
%
tid
)
...
...
tests/pytest/functions/function_max.py
浏览文件 @
f740fd61
...
...
@@ -83,7 +83,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
np
.
max
(
floatData
))
# test case: https://jira.taosdata.com:18080/browse/TD-2583
tdSql
.
execute
(
"create database test d
ays
2"
)
tdSql
.
execute
(
"create database test d
uration
2"
)
tdSql
.
execute
(
"create table car(ts timestamp, speed int)"
)
tdSql
.
execute
(
"insert into car values(now, -1)"
)
tdSql
.
execute
(
"insert into car values(now-10d, null)"
)
...
...
tests/pytest/functions/function_min.py
浏览文件 @
f740fd61
...
...
@@ -83,7 +83,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
np
.
min
(
floatData
))
# test case: https://jira.taosdata.com:18080/browse/TD-2583
tdSql
.
execute
(
"create database test d
ays
2"
)
tdSql
.
execute
(
"create database test d
uration
2"
)
tdSql
.
execute
(
"create table car(ts timestamp, speed int)"
)
tdSql
.
execute
(
"insert into car values(now, 1)"
)
tdSql
.
execute
(
"insert into car values(now-10d, null)"
)
...
...
tests/pytest/functions/queryTestCases.py
浏览文件 @
f740fd61
...
...
@@ -264,7 +264,7 @@ class TDTestCase:
def
td4288
(
self
):
tdLog
.
printNoPrefix
(
"==========TD-4288=========="
)
# keep ~ [d
ays
,365000]
# keep ~ [d
uration
,365000]
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"create database if not exists db"
)
tdSql
.
query
(
"show variables"
)
...
...
tests/pytest/insert/before_1970.py
浏览文件 @
f740fd61
...
...
@@ -32,7 +32,7 @@ class TDTestCase:
print
(
"==============step1"
)
tdSql
.
execute
(
"create database if not exists demo keep 36500;"
);
print
(
"==============create db demo keep 365000 d
ays
"
)
print
(
"==============create db demo keep 365000 d
uration
"
)
tdSql
.
execute
(
"use demo;"
)
tdSql
.
execute
(
"CREATE table if not exists test (ts timestamp, f1 int);"
)
print
(
"==============create table test"
)
...
...
tests/pytest/insert/retentionpolicy.py
浏览文件 @
f740fd61
...
...
@@ -51,7 +51,7 @@ class TDTestRetetion:
def
run
(
self
):
tdLog
.
info
(
"=============== step1"
)
tdSql
.
execute
(
'create database test keep 3 d
ays
1;'
)
tdSql
.
execute
(
'create database test keep 3 d
uration
1;'
)
tdSql
.
execute
(
'use test;'
)
tdSql
.
execute
(
'create table test(ts timestamp,i int);'
)
...
...
tests/pytest/multilevel/fileDistributionSameLevel.py
浏览文件 @
f740fd61
...
...
@@ -66,7 +66,7 @@ class TDTestCase:
tdDnodes
.
deploy
(
1
,
cfg
)
tdDnodes
.
startWithoutSleep
(
1
)
tdSql
.
execute
(
"create database test d
ays
1"
)
tdSql
.
execute
(
"create database test d
uration
1"
)
tdSql
.
execute
(
"use test"
)
tdSql
.
execute
(
"create table stb(ts timestamp, c int) tags(t int)"
)
...
...
@@ -85,7 +85,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step3"
)
tdSql
.
execute
(
'drop database test'
)
for
i
in
range
(
50
):
tdSql
.
execute
(
"create database test%d d
ays
1"
%
(
i
))
tdSql
.
execute
(
"create database test%d d
uration
1"
%
(
i
))
tdSql
.
execute
(
"use test%d"
%
(
i
))
tdSql
.
execute
(
"create table tb (ts timestamp,i int)"
)
for
j
in
range
(
10
):
...
...
tests/pytest/multilevel/retentionTest.py
浏览文件 @
f740fd61
...
...
@@ -56,7 +56,7 @@ class TDTestCase:
tdDnodes
.
deploy
(
1
,
cfg
)
tdDnodes
.
startWithoutSleep
(
1
)
tdSql
.
execute
(
"create database test d
ays
1 keep 15,5,10"
)
tdSql
.
execute
(
"create database test d
uration
1 keep 15,5,10"
)
tdSql
.
execute
(
"use test"
)
tdSql
.
execute
(
"create table tb(ts timestamp, c int)"
)
...
...
tests/pytest/perfbenchmark/bug3433.py
浏览文件 @
f740fd61
...
...
@@ -66,7 +66,7 @@ class TDTestCase:
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"d
ays
"
:
10
,
"d
uration
"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
...
...
tests/pytest/perfbenchmark/joinPerformance.py
浏览文件 @
f740fd61
...
...
@@ -81,7 +81,7 @@ class JoinPerf:
"name"
:
self
.
dbname
,
"drop"
:
self
.
drop
,
"replica"
:
1
,
"d
ays
"
:
10
,
"d
uration
"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
...
...
tests/pytest/perfbenchmark/taosdemoInsert.py
浏览文件 @
f740fd61
...
...
@@ -75,7 +75,7 @@ class Taosdemo:
"name"
:
self
.
dbname
,
"drop"
:
self
.
drop
,
"replica"
:
1
,
"d
ays
"
:
10
,
"d
uration
"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
...
...
tests/pytest/query/query1970YearsAf.py
浏览文件 @
f740fd61
...
...
@@ -57,7 +57,7 @@ class TDTestCase:
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"d
ays
"
:
10
,
"d
uration
"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
...
...
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
浏览文件 @
f740fd61
...
...
@@ -138,7 +138,7 @@ class TDTestCase:
sqls_ls
=
[
'drop database if exists nsdbsql;'
,
'create database nsdbsql precision "ns" keep 3600 d
ays
6 update 1;'
,
'create database nsdbsql precision "ns" keep 3600 d
uration
6 update 1;'
,
'use nsdbsql;'
,
'CREATE STABLE meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupdId int);'
,
'CREATE TABLE d1001 USING meters TAGS ("Beijing.Chaoyang", 2);'
,
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
浏览文件 @
f740fd61
...
...
@@ -125,7 +125,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
600
)
# check taosdemo -s
sqls_ls
=
[
'drop database if exists nsdbsql;'
,
'create database nsdbsql precision "ns" keep 36 d
ays
6 update 1;'
,
sqls_ls
=
[
'drop database if exists nsdbsql;'
,
'create database nsdbsql precision "ns" keep 36 d
uration
6 update 1;'
,
'use nsdbsql;'
,
'CREATE STABLE meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupdId int);'
,
'CREATE TABLE d1001 USING meters TAGS ("Beijing.Chaoyang", 2);'
,
'INSERT INTO d1001 USING METERS TAGS ("Beijng.Chaoyang", 2) VALUES (now, 10.2, 219, 0.32);'
,
...
...
tests/pytest/tools/taosdumpTest.py
浏览文件 @
f740fd61
...
...
@@ -60,8 +60,8 @@ class TDTestCase:
if
not
os
.
path
.
exists
(
"./taosdumptest/tmp2"
):
os
.
makedirs
(
"./taosdumptest/tmp2"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"create database db d
ays
11 keep 3649 blocks 8 "
)
tdSql
.
execute
(
"create database db1 d
ays
12 keep 3640 blocks 7 "
)
tdSql
.
execute
(
"create database db d
uration
11 keep 3649 blocks 8 "
)
tdSql
.
execute
(
"create database db1 d
uration
12 keep 3640 blocks 7 "
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"create table st(ts timestamp, c1 int, c2 nchar(10)) tags(t1 int, t2 binary(10))"
)
...
...
@@ -102,7 +102,7 @@ class TDTestCase:
tdSql
.
query
(
"show databases"
)
tdSql
.
checkRows
(
2
)
dbresult
=
tdSql
.
queryResult
# 6--d
ays
,7--keep0,keep1,keep, 12--block,
# 6--d
uration
,7--keep0,keep1,keep, 12--block,
isCommunity
=
self
.
checkCommunity
()
print
(
"iscommunity: %d"
%
isCommunity
)
...
...
tests/pytest/tools/taosdumpTestNanoSupport.py
浏览文件 @
f740fd61
...
...
@@ -60,7 +60,7 @@ class TDTestCase:
def
build_db
(
precision
,
start_time
):
tdSql
.
execute
(
"drop database if exists timedb1"
)
tdSql
.
execute
(
"create database timedb1 d
ays
10 keep 365 blocks 8 precision "
+
"
\"
"
+
precision
+
"
\"
"
)
"create database timedb1 d
uration
10 keep 365 blocks 8 precision "
+
"
\"
"
+
precision
+
"
\"
"
)
tdSql
.
execute
(
"use timedb1"
)
tdSql
.
execute
(
...
...
tests/pytest/update/merge_commit_data-0.py
浏览文件 @
f740fd61
...
...
@@ -30,7 +30,7 @@ class TDTestCase:
tdSql
.
execute
(
s
)
s
=
'drop database if exists db'
tdSql
.
execute
(
s
)
s
=
'create database db d
ays
30'
s
=
'create database db d
uration
30'
tdSql
.
execute
(
s
)
s
=
'use db'
tdSql
.
execute
(
s
)
...
...
tests/pytest/update/merge_commit_data.py
浏览文件 @
f740fd61
...
...
@@ -30,7 +30,7 @@ class TDTestCase:
tdSql
.
execute
(
s
)
s
=
'drop database if exists db'
tdSql
.
execute
(
s
)
s
=
'create database db update 1 d
ays
30'
s
=
'create database db update 1 d
uration
30'
tdSql
.
execute
(
s
)
s
=
'use db'
tdSql
.
execute
(
s
)
...
...
tests/pytest/update/merge_commit_data2.py
浏览文件 @
f740fd61
...
...
@@ -50,7 +50,7 @@ class TDTestCase:
tdSql
.
execute
(
sql
)
sql
=
'drop database if exists db'
tdSql
.
execute
(
sql
)
sql
=
'create database db update 1 d
ays
30;'
sql
=
'create database db update 1 d
uration
30;'
tdSql
.
execute
(
sql
)
sql
=
'use db;'
tdSql
.
execute
(
sql
)
...
...
tests/pytest/update/merge_commit_data2_update0.py
浏览文件 @
f740fd61
...
...
@@ -49,7 +49,7 @@ class TDTestCase:
tdSql
.
execute
(
sql
)
sql
=
'drop database if exists db'
tdSql
.
execute
(
sql
)
sql
=
'create database db update 0 d
ays
30;'
sql
=
'create database db update 0 d
uration
30;'
tdSql
.
execute
(
sql
)
sql
=
'use db;'
tdSql
.
execute
(
sql
)
...
...
tests/pytest/update/merge_commit_last.py
浏览文件 @
f740fd61
...
...
@@ -34,7 +34,7 @@ class TDTestCase:
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
"create database udb update 1 d
ays
30"
)
tdSql
.
execute
(
"create database udb update 1 d
uration
30"
)
tdSql
.
execute
(
"use udb"
)
print
(
"==============step 1: UPDATE THE LAST RECORD REPEATEDLY"
)
...
...
tests/pytest/util/sql.py
浏览文件 @
f740fd61
...
...
@@ -57,7 +57,7 @@ class TDSql:
tdLog
.
notice
(
"'reset query cache' is not supported"
)
s
=
'drop database if exists db'
self
.
cursor
.
execute
(
s
)
s
=
'create database db d
ays
300'
s
=
'create database db d
uration
300'
self
.
cursor
.
execute
(
s
)
s
=
'use db'
self
.
cursor
.
execute
(
s
)
...
...
tests/pytest/util/taosdemoCfg.py
浏览文件 @
f740fd61
...
...
@@ -63,7 +63,7 @@ class TDTaosdemoCfg:
"name"
:
'db'
,
"drop"
:
'yes'
,
"replica"
:
1
,
"d
ays
"
:
10
,
"d
uration
"
:
10
,
"cache"
:
16
,
"blocks"
:
6
,
"precision"
:
"ms"
,
...
...
tests/script/general/db/alter_option.sim
浏览文件 @
f740fd61
...
...
@@ -9,7 +9,7 @@ sleep 2000
sql connect
print ============= create database
sql create database db cache 2 blocks 4 d
ays
10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1
sql create database db cache 2 blocks 4 d
uration
10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1
sql show databases
if $data00 != db then
return -1
...
...
@@ -87,13 +87,13 @@ sql_error alter database db quorum 4
sql_error alter database db quorum 5
sql_error alter database db quorum -1
print ============== step d
ays
sql_error alter database db d
ays
0
sql_error alter database db d
ays
1
sql_error alter database db d
ays
2
sql_error alter database db d
ays
10
sql_error alter database db d
ays
50
sql_error alter database db d
ays
100
print ============== step d
uration
sql_error alter database db d
uration
0
sql_error alter database db d
uration
1
sql_error alter database db d
uration
2
sql_error alter database db d
uration
10
sql_error alter database db d
uration
50
sql_error alter database db d
uration
100
print ============== step keep
sql show databases
...
...
tests/script/general/db/backup/keep.sim
浏览文件 @
f740fd61
...
...
@@ -26,7 +26,7 @@ system sh/exec.sh -n dnode2 -s start
sleep 2000
print ======== step1 create db
sql create database keepdb replica 1 keep 30 d
ays
7
sql create database keepdb replica 1 keep 30 d
uration
7
sql use keepdb
sql create table tb (ts timestamp, i int)
...
...
@@ -201,7 +201,7 @@ sql alter database keepdb keep 0 -x error2
return -1
error2:
sql alter database keepdb d
ays
1 -x error3
sql alter database keepdb d
uration
1 -x error3
return -1
error3:
...
...
tests/script/general/db/topic1.sim
浏览文件 @
f740fd61
...
...
@@ -171,7 +171,7 @@ sql_error create topic t1 partitions -1;
sql_error create topic t1 partitions 10001;
print =============step3 create with db para
sql create topic db cache 2 blocks 4 d
ays
10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1
sql create topic db cache 2 blocks 4 d
uration
10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1
sql show databases
if $data00 != db then
return -1
...
...
@@ -199,7 +199,7 @@ if $data09 != 4 then
endi
sql drop topic db;
sql create topic db cache 2 blocks 4 d
ays
10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1 partitions 7
sql create topic db cache 2 blocks 4 d
uration
10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1 partitions 7
sql show databases
if $data00 != db then
return -1
...
...
@@ -334,19 +334,19 @@ sql_error alter topic db quorum 4
sql_error alter topic db quorum 5
sql_error alter topic db quorum -1
print ============== step d
ays
sql_error alter database db d
ays
0
sql_error alter database db d
ays
1
sql_error alter database db d
ays
2
sql_error alter database db d
ays
10
sql_error alter database db d
ays
50
sql_error alter database db d
ays
100
sql_error alter topic db d
ays
0
sql_error alter topic db d
ays
1
sql_error alter topic db d
ays
2
sql_error alter topic db d
ays
10
sql_error alter topic db d
ays
50
sql_error alter topic db d
ays
100
print ============== step d
uration
sql_error alter database db d
uration
0
sql_error alter database db d
uration
1
sql_error alter database db d
uration
2
sql_error alter database db d
uration
10
sql_error alter database db d
uration
50
sql_error alter database db d
uration
100
sql_error alter topic db d
uration
0
sql_error alter topic db d
uration
1
sql_error alter topic db d
uration
2
sql_error alter topic db d
uration
10
sql_error alter topic db d
uration
50
sql_error alter topic db d
uration
100
print ============== step keep
sql show databases
...
...
tests/script/general/import/commit.sim
浏览文件 @
f740fd61
...
...
@@ -30,7 +30,7 @@ sleep 2000
sql connect
print ========= step1
sql create database ic1db d
ays
7;
sql create database ic1db d
uration
7;
sql create table ic1db.tb(ts timestamp, s int);
sql insert into ic1db.tb values(now-30d, -30);
sql insert into ic1db.tb values(now-20d, -20);
...
...
@@ -50,7 +50,7 @@ if $rows != 12 then
endi
print ========= step2
sql create database ic2db d
ays
7;
sql create database ic2db d
uration
7;
sql create table ic2db.tb(ts timestamp, s int);
sql insert into ic2db.tb values(now, 0);
sql import into ic2db.tb values(now-30d, -30);
...
...
tests/script/general/import/replica1.sim
浏览文件 @
f740fd61
...
...
@@ -30,7 +30,7 @@ system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql create database ir1db d
ays
7
sql create database ir1db d
uration
7
sql use ir1db
sql create table tb(ts timestamp, i bigint)
...
...
tests/script/general/parser/alter.sim
浏览文件 @
f740fd61
...
...
@@ -20,7 +20,7 @@ $db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql drop database if exists $db
sql create database $db d
ays
10 keep 20,20,20
sql create database $db d
uration
10 keep 20,20,20
sql use $db
sql_error alter database $db keep "20"
...
...
tests/script/general/parser/alter__for_community_version.sim
浏览文件 @
f740fd61
...
...
@@ -20,7 +20,7 @@ $db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql drop database if exists $db
sql create database $db d
ays
10 keep 20
sql create database $db d
uration
10 keep 20
sql use $db
sql show databases
if $rows != 1 then
...
...
tests/script/general/parser/create_db.sim
浏览文件 @
f740fd61
...
...
@@ -101,7 +101,7 @@ print db_already_exists test passed
print create_db.sim case5: db_meta_data test
# cfg params
$replica = 1 # max=3
$d
ays
= 10
$d
uration
= 10
$keep = 365,365,365
$rows_db = 1000
$cache = 16 # 16MB
...
...
@@ -111,7 +111,7 @@ $ctime = 36000 # 10 hours
$wal = 1 # valid value is 1, 2
$comp = 1 # max=32, automatically trimmed when exceeding
sql create database $db replica $replica d
ays $days
keep $keep maxrows $rows_db cache $cache blocks 4 ctime $ctime wal $wal comp $comp
sql create database $db replica $replica d
uration $duration
keep $keep maxrows $rows_db cache $cache blocks 4 ctime $ctime wal $wal comp $comp
sql show databases
if $rows != 1 then
return -1
...
...
@@ -122,7 +122,7 @@ endi
if $data04 != $replica then
return -1
endi
if $data06 != $d
ays
then
if $data06 != $d
uration
then
return -1
endi
if $data07 != 365,365,365 then
...
...
tests/script/general/parser/create_db__for_community_version.sim
浏览文件 @
f740fd61
...
...
@@ -101,7 +101,7 @@ print db_already_exists test passed
print create_db.sim case5: db_meta_data test
# cfg params
$replica = 1 # max=3
$d
ays
= 10
$d
uration
= 10
$keep = 365
$rows_db = 1000
$cache = 16 # 16MB
...
...
@@ -111,7 +111,7 @@ $ctime = 36000 # 10 hours
$wal = 1 # valid value is 1, 2
$comp = 1 # max=32, automatically trimmed when exceeding
sql create database $db replica $replica d
ays $days
keep $keep maxrows $rows_db cache $cache blocks 4 ctime $ctime wal $wal comp $comp
sql create database $db replica $replica d
uration $duration
keep $keep maxrows $rows_db cache $cache blocks 4 ctime $ctime wal $wal comp $comp
sql show databases
if $rows != 1 then
return -1
...
...
@@ -122,7 +122,7 @@ endi
if $data04 != $replica then
return -1
endi
if $data06 != $d
ays
then
if $data06 != $d
uration
then
return -1
endi
if $data07 != 365 then
...
...
tests/script/tsim/db/alter_option.sim
浏览文件 @
f740fd61
...
...
@@ -62,7 +62,7 @@ print ============= create database
# | PAGES value [64~16384, default: 256]
# | CACHELAST value [0, 1, 2, 3]
# | FSYNC value [0 ~ 180000 ms]
# | KEEP value [d
ays
, 365000]
# | KEEP value [d
uration
, 365000]
# | REPLICA value [1 | 3]
# | WAL value [1 | 2]
...
...
@@ -92,7 +92,7 @@ endi
if $data5_db != no_strict then # strict
return -1
endi
if $data6_db != 345600 then # d
ays
if $data6_db != 345600 then # d
uration
return -1
endi
if $data7_db != 1440000m,1440000m,1440000m then # keep
...
...
@@ -222,11 +222,11 @@ sql_error alter database db replica 0
#sql_error alter database db quorum 4
#sql_error alter database db quorum 5
#print ============== modify d
ays
sql_error alter database db d
ays
480
sql_error alter database db d
ays
360
sql_error alter database db d
ays
0
sql_error alter database db d
ays
14400 # set over than keep
#print ============== modify d
uration
sql_error alter database db d
uration
480
sql_error alter database db d
uration
360
sql_error alter database db d
uration
0
sql_error alter database db d
uration
14400 # set over than keep
print ============== modify keep
sql alter database db keep 2400
...
...
tests/script/tsim/db/basic6.sim
浏览文件 @
f740fd61
...
...
@@ -15,7 +15,7 @@ $tb = $tbPrefix . $i
print =============== step1
# quorum presicion
sql create database $db vgroups 8 replica 1 d
ays
2 keep 10 minrows 80 maxrows 10000 wal 2 fsync 1000 comp 0 cachelast 2 precision 'us'
sql create database $db vgroups 8 replica 1 d
uration
2 keep 10 minrows 80 maxrows 10000 wal 2 fsync 1000 comp 0 cachelast 2 precision 'us'
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09
...
...
@@ -66,7 +66,7 @@ print =============== step4
sql_error drop database $db
print =============== step5
sql create database $db replica 1 d
ays
15 keep 1500
sql create database $db replica 1 d
uration
15 keep 1500
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
if $data20 != $db then
...
...
tests/script/tsim/db/create_all_options.sim
浏览文件 @
f740fd61
...
...
@@ -79,7 +79,7 @@ print ============= create database with all options
#$data2_db : vgroups
#$data3_db : ntables
#$data4_db : replica
#$data6_db : d
ays
#$data6_db : d
uration
#$data7_db : keep
#$data10_db : minrows
#$data11_db : maxrows
...
...
@@ -113,7 +113,7 @@ endi
if $data5_db != no_strict then # strict
return -1
endi
if $data6_db != 14400 then # d
ays
if $data6_db != 14400 then # d
uration
return -1
endi
if $data7_db != 5256000m,5256000m,5256000m then # keep
...
...
tests/script/tsim/insert/commit-merge0.sim
浏览文件 @
f740fd61
...
...
@@ -5,7 +5,7 @@ sleep 50
sql connect
print =============== create database
sql create database db d
ays
300 keep 365000d,365000d,365000d
sql create database db d
uration
300 keep 365000d,365000d,365000d
sql show databases
if $rows != 3 then
return -1
...
...
tests/script/tsim/query/interval-offset.sim
浏览文件 @
f740fd61
...
...
@@ -5,7 +5,7 @@ sleep 500
sql connect
print =============== create database
sql create database d0 d
ays
300
sql create database d0 d
uration
300
sql use d0
print =============== create super table and child table
...
...
tests/script/tsim/stable/alter_count.sim
浏览文件 @
f740fd61
...
...
@@ -6,7 +6,7 @@ system sh/exec.sh -n dnode1 -s start
sql connect
print ======== step1
sql create database d1 replica 1 d
ays
7 keep 50
sql create database d1 replica 1 d
uration
7 keep 50
sql use d1
sql create table tb (ts timestamp, a int)
sql insert into tb values(now-28d, -28)
...
...
tests/script/tsim/stable/alter_import.sim
浏览文件 @
f740fd61
...
...
@@ -6,7 +6,7 @@ system sh/exec.sh -n dnode1 -s start
sql connect
print ======== step1
sql create database d1 replica 1 d
ays
7 keep 50
sql create database d1 replica 1 d
uration
7 keep 50
sql use d1
sql create table tb (ts timestamp, a int)
sql insert into tb values(now-30d, -28)
...
...
tests/script/unique/db/commit.sim
浏览文件 @
f740fd61
...
...
@@ -24,7 +24,7 @@ system sh/exec.sh -n dnode2 -s start
sleep 2000
print ======== step1 create db
sql create database commitdb replica 1 d
ays
7 keep 30
sql create database commitdb replica 1 d
uration
7 keep 30
sql use commitdb
sql create table tb (ts timestamp, i int)
...
...
tests/script/unique/import/replica2.sim
浏览文件 @
f740fd61
...
...
@@ -52,7 +52,7 @@ if $data4_2 != ready then
goto step1
endi
sql create database ir2db replica 2 d
ays
7
sql create database ir2db replica 2 d
uration
7
sql use ir2db
sql create table tb(ts timestamp, i bigint)
...
...
tests/script/unique/import/replica3.sim
浏览文件 @
f740fd61
...
...
@@ -58,7 +58,7 @@ if $data4_3 != ready then
goto step1
endi
sql create database ir3db replica 3 d
ays
7
sql create database ir3db replica 3 d
uration
7
sql use ir3db
sql create table tb(ts timestamp, i bigint)
...
...
tests/script/windows/db/basic.sim
浏览文件 @
f740fd61
...
...
@@ -17,7 +17,7 @@ $db = $dbPrefix . $i
$tb = $tbPrefix . $i
print =============== step1
sql create database $db replica 1 d
ays
20 keep 2000 cache 16
sql create database $db replica 1 d
uration
20 keep 2000 cache 16
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
if $data00 != $db then
...
...
@@ -57,7 +57,7 @@ print =============== step4
sql_error drop database $db
print =============== step5
sql create database $db replica 1 d
ays
15 keep 1500
sql create database $db replica 1 d
uration
15 keep 1500
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
if $data00 != $db then
...
...
tests/system-test/0-others/udfTest.py
浏览文件 @
f740fd61
...
...
@@ -60,7 +60,7 @@ class TDTestCase:
def
prepare_data
(
self
):
tdSql
.
execute
(
"drop database if exists db "
)
tdSql
.
execute
(
"create database if not exists db d
ays
300"
)
tdSql
.
execute
(
"create database if not exists db d
uration
300"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/0-others/udf_cluster.py
浏览文件 @
f740fd61
...
...
@@ -63,7 +63,7 @@ class TDTestCase:
def
prepare_data
(
self
):
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"create database if not exists db replica 1 d
ays
300"
)
tdSql
.
execute
(
"create database if not exists db replica 1 d
uration
300"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/0-others/udf_create.py
浏览文件 @
f740fd61
...
...
@@ -62,7 +62,7 @@ class TDTestCase:
def
prepare_data
(
self
):
tdSql
.
execute
(
"drop database if exists db "
)
tdSql
.
execute
(
"create database if not exists db d
ays
300"
)
tdSql
.
execute
(
"create database if not exists db d
uration
300"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/0-others/udf_restart_taosd.py
浏览文件 @
f740fd61
...
...
@@ -59,7 +59,7 @@ class TDTestCase:
def
prepare_data
(
self
):
tdSql
.
execute
(
"drop database if exists db "
)
tdSql
.
execute
(
"create database if not exists db d
ays
300"
)
tdSql
.
execute
(
"create database if not exists db d
uration
300"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/2-query/abs.py
浏览文件 @
f740fd61
...
...
@@ -68,7 +68,7 @@ class TDTestCase:
def
prepare_tag_datas
(
self
):
# prepare datas
tdSql
.
execute
(
"create database if not exists testdb keep 3650 d
ays
1000"
)
tdSql
.
execute
(
"create database if not exists testdb keep 3650 d
uration
1000"
)
tdSql
.
execute
(
" use testdb "
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/2-query/sample.py
浏览文件 @
f740fd61
...
...
@@ -628,7 +628,7 @@ class TDTestCase:
def
basic_sample_query
(
self
):
tdSql
.
execute
(
" drop database if exists db "
)
tdSql
.
execute
(
" create database if not exists db d
ays
300 "
)
tdSql
.
execute
(
" create database if not exists db d
uration
300 "
)
tdSql
.
execute
(
" use db "
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/6-cluster/5dnode1mnode.py
浏览文件 @
f740fd61
...
...
@@ -104,7 +104,7 @@ class TDTestCase:
tdSql
.
error
(
"drop mnode on dnode 1;"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"create database if not exists db replica 1 d
ays
300"
)
tdSql
.
execute
(
"create database if not exists db replica 1 d
uration
300"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/6-cluster/5dnode2mnode.py
浏览文件 @
f740fd61
...
...
@@ -104,7 +104,7 @@ class TDTestCase:
tdSql
.
error
(
"drop mnode on dnode 1;"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"create database if not exists db replica 1 d
ays
300"
)
tdSql
.
execute
(
"create database if not exists db replica 1 d
uration
300"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
'''create table stb1
...
...
@@ -163,7 +163,7 @@ class TDTestCase:
# fisrt add data : db\stable\childtable\general table
tdSql
.
execute
(
"drop database if exists db2"
)
tdSql
.
execute
(
"create database if not exists db2 replica 1 d
ays
300"
)
tdSql
.
execute
(
"create database if not exists db2 replica 1 d
uration
300"
)
tdSql
.
execute
(
"use db2"
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/6-cluster/5dnode3mnodeDrop.py
浏览文件 @
f740fd61
...
...
@@ -53,7 +53,7 @@ class TDTestCase:
# fisrt add data : db\stable\childtable\general table
for
couti
in
count
:
tdSql
.
execute
(
"drop database if exists db%d"
%
couti
)
tdSql
.
execute
(
"create database if not exists db%d replica 1 d
ays
300"
%
couti
)
tdSql
.
execute
(
"create database if not exists db%d replica 1 d
uration
300"
%
couti
)
tdSql
.
execute
(
"use db%d"
%
couti
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/6-cluster/5dnode3mnodeStop.py
浏览文件 @
f740fd61
...
...
@@ -53,7 +53,7 @@ class TDTestCase:
# fisrt add data : db\stable\childtable\general table
for
couti
in
count
:
tdSql
.
execute
(
"drop database if exists db%d"
%
couti
)
tdSql
.
execute
(
"create database if not exists db%d replica 1 d
ays
300"
%
couti
)
tdSql
.
execute
(
"create database if not exists db%d replica 1 d
uration
300"
%
couti
)
tdSql
.
execute
(
"use db%d"
%
couti
)
tdSql
.
execute
(
'''create table stb1
...
...
tests/system-test/6-cluster/5dnode3mnodeStopInsert.py
浏览文件 @
f740fd61
...
...
@@ -54,7 +54,7 @@ class TDTestCase:
# fisrt add data : db\stable\childtable\general table
for
couti
in
count
:
tdSql
.
execute
(
"drop database if exists db%d"
%
couti
)
tdSql
.
execute
(
"create database if not exists db%d replica 1 d
ays
300"
%
couti
)
tdSql
.
execute
(
"create database if not exists db%d replica 1 d
uration
300"
%
couti
)
tdSql
.
execute
(
"use db%d"
%
couti
)
tdSql
.
execute
(
'''create table stb1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录