Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
adminstrot
TDengine
提交
2d872feb
TDengine
项目概览
adminstrot
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
2d872feb
编写于
5月 22, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
5月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1982 from taosdata/feature/pytest-output-sql-command-to-file
Feature/pytest output sql command to file
上级
172f3b61
f7181a5e
变更
136
展开全部
隐藏空白更改
内联
并排
Showing
136 changed file
with
430 addition
and
339 deletion
+430
-339
src/connector/python/linux/python2/taos/cursor.py
src/connector/python/linux/python2/taos/cursor.py
+9
-0
src/connector/python/linux/python3/taos/cursor.py
src/connector/python/linux/python3/taos/cursor.py
+8
-0
tests/pytest/account/account_create.py
tests/pytest/account/account_create.py
+2
-2
tests/pytest/account/account_del.py
tests/pytest/account/account_del.py
+2
-2
tests/pytest/alter/alter_stable.py
tests/pytest/alter/alter_stable.py
+2
-2
tests/pytest/alter/alter_table.py
tests/pytest/alter/alter_table.py
+2
-2
tests/pytest/alter/file_corrupt.py
tests/pytest/alter/file_corrupt.py
+2
-2
tests/pytest/dbmgmt/database-name-boundary.py
tests/pytest/dbmgmt/database-name-boundary.py
+2
-2
tests/pytest/dbmgmt/dropDB_memory_test.py
tests/pytest/dbmgmt/dropDB_memory_test.py
+2
-2
tests/pytest/import_merge/importBlock1H.py
tests/pytest/import_merge/importBlock1H.py
+2
-2
tests/pytest/import_merge/importBlock1HO.py
tests/pytest/import_merge/importBlock1HO.py
+2
-2
tests/pytest/import_merge/importBlock1HPO.py
tests/pytest/import_merge/importBlock1HPO.py
+2
-2
tests/pytest/import_merge/importBlock1S.py
tests/pytest/import_merge/importBlock1S.py
+2
-2
tests/pytest/import_merge/importBlock1Sub.py
tests/pytest/import_merge/importBlock1Sub.py
+2
-2
tests/pytest/import_merge/importBlock1T.py
tests/pytest/import_merge/importBlock1T.py
+2
-2
tests/pytest/import_merge/importBlock1TO.py
tests/pytest/import_merge/importBlock1TO.py
+2
-2
tests/pytest/import_merge/importBlock1TPO.py
tests/pytest/import_merge/importBlock1TPO.py
+2
-2
tests/pytest/import_merge/importBlock2H.py
tests/pytest/import_merge/importBlock2H.py
+2
-2
tests/pytest/import_merge/importBlock2HO.py
tests/pytest/import_merge/importBlock2HO.py
+2
-2
tests/pytest/import_merge/importBlock2HPO.py
tests/pytest/import_merge/importBlock2HPO.py
+2
-2
tests/pytest/import_merge/importBlock2S.py
tests/pytest/import_merge/importBlock2S.py
+2
-2
tests/pytest/import_merge/importBlock2Sub.py
tests/pytest/import_merge/importBlock2Sub.py
+2
-2
tests/pytest/import_merge/importBlock2T.py
tests/pytest/import_merge/importBlock2T.py
+2
-2
tests/pytest/import_merge/importBlock2TO.py
tests/pytest/import_merge/importBlock2TO.py
+2
-2
tests/pytest/import_merge/importBlock2TPO.py
tests/pytest/import_merge/importBlock2TPO.py
+2
-2
tests/pytest/import_merge/importBlockbetween.py
tests/pytest/import_merge/importBlockbetween.py
+2
-2
tests/pytest/import_merge/importCacheFileH.py
tests/pytest/import_merge/importCacheFileH.py
+2
-2
tests/pytest/import_merge/importCacheFileHO.py
tests/pytest/import_merge/importCacheFileHO.py
+2
-2
tests/pytest/import_merge/importCacheFileHPO.py
tests/pytest/import_merge/importCacheFileHPO.py
+2
-2
tests/pytest/import_merge/importCacheFileS.py
tests/pytest/import_merge/importCacheFileS.py
+2
-2
tests/pytest/import_merge/importCacheFileSub.py
tests/pytest/import_merge/importCacheFileSub.py
+2
-2
tests/pytest/import_merge/importCacheFileT.py
tests/pytest/import_merge/importCacheFileT.py
+2
-2
tests/pytest/import_merge/importCacheFileTO.py
tests/pytest/import_merge/importCacheFileTO.py
+2
-2
tests/pytest/import_merge/importCacheFileTPO.py
tests/pytest/import_merge/importCacheFileTPO.py
+2
-2
tests/pytest/import_merge/importDataH2.py
tests/pytest/import_merge/importDataH2.py
+2
-2
tests/pytest/import_merge/importDataHO.py
tests/pytest/import_merge/importDataHO.py
+2
-2
tests/pytest/import_merge/importDataHO2.py
tests/pytest/import_merge/importDataHO2.py
+2
-2
tests/pytest/import_merge/importDataHPO.py
tests/pytest/import_merge/importDataHPO.py
+2
-2
tests/pytest/import_merge/importDataLastH.py
tests/pytest/import_merge/importDataLastH.py
+2
-2
tests/pytest/import_merge/importDataLastHO.py
tests/pytest/import_merge/importDataLastHO.py
+2
-2
tests/pytest/import_merge/importDataLastHPO.py
tests/pytest/import_merge/importDataLastHPO.py
+2
-2
tests/pytest/import_merge/importDataLastS.py
tests/pytest/import_merge/importDataLastS.py
+2
-2
tests/pytest/import_merge/importDataLastSub.py
tests/pytest/import_merge/importDataLastSub.py
+2
-2
tests/pytest/import_merge/importDataLastT.py
tests/pytest/import_merge/importDataLastT.py
+2
-2
tests/pytest/import_merge/importDataLastTO.py
tests/pytest/import_merge/importDataLastTO.py
+2
-2
tests/pytest/import_merge/importDataLastTPO.py
tests/pytest/import_merge/importDataLastTPO.py
+2
-2
tests/pytest/import_merge/importDataS.py
tests/pytest/import_merge/importDataS.py
+2
-2
tests/pytest/import_merge/importDataSub.py
tests/pytest/import_merge/importDataSub.py
+2
-2
tests/pytest/import_merge/importDataT.py
tests/pytest/import_merge/importDataT.py
+2
-2
tests/pytest/import_merge/importDataTO.py
tests/pytest/import_merge/importDataTO.py
+2
-2
tests/pytest/import_merge/importDataTPO.py
tests/pytest/import_merge/importDataTPO.py
+2
-2
tests/pytest/import_merge/importHORestart.py
tests/pytest/import_merge/importHORestart.py
+2
-2
tests/pytest/import_merge/importHPORestart.py
tests/pytest/import_merge/importHPORestart.py
+2
-2
tests/pytest/import_merge/importHRestart.py
tests/pytest/import_merge/importHRestart.py
+2
-2
tests/pytest/import_merge/importHead.py
tests/pytest/import_merge/importHead.py
+2
-2
tests/pytest/import_merge/importHeadOverlap.py
tests/pytest/import_merge/importHeadOverlap.py
+2
-2
tests/pytest/import_merge/importHeadPartOverlap.py
tests/pytest/import_merge/importHeadPartOverlap.py
+2
-2
tests/pytest/import_merge/importLastH.py
tests/pytest/import_merge/importLastH.py
+2
-2
tests/pytest/import_merge/importLastHO.py
tests/pytest/import_merge/importLastHO.py
+2
-2
tests/pytest/import_merge/importLastHPO.py
tests/pytest/import_merge/importLastHPO.py
+2
-2
tests/pytest/import_merge/importLastS.py
tests/pytest/import_merge/importLastS.py
+2
-2
tests/pytest/import_merge/importLastSub.py
tests/pytest/import_merge/importLastSub.py
+2
-2
tests/pytest/import_merge/importLastT.py
tests/pytest/import_merge/importLastT.py
+2
-2
tests/pytest/import_merge/importLastTO.py
tests/pytest/import_merge/importLastTO.py
+2
-2
tests/pytest/import_merge/importLastTPO.py
tests/pytest/import_merge/importLastTPO.py
+2
-2
tests/pytest/import_merge/importSRestart.py
tests/pytest/import_merge/importSRestart.py
+2
-2
tests/pytest/import_merge/importSpan.py
tests/pytest/import_merge/importSpan.py
+2
-2
tests/pytest/import_merge/importSubRestart.py
tests/pytest/import_merge/importSubRestart.py
+2
-2
tests/pytest/import_merge/importTORestart.py
tests/pytest/import_merge/importTORestart.py
+2
-2
tests/pytest/import_merge/importTPORestart.py
tests/pytest/import_merge/importTPORestart.py
+2
-2
tests/pytest/import_merge/importTRestart.py
tests/pytest/import_merge/importTRestart.py
+2
-2
tests/pytest/import_merge/importTail.py
tests/pytest/import_merge/importTail.py
+2
-2
tests/pytest/import_merge/importTailOverlap.py
tests/pytest/import_merge/importTailOverlap.py
+2
-2
tests/pytest/import_merge/importTailPartOverlap.py
tests/pytest/import_merge/importTailPartOverlap.py
+2
-2
tests/pytest/import_merge/importToCommit.py
tests/pytest/import_merge/importToCommit.py
+4
-3
tests/pytest/insert/basic.py
tests/pytest/insert/basic.py
+2
-2
tests/pytest/insert/bigint.py
tests/pytest/insert/bigint.py
+2
-2
tests/pytest/insert/binary-boundary.py
tests/pytest/insert/binary-boundary.py
+2
-2
tests/pytest/insert/binary.py
tests/pytest/insert/binary.py
+2
-2
tests/pytest/insert/bool.py
tests/pytest/insert/bool.py
+2
-2
tests/pytest/insert/date.py
tests/pytest/insert/date.py
+2
-2
tests/pytest/insert/double.py
tests/pytest/insert/double.py
+2
-2
tests/pytest/insert/float.py
tests/pytest/insert/float.py
+2
-2
tests/pytest/insert/int.py
tests/pytest/insert/int.py
+2
-2
tests/pytest/insert/multi.py
tests/pytest/insert/multi.py
+2
-2
tests/pytest/insert/nchar-boundary.py
tests/pytest/insert/nchar-boundary.py
+2
-2
tests/pytest/insert/nchar-unicode.py
tests/pytest/insert/nchar-unicode.py
+2
-2
tests/pytest/insert/nchar.py
tests/pytest/insert/nchar.py
+2
-2
tests/pytest/insert/smallint.py
tests/pytest/insert/smallint.py
+2
-2
tests/pytest/insert/tinyint.py
tests/pytest/insert/tinyint.py
+2
-2
tests/pytest/query/query.py
tests/pytest/query/query.py
+2
-2
tests/pytest/query/tbname.py
tests/pytest/query/tbname.py
+2
-2
tests/pytest/random-test/random-test.py
tests/pytest/random-test/random-test.py
+16
-3
tests/pytest/stable/insert.py
tests/pytest/stable/insert.py
+2
-2
tests/pytest/table/alter_column.py
tests/pytest/table/alter_column.py
+2
-2
tests/pytest/table/boundary.py
tests/pytest/table/boundary.py
+65
-73
tests/pytest/table/column_name.py
tests/pytest/table/column_name.py
+2
-2
tests/pytest/table/column_num.py
tests/pytest/table/column_num.py
+2
-2
tests/pytest/table/create-a-lot.py
tests/pytest/table/create-a-lot.py
+45
-0
tests/pytest/table/create.py
tests/pytest/table/create.py
+2
-2
tests/pytest/table/db_table.py
tests/pytest/table/db_table.py
+2
-2
tests/pytest/table/del_stable.py
tests/pytest/table/del_stable.py
+2
-2
tests/pytest/table/tablename-boundary.py
tests/pytest/table/tablename-boundary.py
+2
-2
tests/pytest/tag_lite/3.py
tests/pytest/tag_lite/3.py
+2
-2
tests/pytest/tag_lite/4.py
tests/pytest/tag_lite/4.py
+2
-2
tests/pytest/tag_lite/5.py
tests/pytest/tag_lite/5.py
+2
-2
tests/pytest/tag_lite/6.py
tests/pytest/tag_lite/6.py
+2
-2
tests/pytest/tag_lite/add.py
tests/pytest/tag_lite/add.py
+2
-2
tests/pytest/tag_lite/bigint.py
tests/pytest/tag_lite/bigint.py
+2
-2
tests/pytest/tag_lite/binary.py
tests/pytest/tag_lite/binary.py
+2
-2
tests/pytest/tag_lite/binary_binary.py
tests/pytest/tag_lite/binary_binary.py
+2
-2
tests/pytest/tag_lite/bool.py
tests/pytest/tag_lite/bool.py
+2
-2
tests/pytest/tag_lite/bool_binary.py
tests/pytest/tag_lite/bool_binary.py
+2
-2
tests/pytest/tag_lite/bool_int.py
tests/pytest/tag_lite/bool_int.py
+2
-2
tests/pytest/tag_lite/change.py
tests/pytest/tag_lite/change.py
+2
-2
tests/pytest/tag_lite/column.py
tests/pytest/tag_lite/column.py
+2
-2
tests/pytest/tag_lite/commit.py
tests/pytest/tag_lite/commit.py
+2
-2
tests/pytest/tag_lite/create-tags-boundary.py
tests/pytest/tag_lite/create-tags-boundary.py
+2
-2
tests/pytest/tag_lite/create.py
tests/pytest/tag_lite/create.py
+2
-2
tests/pytest/tag_lite/datatype-without-alter.py
tests/pytest/tag_lite/datatype-without-alter.py
+2
-2
tests/pytest/tag_lite/datatype.py
tests/pytest/tag_lite/datatype.py
+2
-2
tests/pytest/tag_lite/delete.py
tests/pytest/tag_lite/delete.py
+2
-2
tests/pytest/tag_lite/double.py
tests/pytest/tag_lite/double.py
+2
-2
tests/pytest/tag_lite/filter.py
tests/pytest/tag_lite/filter.py
+2
-2
tests/pytest/tag_lite/float.py
tests/pytest/tag_lite/float.py
+2
-2
tests/pytest/tag_lite/int.py
tests/pytest/tag_lite/int.py
+2
-2
tests/pytest/tag_lite/int_binary.py
tests/pytest/tag_lite/int_binary.py
+2
-2
tests/pytest/tag_lite/int_float.py
tests/pytest/tag_lite/int_float.py
+2
-2
tests/pytest/tag_lite/set.py
tests/pytest/tag_lite/set.py
+2
-2
tests/pytest/tag_lite/smallint.py
tests/pytest/tag_lite/smallint.py
+2
-2
tests/pytest/tag_lite/tinyint.py
tests/pytest/tag_lite/tinyint.py
+2
-2
tests/pytest/test.py
tests/pytest/test.py
+17
-3
tests/pytest/user/pass_len.py
tests/pytest/user/pass_len.py
+2
-2
tests/pytest/user/user_create.py
tests/pytest/user/user_create.py
+2
-2
tests/pytest/util/cases.py
tests/pytest/util/cases.py
+5
-1
tests/pytest/util/sql.py
tests/pytest/util/sql.py
+7
-2
未找到文件。
src/connector/python/linux/python2/taos/cursor.py
浏览文件 @
2d872feb
...
...
@@ -34,6 +34,7 @@ class TDengineCursor(object):
self
.
_block_rows
=
-
1
self
.
_block_iter
=
0
self
.
_affected_rows
=
0
self
.
_logfile
=
""
if
connection
is
not
None
:
self
.
_connection
=
connection
...
...
@@ -83,6 +84,9 @@ class TDengineCursor(object):
"""
pass
def
log
(
self
,
logfile
):
self
.
_logfile
=
logfile
def
close
(
self
):
"""Close the cursor.
"""
...
...
@@ -113,6 +117,11 @@ class TDengineCursor(object):
pass
res
=
CTaosInterface
.
query
(
self
.
_connection
.
_conn
,
stmt
)
if
(
self
.
_logfile
):
with
open
(
self
.
_logfile
,
"a"
)
as
logfile
:
logfile
.
write
(
"%s;
\n
"
%
operation
)
if
res
==
0
:
if
CTaosInterface
.
fieldsCount
(
self
.
_connection
.
_conn
)
==
0
:
self
.
_affected_rows
+=
CTaosInterface
.
affectedRows
(
...
...
src/connector/python/linux/python3/taos/cursor.py
浏览文件 @
2d872feb
...
...
@@ -36,6 +36,7 @@ class TDengineCursor(object):
self
.
_block_rows
=
-
1
self
.
_block_iter
=
0
self
.
_affected_rows
=
0
self
.
_logfile
=
""
if
connection
is
not
None
:
self
.
_connection
=
connection
...
...
@@ -85,6 +86,9 @@ class TDengineCursor(object):
"""
pass
def
log
(
self
,
logfile
):
self
.
_logfile
=
logfile
def
close
(
self
):
"""Close the cursor.
"""
...
...
@@ -121,6 +125,10 @@ class TDengineCursor(object):
res
=
CTaosInterface
.
query
(
self
.
_connection
.
_conn
,
stmt
)
# print(" << Query ({}) Exec Done".format(localSeqNum))
if
(
self
.
_logfile
):
with
open
(
self
.
_logfile
,
"a"
)
as
logfile
:
logfile
.
write
(
"%s;
\n
"
%
operation
)
if
res
==
0
:
if
CTaosInterface
.
fieldsCount
(
self
.
_connection
.
_conn
)
==
0
:
self
.
_affected_rows
+=
CTaosInterface
.
affectedRows
(
...
...
tests/pytest/account/account_create.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
try
:
...
...
tests/pytest/account/account_del.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
print
(
"==========step1"
)
...
...
tests/pytest/alter/alter_stable.py
浏览文件 @
2d872feb
...
...
@@ -9,9 +9,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
self
.
types
=
[
"int"
,
"bigint"
,
...
...
tests/pytest/alter/alter_table.py
浏览文件 @
2d872feb
...
...
@@ -9,9 +9,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
self
.
types
=
[
"int"
,
"bigint"
,
...
...
tests/pytest/alter/file_corrupt.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/dbmgmt/database-name-boundary.py
浏览文件 @
2d872feb
...
...
@@ -23,9 +23,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
...
...
tests/pytest/dbmgmt/dropDB_memory_test.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/import_merge/importBlock1H.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock1HO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock1HPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock1S.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock1Sub.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock1T.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock1TO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock1TPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock2H.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock2HO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock2HPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock2S.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock2Sub.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock2T.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock2TO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlock2TPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importBlockbetween.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importCacheFileH.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importCacheFileHO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importCacheFileHPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importCacheFileS.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importCacheFileSub.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importCacheFileT.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importCacheFileTO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importCacheFileTPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataH2.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataHO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataHO2.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataHPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataLastH.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataLastHO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataLastHPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataLastS.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataLastSub.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataLastT.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataLastTO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataLastTPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataS.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataSub.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataT.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataTO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importDataTPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importHORestart.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importHPORestart.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importHRestart.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importHead.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importHeadOverlap.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importHeadPartOverlap.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importLastH.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importLastHO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importLastHPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importLastS.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importLastSub.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importLastT.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importLastTO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importLastTPO.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importSRestart.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importSpan.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importSubRestart.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importTORestart.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importTPORestart.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importTRestart.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importTail.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importTailOverlap.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importTailPartOverlap.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
tests/pytest/import_merge/importToCommit.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.dnodes import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
self
.
ntables
=
1
...
...
@@ -45,7 +45,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
'insert data until the first commit'
)
dnodesDir
=
tdDnodes
.
getDnodesRootDir
()
dataDir
=
dnodesDir
+
'/dnode1/data/data'
dataDir
=
dnodesDir
+
'/dnode1/data/vnode'
tdLog
.
info
(
'CBD: dataDir=%s'
%
dataDir
)
startTime
=
self
.
startTime
rid0
=
1
while
(
True
):
...
...
tests/pytest/insert/basic.py
浏览文件 @
2d872feb
...
...
@@ -18,9 +18,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/bigint.py
浏览文件 @
2d872feb
...
...
@@ -7,9 +7,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/binary-boundary.py
浏览文件 @
2d872feb
...
...
@@ -7,9 +7,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/binary.py
浏览文件 @
2d872feb
...
...
@@ -7,9 +7,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/bool.py
浏览文件 @
2d872feb
...
...
@@ -7,9 +7,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/date.py
浏览文件 @
2d872feb
...
...
@@ -7,9 +7,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/double.py
浏览文件 @
2d872feb
...
...
@@ -7,9 +7,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/float.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/int.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/multi.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.sql import tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/nchar-boundary.py
浏览文件 @
2d872feb
...
...
@@ -18,9 +18,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/nchar-unicode.py
浏览文件 @
2d872feb
...
...
@@ -18,9 +18,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/nchar.py
浏览文件 @
2d872feb
...
...
@@ -18,9 +18,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/smallint.py
浏览文件 @
2d872feb
...
...
@@ -7,9 +7,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/insert/tinyint.py
浏览文件 @
2d872feb
...
...
@@ -7,9 +7,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/query/query.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/query/tbname.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/random-test/random-test.py
浏览文件 @
2d872feb
...
...
@@ -108,11 +108,23 @@ class Test:
tdDnodes
.
start
(
1
)
tdSql
.
prepare
()
def
delete_datafiles
(
self
):
tdLog
.
info
(
"delete data files"
)
dnodesDir
=
tdDnodes
.
getDnodesRootDir
()
dataDir
=
dnodesDir
+
'/dnode1/*'
deleteCmd
=
'rm -rf %s'
%
dataDir
os
.
system
(
deleteCmd
)
self
.
current_tb
=
""
self
.
last_tb
=
""
self
.
written
=
0
tdDnodes
.
start
(
1
)
tdSql
.
prepare
()
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
@@ -129,10 +141,11 @@ class TDTestCase:
7
:
test
.
drop_table
,
8
:
test
.
reset_query_cache
,
9
:
test
.
reset_database
,
10
:
test
.
delete_datafiles
,
}
for
x
in
range
(
1
,
100
):
r
=
random
.
randint
(
1
,
9
)
r
=
random
.
randint
(
1
,
10
)
tdLog
.
notice
(
"iteration %d run func %d"
%
(
x
,
r
))
switch
.
get
(
r
,
lambda
:
"ERROR"
)()
...
...
tests/pytest/stable/insert.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/table/alter_column.py
浏览文件 @
2d872feb
...
...
@@ -20,9 +20,9 @@ from util.sql import tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/table/boundary.py
浏览文件 @
2d872feb
...
...
@@ -10,140 +10,133 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
getLimitFromSourceCode
(
self
,
name
):
def
getLimitFromSourceCode
(
self
,
name
):
cmd
=
"grep -w '#define %s' ../../src/inc/taosdef.h|awk '{print $3}'"
%
name
return
int
(
subprocess
.
check_output
(
cmd
,
shell
=
True
))
def
generateString
(
self
,
length
):
def
generateString
(
self
,
length
):
chars
=
string
.
ascii_uppercase
+
string
.
ascii_lowercase
v
=
""
for
i
in
range
(
length
):
v
+=
random
.
choice
(
chars
)
for
i
in
range
(
length
):
v
+=
random
.
choice
(
chars
)
return
v
def
checkTagBoundaries
(
self
):
tdLog
.
debug
(
"checking tag boundaries"
)
def
checkTagBoundaries
(
self
):
tdLog
.
debug
(
"checking tag boundaries"
)
tdSql
.
prepare
()
maxTags
=
self
.
getLimitFromSourceCode
(
'TSDB_MAX_TAGS'
)
totalTagsLen
=
self
.
getLimitFromSourceCode
(
'TSDB_MAX_TAGS_LEN'
)
tdLog
.
notice
(
"max tags is %d"
%
maxTags
)
tdLog
.
notice
(
"max total tag length is %d"
%
totalTagsLen
)
maxTags
=
self
.
getLimitFromSourceCode
(
'TSDB_MAX_TAGS'
)
totalTagsLen
=
self
.
getLimitFromSourceCode
(
'TSDB_MAX_TAGS_LEN'
)
tdLog
.
notice
(
"max tags is %d"
%
maxTags
)
tdLog
.
notice
(
"max total tag length is %d"
%
totalTagsLen
)
# for binary tags, 2 bytes are used for length
tagLen
=
(
totalTagsLen
-
maxTags
*
2
)
//
maxTags
firstTagLen
=
totalTagsLen
-
2
*
maxTags
-
tagLen
*
(
maxTags
-
1
)
sql
=
"create table cars(ts timestamp, f int) tags(t0 binary(%d)"
%
firstTagLen
for
i
in
range
(
1
,
maxTags
):
for
i
in
range
(
1
,
maxTags
):
sql
+=
", t%d binary(%d)"
%
(
i
,
tagLen
)
sql
+=
");"
tdLog
.
debug
(
"creating super table: "
+
sql
)
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'show stables'
)
tdSql
.
checkRows
(
1
)
tdLog
.
debug
(
"creating super table: "
+
sql
)
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'show stables'
)
tdSql
.
checkRows
(
1
)
for
i
in
range
(
10
):
for
i
in
range
(
10
):
sql
=
"create table car%d using cars tags('%d'"
%
(
i
,
i
)
sql
+=
", '0'"
*
(
maxTags
-
1
)
+
");"
tdLog
.
debug
(
"creating table: "
+
sql
)
tdSql
.
execute
(
sql
)
tdLog
.
debug
(
"creating table: "
+
sql
)
tdSql
.
execute
(
sql
)
sql
=
"insert into car%d values(now, 0);"
%
i
tdLog
.
debug
(
"inserting data: "
+
sql
)
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'show tables'
)
tdLog
.
info
(
'tdSql.checkRow(10)'
)
tdSql
.
checkRows
(
10
)
tdLog
.
debug
(
"inserting data: "
+
sql
)
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'select * from cars;'
)
tdSql
.
checkRows
(
10
)
tdSql
.
query
(
'show tables'
)
tdLog
.
info
(
'tdSql.checkRow(10)'
)
tdSql
.
checkRows
(
10
)
tdSql
.
query
(
'select * from cars;'
)
tdSql
.
checkRows
(
10
)
def
checkColumnBoundaries
(
self
):
tdLog
.
debug
(
"checking column boundaries"
)
def
checkColumnBoundaries
(
self
):
tdLog
.
debug
(
"checking column boundaries"
)
tdSql
.
prepare
()
# one column is for timestamp
maxCols
=
self
.
getLimitFromSourceCode
(
'TSDB_MAX_COLUMNS'
)
-
1
maxCols
=
self
.
getLimitFromSourceCode
(
'TSDB_MAX_COLUMNS'
)
-
1
sql
=
"create table cars (ts timestamp"
for
i
in
range
(
maxCols
):
for
i
in
range
(
maxCols
):
sql
+=
", c%d int"
%
i
sql
+=
");"
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
1
)
sql
=
"insert into cars values (now"
for
i
in
range
(
maxCols
):
for
i
in
range
(
maxCols
):
sql
+=
", %d"
%
i
sql
+=
");"
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'select * from cars'
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'select * from cars'
)
tdSql
.
checkRows
(
1
)
def
checkTableNameBoundaries
(
self
):
tdLog
.
debug
(
"checking table name boundaries"
)
def
checkTableNameBoundaries
(
self
):
tdLog
.
debug
(
"checking table name boundaries"
)
tdSql
.
prepare
()
maxTableNameLen
=
self
.
getLimitFromSourceCode
(
'TSDB_TABLE_NAME_LEN'
)
tdLog
.
notice
(
"table name max length is %d"
%
maxTableNameLen
)
name
=
self
.
generateString
(
maxTableNameLen
-
1
)
tdLog
.
info
(
"table name is '%s'"
%
name
)
maxTableNameLen
=
self
.
getLimitFromSourceCode
(
'TSDB_TABLE_NAME_LEN'
)
tdLog
.
notice
(
"table name max length is %d"
%
maxTableNameLen
)
tdSql
.
execute
(
"create table %s (ts timestamp, value int)"
%
name
)
td
Sql
.
execute
(
"insert into %s values(now, 0)"
%
name
)
name
=
self
.
generateString
(
maxTableNameLen
-
1
)
td
Log
.
info
(
"table name is '%s'"
%
name
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
"create table %s (ts timestamp, value int)"
%
name
)
tdSql
.
execute
(
"insert into %s values(now, 0)"
%
name
)
tdSql
.
query
(
'select * from %s'
%
name
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
'select * from %s'
%
name
)
tdSql
.
checkRows
(
1
)
def
checkRowBoundaries
(
self
):
tdLog
.
debug
(
"checking row boundaries"
)
def
checkRowBoundaries
(
self
):
tdLog
.
debug
(
"checking row boundaries"
)
tdSql
.
prepare
()
# 8 bytes for timestamp
maxRowSize
=
65536
-
8
maxCols
=
self
.
getLimitFromSourceCode
(
'TSDB_MAX_COLUMNS'
)
-
1
maxCols
=
self
.
getLimitFromSourceCode
(
'TSDB_MAX_COLUMNS'
)
-
1
# for binary cols, 2 bytes are used for length
colLen
=
(
maxRowSize
-
maxCols
*
2
)
//
maxCols
firstColLen
=
maxRowSize
-
2
*
maxCols
-
colLen
*
(
maxCols
-
1
)
sql
=
"create table cars (ts timestamp, c0 binary(%d)"
%
firstColLen
for
i
in
range
(
1
,
maxCols
):
for
i
in
range
(
1
,
maxCols
):
sql
+=
", c%d binary(%d)"
%
(
i
,
colLen
)
sql
+=
");"
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
sql
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
1
)
col
=
self
.
generateString
(
firstColLen
)
col
=
self
.
generateString
(
firstColLen
)
sql
=
"insert into cars values (now, '%s'"
%
col
col
=
self
.
generateString
(
colLen
)
for
i
in
range
(
1
,
maxCols
):
sql
+=
", '%s'"
%
col
col
=
self
.
generateString
(
colLen
)
for
i
in
range
(
1
,
maxCols
):
sql
+=
", '%s'"
%
col
sql
+=
");"
tdLog
.
info
(
sql
);
tdSql
.
execute
(
sql
)
tdSql
.
query
(
"select * from cars"
)
tdSql
.
checkRows
(
1
)
tdLog
.
info
(
sql
)
tdSql
.
execute
(
sql
)
tdSql
.
query
(
"select * from cars"
)
tdSql
.
checkRows
(
1
)
def
run
(
self
):
self
.
checkTagBoundaries
()
...
...
@@ -151,7 +144,6 @@ class TDTestCase:
self
.
checkTableNameBoundaries
()
self
.
checkRowBoundaries
()
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/pytest/table/column_name.py
浏览文件 @
2d872feb
...
...
@@ -10,9 +10,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/table/column_num.py
浏览文件 @
2d872feb
...
...
@@ -8,9 +8,9 @@ from util.sql import *
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/table/create-a-lot.py
0 → 100644
浏览文件 @
2d872feb
###################################################################
# 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
taos
from
util.log
import
tdLog
from
util.cases
import
tdCases
from
util.sql
import
tdSql
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
print
(
"==============step1"
)
print
(
"prepare data"
)
for
x
in
range
(
0
,
1000000
):
tb_name
=
"tb%d"
%
x
tdLog
.
info
(
"create table %s (ts timestamp, i int)"
%
tb_name
)
tdSql
.
execute
(
"create table %s (ts timestamp, i int)"
%
tb_name
)
tdLog
.
info
(
"insert into %s values(now, 1)"
%
tb_name
)
tdSql
.
execute
(
"insert into %s values(now, 1)"
%
tb_name
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/table/create.py
浏览文件 @
2d872feb
...
...
@@ -19,9 +19,9 @@ from util.sql import tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
tests/pytest/table/db_table.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/table/del_stable.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/table/tablename-boundary.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/3.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/4.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/5.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/6.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/add.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/bigint.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/binary.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/binary_binary.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/bool.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/bool_binary.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/bool_int.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/change.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/column.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/commit.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/create-tags-boundary.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/create.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/datatype-without-alter.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/datatype.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/delete.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/double.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/filter.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/float.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/int.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/int_binary.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/int_float.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/set.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/smallint.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/tinyint.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/test.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/user/pass_len.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/user/user_create.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/util/cases.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
tests/pytest/util/sql.py
浏览文件 @
2d872feb
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录