Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c14b74ef
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
未验证
提交
c14b74ef
编写于
7月 06, 2021
作者:
H
Hui Li
提交者:
GitHub
7月 06, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6738 from taosdata/test/TD-4985-m
Test/td 4985 m
上级
95a1c956
d72671fd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
264 addition
and
0 deletion
+264
-0
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+1
-0
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.csv
...test/tools/taosdemoAllTest/TD-4985/query-limit-offset.csv
+10
-0
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.json
...est/tools/taosdemoAllTest/TD-4985/query-limit-offset.json
+62
-0
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
...ytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
+191
-0
未找到文件。
tests/pytest/fulltest.sh
浏览文件 @
c14b74ef
...
...
@@ -334,6 +334,7 @@ python3 ./test.py -f tag_lite/alter_tag.py
python3 test.py
-f
tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
python3 test.py
-f
tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
python3 test.py
-f
tools/taosdemoAllTest/TD-4985/query-limit-offset.py
python3 ./test.py
-f
tag_lite/drop_auto_create.py
python3 test.py
-f
alter/alter_keep_exception.py
#======================p4-end===============
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.csv
0 → 100644
浏览文件 @
c14b74ef
0,0,'TAOSdata-0'
1,1,'TAOSdata-1'
2,22,'TAOSdata-2'
3,333,'TAOSdata-3'
4,4444,'TAOSdata-4'
5,55555,'TAOSdata-5'
6,666666,'TAOSdata-6'
7,7777777,'TAOSdata-7'
8,88888888,'TAOSdata-8'
9,999999999,'TAOSdata-9'
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.json
0 → 100644
浏览文件 @
c14b74ef
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
10
,
"thread_count_create_tbl"
:
10
,
"result_file"
:
"./insert_res.txt"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
10
,
"num_of_records_per_req"
:
1
,
"max_sql_len"
:
1024000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
50
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
365
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
10000
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
1
,
"data_source"
:
"sample"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
10
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./tools/taosdemoAllTest/TD-4985/query-limit-offset.csv"
,
"tags_file"
:
"./tools/taosdemoAllTest/TD-4985/query-limit-offset.csv"
,
"columns"
:
[{
"type"
:
"INT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"INT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
0 → 100644
浏览文件 @
c14b74ef
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
os
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
getBuildPath
(
self
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
projPath
=
selfPath
[:
selfPath
.
find
(
"community"
)]
else
:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
break
return
buildPath
def
run
(
self
):
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
tdLog
.
exit
(
"taosd not found!"
)
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# test case for https://jira.taosdata.com:18080/browse/TD-4985
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/TD-4985/query-limit-offset.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
for
i
in
range
(
1000
):
tdSql
.
execute
(
'''insert into stb00_9999 values(%d, %d, %d,'test99.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_8888 values(%d, %d, %d,'test98.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_7777 values(%d, %d, %d,'test97.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_6666 values(%d, %d, %d,'test96.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_5555 values(%d, %d, %d,'test95.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_4444 values(%d, %d, %d,'test94.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_3333 values(%d, %d, %d,'test93.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_2222 values(%d, %d, %d,'test92.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_1111 values(%d, %d, %d,'test91.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
execute
(
'''insert into stb00_100 values(%d, %d, %d,'test90.%s')'''
%
(
1600000000000
+
i
,
i
,
-
10000
+
i
,
i
))
tdSql
.
query
(
"select * from stb0 where col2 like 'test99%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_9999' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_9999' limit 10 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test98%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_8888' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_8888' limit 10 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test97%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_7777' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_7777' limit 10 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test96%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_6666' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_6666' limit 10 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test95%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_5555' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_5555' limit 10 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test94%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_4444' limit 10"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_4444' limit 10 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test93%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_3333' limit 100"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_3333' limit 100 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test92%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_2222' limit 100"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_2222' limit 100 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test91%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_1111' limit 100"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_1111' limit 100 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
tdSql
.
query
(
"select * from stb0 where col2 like 'test90%' "
)
tdSql
.
checkRows
(
1000
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_100' limit 100"
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
query
(
"select * from stb0 where tbname like 'stb00_100' limit 100 offset 5"
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
1
,
1
,
6
)
tdSql
.
checkData
(
2
,
1
,
7
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/TD-4985/query-limit-offset.py.sql"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录