diff --git a/tests/pytest/alter/alter_replica.py b/tests/pytest/alter/alter_replica.py index 6cf0f65825920a10ab1a8de175325e535f5828e6..10047362db5f3dd09a98055ab7279628bc7caedc 100644 --- a/tests/pytest/alter/alter_replica.py +++ b/tests/pytest/alter/alter_replica.py @@ -42,7 +42,7 @@ class TDTestCase: tdDnodes.start(3) def run(self): - tdSql.execute('create database db replica 3 days 7') + tdSql.execute('create database db replica 3 duration 7') tdSql.execute('use db') for tid in range(1, 11): tdSql.execute('create table tb%d(ts timestamp, i int)' % tid) diff --git a/tests/pytest/functions/function_max.py b/tests/pytest/functions/function_max.py index c322b6af26362949f7e8b45a58e4c9cef3d9de19..a53daa11d63c48607b002b22254765f4f5bcb9ea 100644 --- a/tests/pytest/functions/function_max.py +++ b/tests/pytest/functions/function_max.py @@ -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 days 2") + tdSql.execute("create database test duration 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)") diff --git a/tests/pytest/functions/function_min.py b/tests/pytest/functions/function_min.py index b4d6d58f7ce01b97dd7f5f569409a0288fb0389b..db865e5ac73ef9a72028ab49c89bfcb0f6ee641d 100644 --- a/tests/pytest/functions/function_min.py +++ b/tests/pytest/functions/function_min.py @@ -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 days 2") + tdSql.execute("create database test duration 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)") diff --git a/tests/pytest/functions/queryTestCases.py b/tests/pytest/functions/queryTestCases.py index 1311ad6b3c83e1d4a0ec6fdf73a707a44bd5297c..96de8f064c36ef2df5b1c112d6d664e4efa766d2 100644 --- a/tests/pytest/functions/queryTestCases.py +++ b/tests/pytest/functions/queryTestCases.py @@ -264,7 +264,7 @@ class TDTestCase: def td4288(self): tdLog.printNoPrefix("==========TD-4288==========") - # keep ~ [days,365000] + # keep ~ [duration,365000] tdSql.execute("drop database if exists db") tdSql.execute("create database if not exists db") tdSql.query("show variables") diff --git a/tests/pytest/insert/before_1970.py b/tests/pytest/insert/before_1970.py index b2c4dc57c7a37b4b119308335d326521fe986f08..ca2b4f165f5fc66eb2c67ea9375ad4ac11befb96 100644 --- a/tests/pytest/insert/before_1970.py +++ b/tests/pytest/insert/before_1970.py @@ -32,7 +32,7 @@ class TDTestCase: print("==============step1") tdSql.execute("create database if not exists demo keep 36500;"); - print("==============create db demo keep 365000 days") + print("==============create db demo keep 365000 duration") tdSql.execute("use demo;") tdSql.execute("CREATE table if not exists test (ts timestamp, f1 int);") print("==============create table test") diff --git a/tests/pytest/insert/retentionpolicy.py b/tests/pytest/insert/retentionpolicy.py index 607ee26a59969f1ecafd4160e4f9db58e3af568a..78e5c08c8b6bf5156aa1f0007ed727ff3e60d586 100644 --- a/tests/pytest/insert/retentionpolicy.py +++ b/tests/pytest/insert/retentionpolicy.py @@ -51,7 +51,7 @@ class TDTestRetetion: def run(self): tdLog.info("=============== step1") - tdSql.execute('create database test keep 3 days 1;') + tdSql.execute('create database test keep 3 duration 1;') tdSql.execute('use test;') tdSql.execute('create table test(ts timestamp,i int);') diff --git a/tests/pytest/multilevel/fileDistributionSameLevel.py b/tests/pytest/multilevel/fileDistributionSameLevel.py index 83ce85671771c4d2627541e80262ef8c764e45c3..64b29914b7920855063f9de06d2e9f3021608033 100644 --- a/tests/pytest/multilevel/fileDistributionSameLevel.py +++ b/tests/pytest/multilevel/fileDistributionSameLevel.py @@ -66,7 +66,7 @@ class TDTestCase: tdDnodes.deploy(1,cfg) tdDnodes.startWithoutSleep(1) - tdSql.execute("create database test days 1") + tdSql.execute("create database test duration 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 days 1" %(i)) + tdSql.execute("create database test%d duration 1" %(i)) tdSql.execute("use test%d" %(i)) tdSql.execute("create table tb (ts timestamp,i int)") for j in range(10): diff --git a/tests/pytest/multilevel/retentionTest.py b/tests/pytest/multilevel/retentionTest.py index 9ea59d9d5918d851f69acc69704926d97f3f5375..94d268f2570dfe5fa44cada58b95dd8a91302921 100644 --- a/tests/pytest/multilevel/retentionTest.py +++ b/tests/pytest/multilevel/retentionTest.py @@ -56,7 +56,7 @@ class TDTestCase: tdDnodes.deploy(1,cfg) tdDnodes.startWithoutSleep(1) - tdSql.execute("create database test days 1 keep 15,5,10") + tdSql.execute("create database test duration 1 keep 15,5,10") tdSql.execute("use test") tdSql.execute("create table tb(ts timestamp, c int)") diff --git a/tests/pytest/perfbenchmark/bug3433.py b/tests/pytest/perfbenchmark/bug3433.py index e4480df6b6753df88e3526930ac4bee087264d35..d688dd03106d6ee2b50213d0b3e610dceb7ca1df 100644 --- a/tests/pytest/perfbenchmark/bug3433.py +++ b/tests/pytest/perfbenchmark/bug3433.py @@ -66,7 +66,7 @@ class TDTestCase: "name": "db", "drop": "yes", "replica": 1, - "days": 10, + "duration": 10, "cache": 16, "blocks": 8, "precision": "ms", diff --git a/tests/pytest/perfbenchmark/joinPerformance.py b/tests/pytest/perfbenchmark/joinPerformance.py index acd4f88c9b1a2df91f7e129ac87d57c9b04c7106..2de5818c59c10038e7af7a9d68588bf55823127f 100644 --- a/tests/pytest/perfbenchmark/joinPerformance.py +++ b/tests/pytest/perfbenchmark/joinPerformance.py @@ -81,7 +81,7 @@ class JoinPerf: "name": self.dbname, "drop": self.drop, "replica": 1, - "days": 10, + "duration": 10, "cache": 16, "blocks": 8, "precision": "ms", diff --git a/tests/pytest/perfbenchmark/taosdemoInsert.py b/tests/pytest/perfbenchmark/taosdemoInsert.py index 59a8143d5a34014ecbdfe57c6ecc073c0eaeb39c..37191b2624acf7003917b588ac18acef42ada039 100644 --- a/tests/pytest/perfbenchmark/taosdemoInsert.py +++ b/tests/pytest/perfbenchmark/taosdemoInsert.py @@ -75,7 +75,7 @@ class Taosdemo: "name": self.dbname, "drop": self.drop, "replica": 1, - "days": 10, + "duration": 10, "cache": 16, "blocks": 8, "precision": "ms", diff --git a/tests/pytest/query/query1970YearsAf.py b/tests/pytest/query/query1970YearsAf.py index a365369b21fc7429216f5c1e8c624bf856a744c1..c78324ff5c8a97d20304f8f23e7c534c54f7b6f6 100644 --- a/tests/pytest/query/query1970YearsAf.py +++ b/tests/pytest/query/query1970YearsAf.py @@ -57,7 +57,7 @@ class TDTestCase: "name": "db", "drop": "yes", "replica": 1, - "days": 10, + "duration": 10, "cache": 16, "blocks": 8, "precision": "ms", diff --git a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py index f069bb8f7030dbd8d4eec8c9c741d246f261671b..518f46b5e65dcf7bbade85a1f9405a7d5e957f93 100644 --- a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py +++ b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py @@ -138,7 +138,7 @@ class TDTestCase: sqls_ls = [ 'drop database if exists nsdbsql;', - 'create database nsdbsql precision "ns" keep 3600 days 6 update 1;', + 'create database nsdbsql precision "ns" keep 3600 duration 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);', diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py index c3fdff00ec15fc1ca0d55f86d430c5cbf86ad168..7781a3d3d47fbdb1357c8c78282d63c6a436279a 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py @@ -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 days 6 update 1;', + sqls_ls = ['drop database if exists nsdbsql;','create database nsdbsql precision "ns" keep 36 duration 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);', diff --git a/tests/pytest/tools/taosdumpTest.py b/tests/pytest/tools/taosdumpTest.py index 0dfc42f331b1a1c59d71268985d6a72d4d652856..bc31b9fbcc1955bb44fc94392c39733065ba2cc0 100644 --- a/tests/pytest/tools/taosdumpTest.py +++ b/tests/pytest/tools/taosdumpTest.py @@ -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 days 11 keep 3649 blocks 8 ") - tdSql.execute("create database db1 days 12 keep 3640 blocks 7 ") + tdSql.execute("create database db duration 11 keep 3649 blocks 8 ") + tdSql.execute("create database db1 duration 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--days,7--keep0,keep1,keep, 12--block, + # 6--duration,7--keep0,keep1,keep, 12--block, isCommunity = self.checkCommunity() print("iscommunity: %d" % isCommunity) diff --git a/tests/pytest/tools/taosdumpTestNanoSupport.py b/tests/pytest/tools/taosdumpTestNanoSupport.py index 55f1671daaa09b148bb87d661b8bd1248e6cbb3a..0101a654072aa088dfe0ce752ea439aa4ec05abd 100644 --- a/tests/pytest/tools/taosdumpTestNanoSupport.py +++ b/tests/pytest/tools/taosdumpTestNanoSupport.py @@ -60,7 +60,7 @@ class TDTestCase: def build_db(precision, start_time): tdSql.execute("drop database if exists timedb1") tdSql.execute( - "create database timedb1 days 10 keep 365 blocks 8 precision "+"\""+precision+"\"") + "create database timedb1 duration 10 keep 365 blocks 8 precision "+"\""+precision+"\"") tdSql.execute("use timedb1") tdSql.execute( diff --git a/tests/pytest/update/merge_commit_data-0.py b/tests/pytest/update/merge_commit_data-0.py index 14d435f7f20d9e04565fdb7036da043d948b1dcf..6f7951b16a706bdb1c4d95176a71a3a24f293e5a 100644 --- a/tests/pytest/update/merge_commit_data-0.py +++ b/tests/pytest/update/merge_commit_data-0.py @@ -30,7 +30,7 @@ class TDTestCase: tdSql.execute(s) s = 'drop database if exists db' tdSql.execute(s) - s = 'create database db days 30' + s = 'create database db duration 30' tdSql.execute(s) s = 'use db' tdSql.execute(s) diff --git a/tests/pytest/update/merge_commit_data.py b/tests/pytest/update/merge_commit_data.py index 4fb6765361e8099acb0f1f861623a88fd6b8e466..0b180711796dd7d6bf8b7a2d2a307571764ee9a9 100644 --- a/tests/pytest/update/merge_commit_data.py +++ b/tests/pytest/update/merge_commit_data.py @@ -30,7 +30,7 @@ class TDTestCase: tdSql.execute(s) s = 'drop database if exists db' tdSql.execute(s) - s = 'create database db update 1 days 30' + s = 'create database db update 1 duration 30' tdSql.execute(s) s = 'use db' tdSql.execute(s) diff --git a/tests/pytest/update/merge_commit_data2.py b/tests/pytest/update/merge_commit_data2.py index a334f39e867e80ca05a8de57016e4581ee5fb68c..034d9b9913ccc888f0064157b3d054f7d128efec 100644 --- a/tests/pytest/update/merge_commit_data2.py +++ b/tests/pytest/update/merge_commit_data2.py @@ -50,7 +50,7 @@ class TDTestCase: tdSql.execute(sql) sql = 'drop database if exists db' tdSql.execute(sql) - sql = 'create database db update 1 days 30;' + sql = 'create database db update 1 duration 30;' tdSql.execute(sql) sql = 'use db;' tdSql.execute(sql) diff --git a/tests/pytest/update/merge_commit_data2_update0.py b/tests/pytest/update/merge_commit_data2_update0.py index def50e04661b1752668202359eec7dd89df9b6f0..824f085630bde92dec2db3f17f26f12956f3bee3 100644 --- a/tests/pytest/update/merge_commit_data2_update0.py +++ b/tests/pytest/update/merge_commit_data2_update0.py @@ -49,7 +49,7 @@ class TDTestCase: tdSql.execute(sql) sql = 'drop database if exists db' tdSql.execute(sql) - sql = 'create database db update 0 days 30;' + sql = 'create database db update 0 duration 30;' tdSql.execute(sql) sql = 'use db;' tdSql.execute(sql) diff --git a/tests/pytest/update/merge_commit_last.py b/tests/pytest/update/merge_commit_last.py index 183cca0a1e40fd995daaed0f271bb5083838a78f..2e268e4e9ed9cc7398510736cca7a2afe0b11389 100644 --- a/tests/pytest/update/merge_commit_last.py +++ b/tests/pytest/update/merge_commit_last.py @@ -34,7 +34,7 @@ class TDTestCase: def run(self): tdSql.prepare() - tdSql.execute("create database udb update 1 days 30") + tdSql.execute("create database udb update 1 duration 30") tdSql.execute("use udb") print("==============step 1: UPDATE THE LAST RECORD REPEATEDLY") diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index bdda7c453b35b3c258d0bb62703a1a78d668bd13..79983f97d0357b72390ab55a50df7fdb4ab2e7a6 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -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 days 300' + s = 'create database db duration 300' self.cursor.execute(s) s = 'use db' self.cursor.execute(s) diff --git a/tests/pytest/util/taosdemoCfg.py b/tests/pytest/util/taosdemoCfg.py index d211f86b81d0b41237c645c7955a3d5a3099cf11..7523a808980fc924672cb8eedc0a338be0f8d745 100644 --- a/tests/pytest/util/taosdemoCfg.py +++ b/tests/pytest/util/taosdemoCfg.py @@ -63,7 +63,7 @@ class TDTaosdemoCfg: "name": 'db', "drop": 'yes', "replica": 1, - "days": 10, + "duration": 10, "cache": 16, "blocks": 6, "precision": "ms", diff --git a/tests/script/general/db/alter_option.sim b/tests/script/general/db/alter_option.sim index 36f4c0e7dcfca27f77b0e701adff47e06f9d1bb0..89a32b5a5c2590af39d7bcd7730f2abff4500f15 100644 --- a/tests/script/general/db/alter_option.sim +++ b/tests/script/general/db/alter_option.sim @@ -9,7 +9,7 @@ sleep 2000 sql connect print ============= create database -sql create database db cache 2 blocks 4 days 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 duration 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 days -sql_error alter database db days 0 -sql_error alter database db days 1 -sql_error alter database db days 2 -sql_error alter database db days 10 -sql_error alter database db days 50 -sql_error alter database db days 100 +print ============== step duration +sql_error alter database db duration 0 +sql_error alter database db duration 1 +sql_error alter database db duration 2 +sql_error alter database db duration 10 +sql_error alter database db duration 50 +sql_error alter database db duration 100 print ============== step keep sql show databases diff --git a/tests/script/general/db/backup/keep.sim b/tests/script/general/db/backup/keep.sim index 4d157b39857a639a83d24e1d8eb027492a4d40de..626040e347eac528bb8b611b3c64095ce4c96570 100644 --- a/tests/script/general/db/backup/keep.sim +++ b/tests/script/general/db/backup/keep.sim @@ -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 days 7 +sql create database keepdb replica 1 keep 30 duration 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 days 1 -x error3 +sql alter database keepdb duration 1 -x error3 return -1 error3: diff --git a/tests/script/general/db/topic1.sim b/tests/script/general/db/topic1.sim index 16399731208915602fea6dcd123fb85edf2e085b..b5058e8f9bb9049048707a40ff71e54570181100 100644 --- a/tests/script/general/db/topic1.sim +++ b/tests/script/general/db/topic1.sim @@ -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 days 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 duration 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 days 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 duration 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 days -sql_error alter database db days 0 -sql_error alter database db days 1 -sql_error alter database db days 2 -sql_error alter database db days 10 -sql_error alter database db days 50 -sql_error alter database db days 100 -sql_error alter topic db days 0 -sql_error alter topic db days 1 -sql_error alter topic db days 2 -sql_error alter topic db days 10 -sql_error alter topic db days 50 -sql_error alter topic db days 100 +print ============== step duration +sql_error alter database db duration 0 +sql_error alter database db duration 1 +sql_error alter database db duration 2 +sql_error alter database db duration 10 +sql_error alter database db duration 50 +sql_error alter database db duration 100 +sql_error alter topic db duration 0 +sql_error alter topic db duration 1 +sql_error alter topic db duration 2 +sql_error alter topic db duration 10 +sql_error alter topic db duration 50 +sql_error alter topic db duration 100 print ============== step keep sql show databases diff --git a/tests/script/general/import/commit.sim b/tests/script/general/import/commit.sim index 3b4055d7128442ee67621ffafa9869527b7a3801..aefc724fdb70e57cdf7a988464ed143c57d9a62c 100644 --- a/tests/script/general/import/commit.sim +++ b/tests/script/general/import/commit.sim @@ -30,7 +30,7 @@ sleep 2000 sql connect print ========= step1 -sql create database ic1db days 7; +sql create database ic1db duration 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 days 7; +sql create database ic2db duration 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); diff --git a/tests/script/general/import/replica1.sim b/tests/script/general/import/replica1.sim index 48d5455b7931bfc167112574c8193097aad74334..1e8eabb798164f7966e25fa5cc140189a710617a 100644 --- a/tests/script/general/import/replica1.sim +++ b/tests/script/general/import/replica1.sim @@ -30,7 +30,7 @@ system sh/exec.sh -n dnode1 -s start sleep 2000 sql connect -sql create database ir1db days 7 +sql create database ir1db duration 7 sql use ir1db sql create table tb(ts timestamp, i bigint) diff --git a/tests/script/general/parser/alter.sim b/tests/script/general/parser/alter.sim index d1a4702a69dce22e7de0de005d912e7813648e01..78c1a3029ab895c96ae849ed3b67c3cc760d1ab8 100644 --- a/tests/script/general/parser/alter.sim +++ b/tests/script/general/parser/alter.sim @@ -20,7 +20,7 @@ $db = $dbPrefix . $i $mt = $mtPrefix . $i sql drop database if exists $db -sql create database $db days 10 keep 20,20,20 +sql create database $db duration 10 keep 20,20,20 sql use $db sql_error alter database $db keep "20" diff --git a/tests/script/general/parser/alter__for_community_version.sim b/tests/script/general/parser/alter__for_community_version.sim index f55fb812a74eead44e54808b000a48c3db92b66d..7a9a9708229101419ec55abd8b96ed709f891fb2 100644 --- a/tests/script/general/parser/alter__for_community_version.sim +++ b/tests/script/general/parser/alter__for_community_version.sim @@ -20,7 +20,7 @@ $db = $dbPrefix . $i $mt = $mtPrefix . $i sql drop database if exists $db -sql create database $db days 10 keep 20 +sql create database $db duration 10 keep 20 sql use $db sql show databases if $rows != 1 then diff --git a/tests/script/general/parser/create_db.sim b/tests/script/general/parser/create_db.sim index a62a45e0233f5db81bc7565c856f08483c9d8aee..040331ec4f3a5398dd8de78c2b21436009e421bc 100644 --- a/tests/script/general/parser/create_db.sim +++ b/tests/script/general/parser/create_db.sim @@ -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 -$days = 10 +$duration = 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 days $days keep $keep maxrows $rows_db cache $cache blocks 4 ctime $ctime wal $wal comp $comp +sql create database $db replica $replica duration $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 != $days then +if $data06 != $duration then return -1 endi if $data07 != 365,365,365 then diff --git a/tests/script/general/parser/create_db__for_community_version.sim b/tests/script/general/parser/create_db__for_community_version.sim index 406e69b0e6a025c5e733ab753510f65677e4b550..5dc4263d5df9f22e611ea3948b3a7d8162dbd407 100644 --- a/tests/script/general/parser/create_db__for_community_version.sim +++ b/tests/script/general/parser/create_db__for_community_version.sim @@ -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 -$days = 10 +$duration = 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 days $days keep $keep maxrows $rows_db cache $cache blocks 4 ctime $ctime wal $wal comp $comp +sql create database $db replica $replica duration $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 != $days then +if $data06 != $duration then return -1 endi if $data07 != 365 then diff --git a/tests/script/tsim/db/alter_option.sim b/tests/script/tsim/db/alter_option.sim index 4692b9d91bfd6bb182492dd72404a970d79c0bb7..4351ee5cb1415d20f74daee4fa18b97471bb9654 100644 --- a/tests/script/tsim/db/alter_option.sim +++ b/tests/script/tsim/db/alter_option.sim @@ -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 [days, 365000] +# | KEEP value [duration, 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 # days +if $data6_db != 345600 then # duration 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 days -sql_error alter database db days 480 -sql_error alter database db days 360 -sql_error alter database db days 0 -sql_error alter database db days 14400 # set over than keep +#print ============== modify duration +sql_error alter database db duration 480 +sql_error alter database db duration 360 +sql_error alter database db duration 0 +sql_error alter database db duration 14400 # set over than keep print ============== modify keep sql alter database db keep 2400 diff --git a/tests/script/tsim/db/basic6.sim b/tests/script/tsim/db/basic6.sim index 142460f214a372c6f9084409a700c01a23238b36..64103b5dac39530b6ba6c8ef61cff9421a3421cc 100644 --- a/tests/script/tsim/db/basic6.sim +++ b/tests/script/tsim/db/basic6.sim @@ -15,7 +15,7 @@ $tb = $tbPrefix . $i print =============== step1 # quorum presicion -sql create database $db vgroups 8 replica 1 days 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 duration 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 days 15 keep 1500 +sql create database $db replica 1 duration 15 keep 1500 sql show databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 if $data20 != $db then diff --git a/tests/script/tsim/db/create_all_options.sim b/tests/script/tsim/db/create_all_options.sim index 03068698e2d70ee5b5c1d3d58f12dbe3b1b5011a..284875ee08489b3e745dcbf819fb9170ede49ccc 100644 --- a/tests/script/tsim/db/create_all_options.sim +++ b/tests/script/tsim/db/create_all_options.sim @@ -79,7 +79,7 @@ print ============= create database with all options #$data2_db : vgroups #$data3_db : ntables #$data4_db : replica -#$data6_db : days +#$data6_db : duration #$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 # days +if $data6_db != 14400 then # duration return -1 endi if $data7_db != 5256000m,5256000m,5256000m then # keep diff --git a/tests/script/tsim/insert/commit-merge0.sim b/tests/script/tsim/insert/commit-merge0.sim index adbd1904b2071ccc68f978ea1c2da40e208adc93..56e818654fc143d6e65a5e3c3fb4b207c28547d2 100644 --- a/tests/script/tsim/insert/commit-merge0.sim +++ b/tests/script/tsim/insert/commit-merge0.sim @@ -5,7 +5,7 @@ sleep 50 sql connect print =============== create database -sql create database db days 300 keep 365000d,365000d,365000d +sql create database db duration 300 keep 365000d,365000d,365000d sql show databases if $rows != 3 then return -1 diff --git a/tests/script/tsim/query/interval-offset.sim b/tests/script/tsim/query/interval-offset.sim index dcd88e5a0caba132ce6507bc4c0274ce40ecc301..ab6ee79d6e31c22a3704fa7831e2a492013e9e04 100644 --- a/tests/script/tsim/query/interval-offset.sim +++ b/tests/script/tsim/query/interval-offset.sim @@ -5,7 +5,7 @@ sleep 500 sql connect print =============== create database -sql create database d0 days 300 +sql create database d0 duration 300 sql use d0 print =============== create super table and child table diff --git a/tests/script/tsim/stable/alter_count.sim b/tests/script/tsim/stable/alter_count.sim index e5af9a5735e6f7f9844d055be8d4c2892d6b2ed7..eca8ca1559405f8e9266b987536c598d1fcc97cd 100644 --- a/tests/script/tsim/stable/alter_count.sim +++ b/tests/script/tsim/stable/alter_count.sim @@ -6,7 +6,7 @@ system sh/exec.sh -n dnode1 -s start sql connect print ======== step1 -sql create database d1 replica 1 days 7 keep 50 +sql create database d1 replica 1 duration 7 keep 50 sql use d1 sql create table tb (ts timestamp, a int) sql insert into tb values(now-28d, -28) diff --git a/tests/script/tsim/stable/alter_import.sim b/tests/script/tsim/stable/alter_import.sim index cdd7b60e14fc5e8f46f3413e9037a95f534718e1..b968eb6a124a8f8d232f03090e4ce67b06be735e 100644 --- a/tests/script/tsim/stable/alter_import.sim +++ b/tests/script/tsim/stable/alter_import.sim @@ -6,7 +6,7 @@ system sh/exec.sh -n dnode1 -s start sql connect print ======== step1 -sql create database d1 replica 1 days 7 keep 50 +sql create database d1 replica 1 duration 7 keep 50 sql use d1 sql create table tb (ts timestamp, a int) sql insert into tb values(now-30d, -28) diff --git a/tests/script/unique/db/commit.sim b/tests/script/unique/db/commit.sim index 661dd4505f704fff961739075247d4264d617f72..74c1366afb069eec0cdec5a4a96b02b42f7c16e5 100644 --- a/tests/script/unique/db/commit.sim +++ b/tests/script/unique/db/commit.sim @@ -24,7 +24,7 @@ system sh/exec.sh -n dnode2 -s start sleep 2000 print ======== step1 create db -sql create database commitdb replica 1 days 7 keep 30 +sql create database commitdb replica 1 duration 7 keep 30 sql use commitdb sql create table tb (ts timestamp, i int) diff --git a/tests/script/unique/import/replica2.sim b/tests/script/unique/import/replica2.sim index 54ce28543e741a1264e1bcf76c7152bee74564c0..387567fc82d3204d6e622fc7707627b9c7e552bc 100644 --- a/tests/script/unique/import/replica2.sim +++ b/tests/script/unique/import/replica2.sim @@ -52,7 +52,7 @@ if $data4_2 != ready then goto step1 endi -sql create database ir2db replica 2 days 7 +sql create database ir2db replica 2 duration 7 sql use ir2db sql create table tb(ts timestamp, i bigint) diff --git a/tests/script/unique/import/replica3.sim b/tests/script/unique/import/replica3.sim index 5da9e141a5867dd2e3d61114379ede589c0fa744..5c1b8b89322e579c7dc8474e74e6d0acbde4cec5 100644 --- a/tests/script/unique/import/replica3.sim +++ b/tests/script/unique/import/replica3.sim @@ -58,7 +58,7 @@ if $data4_3 != ready then goto step1 endi -sql create database ir3db replica 3 days 7 +sql create database ir3db replica 3 duration 7 sql use ir3db sql create table tb(ts timestamp, i bigint) diff --git a/tests/script/windows/db/basic.sim b/tests/script/windows/db/basic.sim index 914e456fe1e3a52ca107275b30995f88c37b0415..1f0fc31a6bd4db3c6d11f21b966638ba434b9585 100644 --- a/tests/script/windows/db/basic.sim +++ b/tests/script/windows/db/basic.sim @@ -17,7 +17,7 @@ $db = $dbPrefix . $i $tb = $tbPrefix . $i print =============== step1 -sql create database $db replica 1 days 20 keep 2000 cache 16 +sql create database $db replica 1 duration 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 days 15 keep 1500 +sql create database $db replica 1 duration 15 keep 1500 sql show databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 if $data00 != $db then diff --git a/tests/system-test/0-others/udfTest.py b/tests/system-test/0-others/udfTest.py index 57ae1c14905b6a6b620c999bb79e3c3b90c9fc73..9b145e9093a3fd979bc0057d386ee1b2c3efaeb5 100644 --- a/tests/system-test/0-others/udfTest.py +++ b/tests/system-test/0-others/udfTest.py @@ -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 days 300") + tdSql.execute("create database if not exists db duration 300") tdSql.execute("use db") tdSql.execute( '''create table stb1 diff --git a/tests/system-test/0-others/udf_cluster.py b/tests/system-test/0-others/udf_cluster.py index c5c0c7b8f2b460be28170f921c027575f28c7636..9ef3137a7e0ab28b4e1f396976d96322a10550eb 100644 --- a/tests/system-test/0-others/udf_cluster.py +++ b/tests/system-test/0-others/udf_cluster.py @@ -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 days 300") + tdSql.execute("create database if not exists db replica 1 duration 300") tdSql.execute("use db") tdSql.execute( '''create table stb1 diff --git a/tests/system-test/0-others/udf_create.py b/tests/system-test/0-others/udf_create.py index 170d9b1421ad146553d8d0a5e1d9c9632b4787be..11ad8e1584890067d10d0ef62be14df61c8a32c2 100644 --- a/tests/system-test/0-others/udf_create.py +++ b/tests/system-test/0-others/udf_create.py @@ -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 days 300") + tdSql.execute("create database if not exists db duration 300") tdSql.execute("use db") tdSql.execute( '''create table stb1 diff --git a/tests/system-test/0-others/udf_restart_taosd.py b/tests/system-test/0-others/udf_restart_taosd.py index 94b14f01ba92a3e5e2fd7d5f2a9238f05c993abb..c9eb22cf1508d6f36d9e67a5934ea18c78b1c09c 100644 --- a/tests/system-test/0-others/udf_restart_taosd.py +++ b/tests/system-test/0-others/udf_restart_taosd.py @@ -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 days 300") + tdSql.execute("create database if not exists db duration 300") tdSql.execute("use db") tdSql.execute( '''create table stb1 diff --git a/tests/system-test/2-query/abs.py b/tests/system-test/2-query/abs.py index d9c37be9963ba29ac456df9cc0a7096ed5454f16..d779cc26cd7560b8ae543bc9596eee388dfb98cc 100644 --- a/tests/system-test/2-query/abs.py +++ b/tests/system-test/2-query/abs.py @@ -68,7 +68,7 @@ class TDTestCase: def prepare_tag_datas(self): # prepare datas - tdSql.execute("create database if not exists testdb keep 3650 days 1000") + tdSql.execute("create database if not exists testdb keep 3650 duration 1000") tdSql.execute(" use testdb ") tdSql.execute( '''create table stb1 diff --git a/tests/system-test/2-query/sample.py b/tests/system-test/2-query/sample.py index 8c0cd83d4fd7d6114ded8cc9d238d9d36c362a5e..a84d93404a9f082ffa85c50d1eb8c015309308ec 100644 --- a/tests/system-test/2-query/sample.py +++ b/tests/system-test/2-query/sample.py @@ -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 days 300 ") + tdSql.execute(" create database if not exists db duration 300 ") tdSql.execute(" use db ") tdSql.execute( '''create table stb1 diff --git a/tests/system-test/6-cluster/5dnode1mnode.py b/tests/system-test/6-cluster/5dnode1mnode.py index 7c3715cd0b4bf6d9dcdc3a8a5ea60abe0f256c54..75134224db7abd0e63add5599897265dd32b08ee 100644 --- a/tests/system-test/6-cluster/5dnode1mnode.py +++ b/tests/system-test/6-cluster/5dnode1mnode.py @@ -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 days 300") + tdSql.execute("create database if not exists db replica 1 duration 300") tdSql.execute("use db") tdSql.execute( '''create table stb1 diff --git a/tests/system-test/6-cluster/5dnode2mnode.py b/tests/system-test/6-cluster/5dnode2mnode.py index 9d9cc9c0d61119087657f277692847ffd670aa69..04d9c9b3b4ba136ebad37d55c9418493b31d47ff 100644 --- a/tests/system-test/6-cluster/5dnode2mnode.py +++ b/tests/system-test/6-cluster/5dnode2mnode.py @@ -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 days 300") + tdSql.execute("create database if not exists db replica 1 duration 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 days 300") + tdSql.execute("create database if not exists db2 replica 1 duration 300") tdSql.execute("use db2") tdSql.execute( '''create table stb1 diff --git a/tests/system-test/6-cluster/5dnode3mnodeDrop.py b/tests/system-test/6-cluster/5dnode3mnodeDrop.py index 1512fc9897036973d49a4809af70d2f5ecf167cd..9c18c63b85605a05dabd442362b5ba361bde519f 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDrop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDrop.py @@ -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 days 300" %couti) + tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) tdSql.execute("use db%d" %couti) tdSql.execute( '''create table stb1 diff --git a/tests/system-test/6-cluster/5dnode3mnodeStop.py b/tests/system-test/6-cluster/5dnode3mnodeStop.py index a9784f2d0fd05348e0dda0f5df555196b86b6c88..08da7f910172dcc9f96cfdccd1a3bcad1b755408 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStop.py @@ -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 days 300" %couti) + tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) tdSql.execute("use db%d" %couti) tdSql.execute( '''create table stb1 diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py index 95cd26dedcdc433f920b11c939b1a6e779b7310c..bdb6cf28e1c893f3d5902d9f8710d5af1476c8ed 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py @@ -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 days 300" %couti) + tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) tdSql.execute("use db%d" %couti) tdSql.execute( '''create table stb1