Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1a1f4c17
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看板
提交
1a1f4c17
编写于
12月 31, 2022
作者:
K
kailixu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: add test case for update2
上级
e7e627d6
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
223 addition
and
0 deletion
+223
-0
tests/script/fullGeneralSuite.sim
tests/script/fullGeneralSuite.sim
+1
-0
tests/script/general/insert/insert_update2.sim
tests/script/general/insert/insert_update2.sim
+218
-0
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-0
tests/script/jenkins/simple.txt
tests/script/jenkins/simple.txt
+1
-0
tests/script/jenkins/wbasic.txt
tests/script/jenkins/wbasic.txt
+1
-0
tests/script/regressionSuite.sim
tests/script/regressionSuite.sim
+1
-0
未找到文件。
tests/script/fullGeneralSuite.sim
浏览文件 @
1a1f4c17
...
...
@@ -91,6 +91,7 @@ run general/import/large.sim
run general/import/replica1.sim
run general/insert/basic.sim
run general/insert/insert_drop.sim
run general/insert/insert_update2.sim
run general/insert/query_block1_memory.sim
run general/insert/query_block2_memory.sim
run general/insert/query_block1_file.sim
...
...
tests/script/general/insert/insert_update2.sim
0 → 100644
浏览文件 @
1a1f4c17
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
### 4096*0.8 - 1 = 3275
$rowSuperBlk = 3275
### 4096 - 3275 -1 - 1 = 819
$rowSubBlk = 819
$ts0 = 1672372800000
$ts1 = 1672372900000
$ts2 = 1672686800000
$i = 0
$db = db0
$stb1 = stb1
$tb1 = tb1
$stb2 = stb2
$tb2 = tb2
print ====== create database
sql drop database if exists $db
sql create database $db update 2 keep 1000 days 10
print ====== create tables
sql use $db
sql create table $stb1 (ts timestamp, c1 bigint, c2 bigint, c3 bigint) tags(t1 int)
sql create table $stb2 (ts timestamp, c1 bigint, c2 bigint, c3 bigint, c4 bigint, c5 bigint, c6 bigint, c7 bigint, c8 bigint, c9 bigint, c10 bigint, c11 bigint, c12 bigint, c13 bigint, c14 bigint, c15 bigint, c16 bigint, c17 bigint, c18 bigint, c19 bigint, c20 bigint, c21 bigint, c22 bigint, c23 bigint, c24 bigint, c25 bigint, c26 bigint, c27 bigint, c28 bigint, c29 bigint, c30 bigint) tags(t1 int)
sql create table $tb1 using $stb1 tags(1)
sql create table $tb2 using $stb2 tags(2)
print ====== tables created
print ========== step 1: merge dataRow in mem
$i = 0
while $i < $rowSuperBlk
$xs = $i * 10
$ts = $ts2 + $xs
sql insert into $tb1 (ts,c1) values ( $ts , $i )
$i = $i + 1
endw
sql insert into $tb1 values ( $ts0 , 1,NULL,0)
sql insert into $tb1 values ( $ts0 , NULL,1,1)
sql select * from $tb1 where ts = $ts0
if $rows != 1 then
return -1
endi
if $data01 != 1 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != 1 then
return -1
endi
print ========== step 2: merge kvRow in mem
$i = 0
while $i < $rowSuperBlk
$xs = $i * 10
$ts = $ts2 + $xs
sql insert into $tb2 (ts,c1) values ( $ts , $i )
$i = $i + 1
endw
sql insert into $tb2 (ts,c3,c8,c10) values ( $ts0 , 1,NULL,0)
sql insert into $tb2 (ts,c3,c8,c10) values ( $ts0 , NULL,1,1)
sql select ts,c1,c3,c8,c10 from $tb2 where ts = $ts0
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != 1 then
return -1
endi
if $data04 != 1 then
return -1
endi
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 2000
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sleep 2000
print ========== step 3: merge dataRow in file
sql insert into $tb1 values ( $ts0 , 2,NULL,NULL)
print ========== step 4: merge kvRow in file
sql insert into $tb2 (ts,c3,c8,c10) values ( $ts0 , 2,NULL,NULL)
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 2000
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sleep 2000
sql select * from $tb1 where ts = $ts0
if $rows != 1 then
return -1
endi
if $data01 != 2 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != 1 then
return -1
endi
sql select ts,c1,c3,c8,c10 from $tb2 where ts = $ts0
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
if $data02 != 2 then
return -1
endi
if $data03 != 1 then
return -1
endi
if $data04 != 1 then
return -1
endi
print ========== step 5: merge dataRow in file/mem
$i = 0
while $i < $rowSubBlk
$xs = $i * 1
$ts = $ts1 + $xs
sql insert into $tb1 (ts,c1) values ( $ts , $i )
$i = $i + 1
endw
print ========== step 6: merge kvRow in file/mem
$i = 0
while $i < $rowSubBlk
$xs = $i * 1
$ts = $ts1 + $xs
sql insert into $tb2 (ts,c1) values ( $ts , $i )
$i = $i + 1
endw
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 2000
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sleep 2000
sql insert into $tb1 values ( $ts0 , NULL,NULL,3)
sql insert into $tb2 (ts,c3,c8) values ( $ts0 , 3,NULL)
$tsN = $ts0 + 1
sql insert into $tb1 values ( $tsN , 1,NULL,0)
sql insert into $tb2 (ts,c3,c8) values ( $tsN , 100,200)
$tsN = $ts0 + 2
sql insert into $tb1 values ( $tsN , 1,NULL,0)
sql insert into $tb2 (ts,c3,c8) values ( $tsN , 100,200)
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 2000
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sleep 2000
sql select * from $tb1 where ts = $ts0
if $rows != 1 then
return -1
endi
if $data01 != 2 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != 3 then
return -1
endi
sql select ts,c1,c3,c8,c10 from $tb2 where ts = $ts0
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
if $data02 != 3 then
return -1
endi
if $data03 != 1 then
return -1
endi
### this check for fix TS-2306
if $data04 != 1 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
tests/script/jenkins/basic.txt
浏览文件 @
1a1f4c17
...
...
@@ -25,6 +25,7 @@ cd ../../../debug; make
# ./test.sh -f general/http/grafana.sim
./test.sh -f general/insert/basic.sim
./test.sh -f general/insert/insert_drop.sim
./test.sh -f general/insert/insert_update2.sim
./test.sh -f general/insert/query_block1_memory.sim
./test.sh -f general/insert/query_block2_memory.sim
./test.sh -f general/insert/query_block1_file.sim
...
...
tests/script/jenkins/simple.txt
浏览文件 @
1a1f4c17
...
...
@@ -92,6 +92,7 @@ cd ../../../debug; make
./test.sh -f general/insert/basic.sim
./test.sh -f general/insert/insert_drop.sim
./test.sh -f general/insert/insert_update2.sim
./test.sh -f general/insert/query_block1_memory.sim
./test.sh -f general/insert/query_block2_memory.sim
./test.sh -f general/insert/query_block1_file.sim
...
...
tests/script/jenkins/wbasic.txt
浏览文件 @
1a1f4c17
...
...
@@ -98,6 +98,7 @@ wtest.bat -f general/import/replica1.sim
wtest.bat -f general/insert/basic.sim
wtest.bat -f general/insert/insert_drop.sim
wtest.bat -f general/insert/insert_update2.sim
wtest.bat -f general/insert/query_block1_memory.sim
wtest.bat -f general/insert/query_block2_memory.sim
wtest.bat -f general/insert/query_block1_file.sim
...
...
tests/script/regressionSuite.sim
浏览文件 @
1a1f4c17
...
...
@@ -91,6 +91,7 @@ run general/import/large.sim
run general/import/replica1.sim
run general/insert/basic.sim
run general/insert/insert_drop.sim
run general/insert/insert_update2.sim
run general/insert/query_block1_memory.sim
run general/insert/query_block2_memory.sim
run general/insert/query_block1_file.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录