Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a0237aae
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a0237aae
编写于
5月 07, 2020
作者:
J
jtao1735
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/unified
上级
7ee0fe51
db39eaec
变更
138
展开全部
隐藏空白更改
内联
并排
Showing
138 changed file
with
1334 addition
and
1315 deletion
+1334
-1315
src/client/src/tscParseInsert.c
src/client/src/tscParseInsert.c
+6
-5
src/mnode/src/mgmtSdb.c
src/mnode/src/mgmtSdb.c
+0
-1
src/mnode/src/mgmtShell.c
src/mnode/src/mgmtShell.c
+0
-1
src/plugins/http/src/httpServer.c
src/plugins/http/src/httpServer.c
+3
-3
src/plugins/http/src/httpSystem.c
src/plugins/http/src/httpSystem.c
+3
-1
src/util/inc/ttimer.h
src/util/inc/ttimer.h
+4
-0
src/util/inc/tutil.h
src/util/inc/tutil.h
+1
-4
src/util/src/tcache.c
src/util/src/tcache.c
+3
-3
src/util/src/tutil.c
src/util/src/tutil.c
+7
-6
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+5
-0
tests/pytest/import_merge/importDataH2.py
tests/pytest/import_merge/importDataH2.py
+8
-8
tests/pytest/import_merge/importDataHO.py
tests/pytest/import_merge/importDataHO.py
+3
-3
tests/pytest/import_merge/importDataHO2.py
tests/pytest/import_merge/importDataHO2.py
+3
-3
tests/pytest/import_merge/importDataHPO.py
tests/pytest/import_merge/importDataHPO.py
+3
-3
tests/pytest/import_merge/importDataLastH.py
tests/pytest/import_merge/importDataLastH.py
+3
-3
tests/pytest/import_merge/importDataLastHO.py
tests/pytest/import_merge/importDataLastHO.py
+3
-3
tests/pytest/import_merge/importDataLastHPO.py
tests/pytest/import_merge/importDataLastHPO.py
+3
-3
tests/pytest/import_merge/importDataLastS.py
tests/pytest/import_merge/importDataLastS.py
+3
-3
tests/pytest/import_merge/importDataLastSub.py
tests/pytest/import_merge/importDataLastSub.py
+3
-3
tests/pytest/import_merge/importDataLastT.py
tests/pytest/import_merge/importDataLastT.py
+3
-3
tests/pytest/import_merge/importDataLastTO.py
tests/pytest/import_merge/importDataLastTO.py
+3
-3
tests/pytest/import_merge/importDataLastTPO.py
tests/pytest/import_merge/importDataLastTPO.py
+3
-3
tests/pytest/import_merge/importDataS.py
tests/pytest/import_merge/importDataS.py
+3
-3
tests/pytest/import_merge/importDataSub.py
tests/pytest/import_merge/importDataSub.py
+7
-7
tests/pytest/import_merge/importDataT.py
tests/pytest/import_merge/importDataT.py
+3
-3
tests/pytest/import_merge/importDataTO.py
tests/pytest/import_merge/importDataTO.py
+3
-3
tests/pytest/import_merge/importDataTPO.py
tests/pytest/import_merge/importDataTPO.py
+3
-3
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/smoketest.sh
tests/pytest/smoketest.sh
+6
-6
tests/script/basicSuite.sim
tests/script/basicSuite.sim
+18
-1
tests/script/general/cache/new_metrics.sim
tests/script/general/cache/new_metrics.sim
+1
-2
tests/script/general/cache/new_stream.sim
tests/script/general/cache/new_stream.sim
+1
-2
tests/script/general/cache/restart_metrics.sim
tests/script/general/cache/restart_metrics.sim
+2
-4
tests/script/general/cache/restart_stream.sim
tests/script/general/cache/restart_stream.sim
+2
-4
tests/script/general/cache/restart_table.sim
tests/script/general/cache/restart_table.sim
+2
-4
tests/script/general/column/testSuite.sim
tests/script/general/column/testSuite.sim
+4
-4
tests/script/general/compress/commitlog.sim
tests/script/general/compress/commitlog.sim
+0
-1
tests/script/general/compress/compress.sim
tests/script/general/compress/compress.sim
+0
-1
tests/script/general/compress/compress2.sim
tests/script/general/compress/compress2.sim
+0
-1
tests/script/general/compress/uncompress.sim
tests/script/general/compress/uncompress.sim
+0
-1
tests/script/general/db/back_insert.sim
tests/script/general/db/back_insert.sim
+2
-0
tests/script/general/db/delete_reuse1.sim
tests/script/general/db/delete_reuse1.sim
+4
-5
tests/script/general/db/delete_reuse2.sim
tests/script/general/db/delete_reuse2.sim
+5
-5
tests/script/general/db/delete_reusevnode.sim
tests/script/general/db/delete_reusevnode.sim
+6
-16
tests/script/general/db/delete_reusevnode2.sim
tests/script/general/db/delete_reusevnode2.sim
+2
-9
tests/script/general/db/delete_writing1.sim
tests/script/general/db/delete_writing1.sim
+1
-6
tests/script/general/db/delete_writing2.sim
tests/script/general/db/delete_writing2.sim
+1
-3
tests/script/general/db/len.sim
tests/script/general/db/len.sim
+1
-1
tests/script/general/db/tables.sim
tests/script/general/db/tables.sim
+26
-11
tests/script/general/db/testSuite.sim
tests/script/general/db/testSuite.sim
+10
-10
tests/script/general/import/basic.sim
tests/script/general/import/basic.sim
+4
-4
tests/script/general/import/commit.sim
tests/script/general/import/commit.sim
+4
-4
tests/script/general/import/large.sim
tests/script/general/import/large.sim
+4
-4
tests/script/general/import/replica1.sim
tests/script/general/import/replica1.sim
+4
-4
tests/script/general/insert/insert_drop.sim
tests/script/general/insert/insert_drop.sim
+1
-1
tests/script/general/metrics/disk.sim
tests/script/general/metrics/disk.sim
+1
-1
tests/script/general/metrics/metrics.sim
tests/script/general/metrics/metrics.sim
+1
-1
tests/script/general/metrics/values.sim
tests/script/general/metrics/values.sim
+1
-1
tests/script/general/metrics/vnode3.sim
tests/script/general/metrics/vnode3.sim
+1
-1
tests/script/general/parser/alter.sim
tests/script/general/parser/alter.sim
+1
-2
tests/script/general/parser/alter_stable.sim
tests/script/general/parser/alter_stable.sim
+1
-2
tests/script/general/parser/auto_create_tb.sim
tests/script/general/parser/auto_create_tb.sim
+1
-1
tests/script/general/parser/binary_escapeCharacter.sim
tests/script/general/parser/binary_escapeCharacter.sim
+1
-2
tests/script/general/parser/columnValue.sim
tests/script/general/parser/columnValue.sim
+1
-2
tests/script/general/parser/columnValue_bigint.sim
tests/script/general/parser/columnValue_bigint.sim
+128
-128
tests/script/general/parser/columnValue_bool.sim
tests/script/general/parser/columnValue_bool.sim
+181
-181
tests/script/general/parser/columnValue_double.sim
tests/script/general/parser/columnValue_double.sim
+146
-145
tests/script/general/parser/columnValue_float.sim
tests/script/general/parser/columnValue_float.sim
+158
-140
tests/script/general/parser/columnValue_int.sim
tests/script/general/parser/columnValue_int.sim
+118
-118
tests/script/general/parser/columnValue_smallint.sim
tests/script/general/parser/columnValue_smallint.sim
+117
-117
tests/script/general/parser/columnValue_tinyint.sim
tests/script/general/parser/columnValue_tinyint.sim
+118
-117
tests/script/general/parser/commit.sim
tests/script/general/parser/commit.sim
+1
-1
tests/script/general/parser/create_db.sim
tests/script/general/parser/create_db.sim
+1
-1
tests/script/general/parser/first_last.sim
tests/script/general/parser/first_last.sim
+2
-2
tests/script/general/parser/interp.sim
tests/script/general/parser/interp.sim
+2
-2
tests/script/general/parser/lastrow.sim
tests/script/general/parser/lastrow.sim
+2
-2
tests/script/general/parser/limit.sim
tests/script/general/parser/limit.sim
+4
-4
tests/script/general/parser/limit1.sim
tests/script/general/parser/limit1.sim
+4
-4
tests/script/general/parser/limit1_tblocks100.sim
tests/script/general/parser/limit1_tblocks100.sim
+4
-4
tests/script/general/parser/limit2.sim
tests/script/general/parser/limit2.sim
+2
-2
tests/script/general/parser/limit2_tblocks100.sim
tests/script/general/parser/limit2_tblocks100.sim
+2
-2
tests/script/general/parser/null_char.sim
tests/script/general/parser/null_char.sim
+1
-2
tests/script/general/parser/repeatAlter.sim
tests/script/general/parser/repeatAlter.sim
+1
-1
tests/script/general/parser/repeatStream.sim
tests/script/general/parser/repeatStream.sim
+1
-1
tests/script/general/parser/select_across_vnodes.sim
tests/script/general/parser/select_across_vnodes.sim
+1
-1
tests/script/general/parser/select_from_cache_disk.sim
tests/script/general/parser/select_from_cache_disk.sim
+1
-1
tests/script/general/parser/single_row_in_tb.sim
tests/script/general/parser/single_row_in_tb.sim
+2
-2
tests/script/general/parser/slimit.sim
tests/script/general/parser/slimit.sim
+3
-3
tests/script/general/parser/slimit1.sim
tests/script/general/parser/slimit1.sim
+3
-3
tests/script/general/parser/slimit_alter_tags.sim
tests/script/general/parser/slimit_alter_tags.sim
+1
-1
tests/script/general/parser/stream.sim
tests/script/general/parser/stream.sim
+1
-2
tests/script/general/parser/tbnameIn.sim
tests/script/general/parser/tbnameIn.sim
+2
-2
tests/script/general/parser/testSuite.sim
tests/script/general/parser/testSuite.sim
+1
-0
tests/script/general/parser/timestamp.sim
tests/script/general/parser/timestamp.sim
+2
-2
tests/script/general/stream/metrics_del.sim
tests/script/general/stream/metrics_del.sim
+0
-3
tests/script/general/stream/metrics_replica1_vnoden.sim
tests/script/general/stream/metrics_replica1_vnoden.sim
+1
-1
tests/script/general/stream/stream_3.sim
tests/script/general/stream/stream_3.sim
+0
-3
tests/script/general/stream/table_del.sim
tests/script/general/stream/table_del.sim
+0
-3
tests/script/general/stream/table_replica1_vnoden.sim
tests/script/general/stream/table_replica1_vnoden.sim
+1
-1
tests/script/general/table/delete_writing.sim
tests/script/general/table/delete_writing.sim
+1
-1
tests/script/general/table/limit.sim
tests/script/general/table/limit.sim
+2
-2
tests/script/general/user/monitor.sim
tests/script/general/user/monitor.sim
+1
-1
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+10
-0
tests/script/unique/big/maxvnodes.sim
tests/script/unique/big/maxvnodes.sim
+4
-4
tests/script/unique/big/tcp.sim
tests/script/unique/big/tcp.sim
+1
-1
tests/script/unique/cluster/balance3.sim
tests/script/unique/cluster/balance3.sim
+3
-0
tests/script/unique/db/delete.sim
tests/script/unique/db/delete.sim
+1
-4
tests/script/unique/import/replica2.sim
tests/script/unique/import/replica2.sim
+4
-4
tests/script/unique/import/replica3.sim
tests/script/unique/import/replica3.sim
+4
-4
tests/script/unique/metrics/balance_replica1.sim
tests/script/unique/metrics/balance_replica1.sim
+2
-2
tests/script/unique/metrics/dnode2.sim
tests/script/unique/metrics/dnode2.sim
+2
-2
tests/script/unique/metrics/dnode2_stop.sim
tests/script/unique/metrics/dnode2_stop.sim
+2
-2
tests/script/unique/metrics/dnode3.sim
tests/script/unique/metrics/dnode3.sim
+3
-3
tests/script/unique/metrics/replica2_dnode4.sim
tests/script/unique/metrics/replica2_dnode4.sim
+4
-4
tests/script/unique/metrics/replica2_vnode3.sim
tests/script/unique/metrics/replica2_vnode3.sim
+2
-2
tests/script/unique/metrics/replica3_dnode6.sim
tests/script/unique/metrics/replica3_dnode6.sim
+6
-6
tests/script/unique/metrics/replica3_vnode3.sim
tests/script/unique/metrics/replica3_vnode3.sim
+4
-4
tests/script/unique/stream/metrics_balance.sim
tests/script/unique/stream/metrics_balance.sim
+4
-6
tests/script/unique/stream/metrics_replica1_dnode2.sim
tests/script/unique/stream/metrics_replica1_dnode2.sim
+2
-2
tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim
...s/script/unique/stream/metrics_replica2_dnode2_vnoden.sim
+2
-2
tests/script/unique/stream/metrics_replica2_dnode3.sim
tests/script/unique/stream/metrics_replica2_dnode3.sim
+3
-3
tests/script/unique/stream/metrics_replica3_dnode4.sim
tests/script/unique/stream/metrics_replica3_dnode4.sim
+4
-4
tests/script/unique/stream/table_balance.sim
tests/script/unique/stream/table_balance.sim
+2
-2
tests/script/unique/stream/table_move.sim
tests/script/unique/stream/table_move.sim
+4
-4
tests/script/unique/stream/table_replica1_dnode2.sim
tests/script/unique/stream/table_replica1_dnode2.sim
+2
-2
tests/script/unique/stream/table_replica2_dnode2_vnoden.sim
tests/script/unique/stream/table_replica2_dnode2_vnoden.sim
+2
-2
tests/script/unique/stream/table_replica2_dnode3.sim
tests/script/unique/stream/table_replica2_dnode3.sim
+3
-3
tests/script/unique/stream/table_replica3_dnode4.sim
tests/script/unique/stream/table_replica3_dnode4.sim
+4
-4
tests/script/unique/table/delete_part.sim
tests/script/unique/table/delete_part.sim
+4
-4
tests/script/unique/vnode/replica3_vgroup.sim
tests/script/unique/vnode/replica3_vgroup.sim
+1
-1
tests/tsim/src/simExe.c
tests/tsim/src/simExe.c
+1
-1
未找到文件。
src/client/src/tscParseInsert.c
浏览文件 @
a0237aae
...
@@ -327,15 +327,16 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
...
@@ -327,15 +327,16 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
*
(
uint32_t
*
)
payload
=
TSDB_DATA_NCHAR_NULL
;
*
(
uint32_t
*
)
payload
=
TSDB_DATA_NCHAR_NULL
;
}
else
{
}
else
{
// if the converted output len is over than pColumnModel->bytes, return error: 'Argument list too long'
// if the converted output len is over than pColumnModel->bytes, return error: 'Argument list too long'
int32_t
resLen
=
-
1
;
size_t
wcharLength
=
0
;
if
(
!
taosMbsToUcs4
(
pToken
->
z
,
pToken
->
n
,
payload
+
VARSTR_HEADER_SIZE
,
pSchema
->
bytes
-
VARSTR_HEADER_SIZE
,
&
resLen
))
{
if
(
!
taosMbsToUcs4
(
pToken
->
z
,
pToken
->
n
,
payload
+
VARSTR_HEADER_SIZE
,
pSchema
->
bytes
-
VARSTR_HEADER_SIZE
,
char
buf
[
512
]
=
{
0
};
&
wcharLength
))
{
snprintf
(
buf
,
512
,
"%s"
,
strerror
(
errno
));
char
buf
[
512
]
=
{
0
};
snprintf
(
buf
,
tListLen
(
buf
),
"%s"
,
strerror
(
errno
));
return
tscInvalidSQLErrMsg
(
msg
,
buf
,
pToken
->
z
);
return
tscInvalidSQLErrMsg
(
msg
,
buf
,
pToken
->
z
);
}
}
*
(
uint16_t
*
)
payload
=
(
uint16_t
)
(
resLen
*
TSDB_NCHAR_SIZE
);
*
(
uint16_t
*
)
payload
=
(
uint16_t
)
(
wcharLength
);
}
}
break
;
break
;
...
...
src/mnode/src/mgmtSdb.c
浏览文件 @
a0237aae
...
@@ -324,7 +324,6 @@ void sdbCleanUp() {
...
@@ -324,7 +324,6 @@ void sdbCleanUp() {
tsSdbObj
.
status
=
SDB_STATUS_CLOSING
;
tsSdbObj
.
status
=
SDB_STATUS_CLOSING
;
syncStop
(
tsSdbObj
.
sync
);
syncStop
(
tsSdbObj
.
sync
);
free
(
tsSdbObj
.
sync
);
walClose
(
tsSdbObj
.
wal
);
walClose
(
tsSdbObj
.
wal
);
sem_destroy
(
&
tsSdbObj
.
sem
);
sem_destroy
(
&
tsSdbObj
.
sem
);
pthread_mutex_destroy
(
&
tsSdbObj
.
mutex
);
pthread_mutex_destroy
(
&
tsSdbObj
.
mutex
);
...
...
src/mnode/src/mgmtShell.c
浏览文件 @
a0237aae
...
@@ -78,7 +78,6 @@ void mgmtCleanUpShell() {
...
@@ -78,7 +78,6 @@ void mgmtCleanUpShell() {
}
}
if
(
tsQhandleCache
)
{
if
(
tsQhandleCache
)
{
taosCacheEmpty
(
tsQhandleCache
);
taosCacheCleanup
(
tsQhandleCache
);
taosCacheCleanup
(
tsQhandleCache
);
tsQhandleCache
=
NULL
;
tsQhandleCache
=
NULL
;
}
}
...
...
src/plugins/http/src/httpServer.c
浏览文件 @
a0237aae
...
@@ -504,8 +504,8 @@ void httpAcceptHttpConnection(void *arg) {
...
@@ -504,8 +504,8 @@ void httpAcceptHttpConnection(void *arg) {
sockFd
=
taosOpenTcpServerSocket
(
pServer
->
serverIp
,
pServer
->
serverPort
);
sockFd
=
taosOpenTcpServerSocket
(
pServer
->
serverIp
,
pServer
->
serverPort
);
if
(
sockFd
<
0
)
{
if
(
sockFd
<
0
)
{
httpError
(
"http server:%s, failed to open http socket, ip:%s:%u
"
,
pServer
->
label
,
pServer
->
serverIp
,
httpError
(
"http server:%s, failed to open http socket, ip:%s:%u
error:%s"
,
pServer
->
label
,
taosIpStr
(
pServer
->
serverIp
)
,
pServer
->
serverPort
);
pServer
->
serverPort
,
strerror
(
errno
)
);
return
;
return
;
}
else
{
}
else
{
httpPrint
(
"http service init success at %u"
,
pServer
->
serverPort
);
httpPrint
(
"http service init success at %u"
,
pServer
->
serverPort
);
...
@@ -645,7 +645,7 @@ bool httpInitConnect(HttpServer *pServer) {
...
@@ -645,7 +645,7 @@ bool httpInitConnect(HttpServer *pServer) {
}
}
pthread_attr_destroy
(
&
thattr
);
pthread_attr_destroy
(
&
thattr
);
httpTrace
(
"http server:%s, initialized, ip:%s:%u, numOfThreads:%d"
,
pServer
->
label
,
pServer
->
serverIp
,
httpTrace
(
"http server:%s, initialized, ip:%s:%u, numOfThreads:%d"
,
pServer
->
label
,
taosIpStr
(
pServer
->
serverIp
)
,
pServer
->
serverPort
,
pServer
->
numOfThreads
);
pServer
->
serverPort
,
pServer
->
numOfThreads
);
return
true
;
return
true
;
}
}
src/plugins/http/src/httpSystem.c
浏览文件 @
a0237aae
...
@@ -117,7 +117,7 @@ void httpCleanUpSystem() {
...
@@ -117,7 +117,7 @@ void httpCleanUpSystem() {
httpPrint
(
"http service cleanup"
);
httpPrint
(
"http service cleanup"
);
httpStopSystem
();
httpStopSystem
();
#if 0
//
#if 0
if
(
httpServer
==
NULL
)
{
if
(
httpServer
==
NULL
)
{
return
;
return
;
}
}
...
@@ -132,6 +132,8 @@ void httpCleanUpSystem() {
...
@@ -132,6 +132,8 @@ void httpCleanUpSystem() {
}
}
httpCleanUpConnect
(
httpServer
);
httpCleanUpConnect
(
httpServer
);
#if 0
httpRemoveAllSessions(httpServer);
httpRemoveAllSessions(httpServer);
if (httpServer->pContextPool != NULL) {
if (httpServer->pContextPool != NULL) {
...
...
src/util/inc/ttimer.h
浏览文件 @
a0237aae
...
@@ -40,6 +40,10 @@ bool taosTmrReset(TAOS_TMR_CALLBACK fp, int mseconds, void *param, void *handle,
...
@@ -40,6 +40,10 @@ bool taosTmrReset(TAOS_TMR_CALLBACK fp, int mseconds, void *param, void *handle,
void
taosTmrCleanUp
(
void
*
handle
);
void
taosTmrCleanUp
(
void
*
handle
);
int32_t
taosInitTimer
(
void
(
*
callback
)(
int
),
int32_t
ms
);
void
taosUninitTimer
();
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
src/util/inc/tutil.h
浏览文件 @
a0237aae
...
@@ -141,10 +141,7 @@ int32_t taosFileRename(char *fullPath, char *suffix, char delimiter, char **dstP
...
@@ -141,10 +141,7 @@ int32_t taosFileRename(char *fullPath, char *suffix, char delimiter, char **dstP
*/
*/
void
getTmpfilePath
(
const
char
*
fileNamePattern
,
char
*
dstPath
);
void
getTmpfilePath
(
const
char
*
fileNamePattern
,
char
*
dstPath
);
int32_t
taosInitTimer
(
void
(
*
callback
)(
int
),
int32_t
ms
);
bool
taosMbsToUcs4
(
char
*
mbs
,
size_t
mbs_len
,
char
*
ucs4
,
int32_t
ucs4_max_len
,
size_t
*
len
);
void
taosUninitTimer
();
bool
taosMbsToUcs4
(
char
*
mbs
,
int32_t
mbs_len
,
char
*
ucs4
,
int32_t
ucs4_max_len
,
int32_t
*
len
);
int
tasoUcs4Compare
(
void
*
f1_ucs4
,
void
*
f2_ucs4
,
int
bytes
);
int
tasoUcs4Compare
(
void
*
f1_ucs4
,
void
*
f2_ucs4
,
int
bytes
);
...
...
src/util/src/tcache.c
浏览文件 @
a0237aae
...
@@ -304,9 +304,9 @@ static FORCE_INLINE SCacheDataNode *taosAddToCacheImpl(SCacheObj *pCacheObj, con
...
@@ -304,9 +304,9 @@ static FORCE_INLINE SCacheDataNode *taosAddToCacheImpl(SCacheObj *pCacheObj, con
static
void
doCleanupDataCache
(
SCacheObj
*
pCacheObj
)
{
static
void
doCleanupDataCache
(
SCacheObj
*
pCacheObj
)
{
__cache_wr_lock
(
pCacheObj
);
__cache_wr_lock
(
pCacheObj
);
if
(
taosHashGetSize
(
pCacheObj
->
pHashTable
)
>
0
)
{
//
if (taosHashGetSize(pCacheObj->pHashTable) > 0) {
taosHashCleanup
(
pCacheObj
->
pHashTable
);
taosHashCleanup
(
pCacheObj
->
pHashTable
);
}
//
}
__cache_unlock
(
pCacheObj
);
__cache_unlock
(
pCacheObj
);
...
...
src/util/src/tutil.c
浏览文件 @
a0237aae
...
@@ -490,25 +490,26 @@ bool taosUcs4ToMbs(void *ucs4, int32_t ucs4_max_len, char *mbs) {
...
@@ -490,25 +490,26 @@ bool taosUcs4ToMbs(void *ucs4, int32_t ucs4_max_len, char *mbs) {
#endif
#endif
}
}
bool
taosMbsToUcs4
(
char
*
mbs
,
int32_t
mbs_len
,
char
*
ucs4
,
int32_t
ucs4_max_len
,
int32
_t
*
len
)
{
bool
taosMbsToUcs4
(
char
*
mbs
,
size_t
mbsLength
,
char
*
ucs4
,
int32_t
ucs4_max_len
,
size
_t
*
len
)
{
memset
(
ucs4
,
0
,
ucs4_max_len
);
memset
(
ucs4
,
0
,
ucs4_max_len
);
#ifdef USE_LIBICONV
#ifdef USE_LIBICONV
iconv_t
cd
=
iconv_open
(
DEFAULT_UNICODE_ENCODEC
,
tsCharset
);
iconv_t
cd
=
iconv_open
(
DEFAULT_UNICODE_ENCODEC
,
tsCharset
);
size_t
ucs4_input_len
=
mbs
_len
;
size_t
ucs4_input_len
=
mbs
Length
;
size_t
outLe
n
=
ucs4_max_len
;
size_t
outLe
ft
=
ucs4_max_len
;
if
(
iconv
(
cd
,
&
mbs
,
&
ucs4_input_len
,
&
ucs4
,
&
outLe
n
)
==
-
1
)
{
if
(
iconv
(
cd
,
&
mbs
,
&
ucs4_input_len
,
&
ucs4
,
&
outLe
ft
)
==
-
1
)
{
iconv_close
(
cd
);
iconv_close
(
cd
);
return
false
;
return
false
;
}
}
iconv_close
(
cd
);
iconv_close
(
cd
);
if
(
len
!=
NULL
)
{
if
(
len
!=
NULL
)
{
*
len
=
outLen
;
*
len
=
ucs4_max_len
-
outLeft
;
}
}
return
true
;
return
true
;
#else
#else
mbstate_t
state
=
{
0
};
mbstate_t
state
=
{
0
};
int32_t
len
=
mbsnrtowcs
((
wchar_t
*
)
ucs4
,
(
const
char
**
)
&
mbs
,
mbs
_len
,
ucs4_max_len
/
4
,
&
state
);
int32_t
len
=
mbsnrtowcs
((
wchar_t
*
)
ucs4
,
(
const
char
**
)
&
mbs
,
mbs
Length
,
ucs4_max_len
/
4
,
&
state
);
return
len
>=
0
;
return
len
>=
0
;
#endif
#endif
}
}
...
...
tests/pytest/fulltest.sh
浏览文件 @
a0237aae
...
@@ -9,6 +9,11 @@ python3 ./test.py $1 -f insert/smallint.py
...
@@ -9,6 +9,11 @@ python3 ./test.py $1 -f insert/smallint.py
python3 ./test.py
$1
-f
insert/tinyint.py
python3 ./test.py
$1
-f
insert/tinyint.py
python3 ./test.py
$1
-f
insert/date.py
python3 ./test.py
$1
-f
insert/date.py
python3 ./test.py
$1
-f
insert/binary.py
python3 ./test.py
$1
-f
insert/binary.py
python3 ./test.py
$1
-f
table/column_name.py
python3 ./test.py
$1
-f
table/column_num.py
python3 ./test.py
$1
-f
table/db_table.py
python3 ./test.py
$1
-f
import_merge/importBlock1HO.py
python3 ./test.py
$1
-f
import_merge/importBlock1HO.py
python3 ./test.py
$1
-f
import_merge/importBlock1HPO.py
python3 ./test.py
$1
-f
import_merge/importBlock1HPO.py
python3 ./test.py
$1
-f
import_merge/importBlock1H.py
python3 ./test.py
$1
-f
import_merge/importBlock1H.py
...
...
tests/pytest/import_merge/importDataH2.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -43,19 +43,19 @@ class TDTestCase:
...
@@ -43,19 +43,19 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
(
self
.
rows
/
2
))
tdLog
.
info
(
"import %d sequential data"
%
(
self
.
max
rows
/
2
))
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
self
.
rows
/
2
+
1
):
for
rid
in
range
(
1
,
self
.
max
rows
/
2
+
1
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
tdSql
.
checkRows
(
self
.
max
rows
/
2
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
...
@@ -70,7 +70,7 @@ class TDTestCase:
...
@@ -70,7 +70,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step7"
)
tdLog
.
info
(
"================= step7"
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
checkRows
(
self
.
rows
/
2
+
1
)
tdSql
.
checkRows
(
self
.
max
rows
/
2
+
1
)
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"import 10 data in batch before"
)
tdLog
.
info
(
"import 10 data in batch before"
)
...
@@ -83,7 +83,7 @@ class TDTestCase:
...
@@ -83,7 +83,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step9"
)
tdLog
.
info
(
"================= step9"
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
checkRows
(
self
.
rows
/
2
+
11
)
tdSql
.
checkRows
(
self
.
max
rows
/
2
+
11
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
tests/pytest/import_merge/importDataHO.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
maxw
rows
=
200
self
.
rowsPerTable
=
20
self
.
rowsPerTable
=
20
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
...
@@ -36,7 +36,7 @@ class TDTestCase:
...
@@ -36,7 +36,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -44,7 +44,7 @@ class TDTestCase:
...
@@ -44,7 +44,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
...
...
tests/pytest/import_merge/importDataHO2.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
self
.
rowsPerTable
=
100
self
.
rowsPerTable
=
100
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
...
@@ -36,7 +36,7 @@ class TDTestCase:
...
@@ -36,7 +36,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -44,7 +44,7 @@ class TDTestCase:
...
@@ -44,7 +44,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
...
...
tests/pytest/import_merge/importDataHPO.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
self
.
rowsPerTable
=
20
self
.
rowsPerTable
=
20
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
...
@@ -36,7 +36,7 @@ class TDTestCase:
...
@@ -36,7 +36,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -44,7 +44,7 @@ class TDTestCase:
...
@@ -44,7 +44,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
...
...
tests/pytest/import_merge/importDataLastH.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -43,7 +43,7 @@ class TDTestCase:
...
@@ -43,7 +43,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
(
self
.
maxrows
,
10
+
self
.
max
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
...
...
tests/pytest/import_merge/importDataLastHO.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -43,7 +43,7 @@ class TDTestCase:
...
@@ -43,7 +43,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
(
self
.
maxrows
,
10
+
self
.
max
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
...
...
tests/pytest/import_merge/importDataLastHPO.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -43,7 +43,7 @@ class TDTestCase:
...
@@ -43,7 +43,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
(
self
.
maxrows
,
10
+
self
.
max
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
...
...
tests/pytest/import_merge/importDataLastS.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -43,7 +43,7 @@ class TDTestCase:
...
@@ -43,7 +43,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
(
self
.
maxrows
,
10
+
self
.
max
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
...
...
tests/pytest/import_merge/importDataLastSub.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -43,7 +43,7 @@ class TDTestCase:
...
@@ -43,7 +43,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
(
self
.
maxrows
,
10
+
self
.
max
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
...
...
tests/pytest/import_merge/importDataLastT.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -39,7 +39,7 @@ class TDTestCase:
...
@@ -39,7 +39,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
(
self
.
maxrows
,
10
+
self
.
max
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
...
...
tests/pytest/import_merge/importDataLastTO.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -39,7 +39,7 @@ class TDTestCase:
...
@@ -39,7 +39,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
(
self
.
maxrows
,
10
+
self
.
max
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
...
...
tests/pytest/import_merge/importDataLastTPO.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -39,7 +39,7 @@ class TDTestCase:
...
@@ -39,7 +39,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
(
self
.
maxrows
,
10
+
self
.
max
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
...
...
tests/pytest/import_merge/importDataS.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -39,7 +39,7 @@ class TDTestCase:
...
@@ -39,7 +39,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
...
...
tests/pytest/import_merge/importDataSub.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -43,19 +43,19 @@ class TDTestCase:
...
@@ -43,19 +43,19 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
(
self
.
rows
/
2
))
tdLog
.
info
(
"import %d sequential data"
%
(
self
.
max
rows
/
2
))
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
self
.
rows
/
2
+
1
):
for
rid
in
range
(
1
,
self
.
max
rows
/
2
+
1
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
tdSql
.
checkRows
(
self
.
max
rows
/
2
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
...
@@ -73,7 +73,7 @@ class TDTestCase:
...
@@ -73,7 +73,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step9"
)
tdLog
.
info
(
"================= step9"
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
tdSql
.
checkRows
(
self
.
max
rows
/
2
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
tests/pytest/import_merge/importDataT.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -39,7 +39,7 @@ class TDTestCase:
...
@@ -39,7 +39,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
...
...
tests/pytest/import_merge/importDataTO.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -39,7 +39,7 @@ class TDTestCase:
...
@@ -39,7 +39,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
...
...
tests/pytest/import_merge/importDataTPO.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -39,7 +39,7 @@ class TDTestCase:
...
@@ -39,7 +39,7 @@ class TDTestCase:
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
self
.
max
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
...
...
tests/pytest/import_merge/importLastH.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
...
tests/pytest/import_merge/importLastHO.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
...
tests/pytest/import_merge/importLastHPO.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
...
tests/pytest/import_merge/importLastS.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
...
tests/pytest/import_merge/importLastSub.py
浏览文件 @
a0237aae
...
@@ -27,11 +27,11 @@ class TDTestCase:
...
@@ -27,11 +27,11 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
...
tests/pytest/import_merge/importLastT.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
...
tests/pytest/import_merge/importLastTO.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
...
tests/pytest/import_merge/importLastTPO.py
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ class TDTestCase:
...
@@ -27,7 +27,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
self
.
ntables
=
1
self
.
ntables
=
1
self
.
startTime
=
1520000010000
self
.
startTime
=
1520000010000
self
.
rows
=
200
self
.
max
rows
=
200
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
deploy
(
1
)
...
@@ -35,7 +35,7 @@ class TDTestCase:
...
@@ -35,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db
rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db
maxrows %d'
%
self
.
max
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
...
tests/pytest/smoketest.sh
浏览文件 @
a0237aae
...
@@ -34,12 +34,12 @@ python3 ./test.py $1 -f table/db_table.py
...
@@ -34,12 +34,12 @@ python3 ./test.py $1 -f table/db_table.py
python3 ./test.py
-s
$1
python3 ./test.py
-s
$1
sleep
1
sleep
1
#
python3 ./test.py $1 -f import_merge/importDataLastTO.py
python3 ./test.py
$1
-f
import_merge/importDataLastTO.py
#
python3 ./test.py -s $1
python3 ./test.py
-s
$1
#
sleep 1
sleep
1
#
python3 ./test.py $1 -f import_merge/importDataLastT.py
python3 ./test.py
$1
-f
import_merge/importDataLastT.py
#
python3 ./test.py -s $1
python3 ./test.py
-s
$1
#
sleep 1
sleep
1
python3 ./test.py
$1
-f
import_merge/importDataTO.py
python3 ./test.py
$1
-f
import_merge/importDataTO.py
python3 ./test.py
-s
$1
python3 ./test.py
-s
$1
sleep
1
sleep
1
...
...
tests/script/basicSuite.sim
浏览文件 @
a0237aae
...
@@ -20,9 +20,26 @@ run general/table/tinyint.sim
...
@@ -20,9 +20,26 @@ run general/table/tinyint.sim
run general/table/db.table.sim
run general/table/db.table.sim
run general/user/basic1.sim
run general/user/basic1.sim
#
run general/user/pass_alter.sim
run general/user/pass_alter.sim
run general/user/pass_len.sim
run general/user/pass_len.sim
run general/user/user_create.sim
run general/user/user_create.sim
run general/user/user_len.sim
run general/user/user_len.sim
# run general/compute/count.sim
# run general/compute/avg.sim
# run general/compute/sum.sim
# run general/compute/min.sim
# run general/compute/max.sim
# run general/compute/first.sim
# run general/compute/last.sim
run general/compute/stddev.sim
# run general/compute/leastsquare.sim
run general/compute/top.sim
run general/compute/bottom.sim
run general/compute/percentile.sim
run general/compute/diff.sim
# run general/compute/interval.sim
run general/compute/null.sim
# run general/compute/diff2.sim
##################################
##################################
tests/script/general/cache/new_metrics.sim
浏览文件 @
a0237aae
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/cache/new_stream.sim
浏览文件 @
a0237aae
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/cache/restart_metrics.sim
浏览文件 @
a0237aae
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
@@ -49,8 +48,7 @@ print =============== step2
...
@@ -49,8 +48,7 @@ print =============== step2
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode1 -s stop
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print =============== step3
print =============== step3
...
...
tests/script/general/cache/restart_stream.sim
浏览文件 @
a0237aae
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 1
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 1
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
@@ -99,8 +98,7 @@ print =============== step4
...
@@ -99,8 +98,7 @@ print =============== step4
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode1 -s stop
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 1
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 1
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print =============== step5
print =============== step5
...
...
tests/script/general/cache/restart_table.sim
浏览文件 @
a0237aae
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
@@ -37,8 +36,7 @@ print =============== step2
...
@@ -37,8 +36,7 @@ print =============== step2
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode1 -s stop
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print =============== step3
print =============== step3
...
...
tests/script/general/column/testSuite.sim
浏览文件 @
a0237aae
run
lite
/column/table.sim
run
general
/column/table.sim
run
lite
/column/metrics.sim
run
general
/column/metrics.sim
run
lite
/column/stream.sim
run
general
/column/stream.sim
run
lite
/column/commit.sim
run
general
/column/commit.sim
tests/script/general/compress/commitlog.sim
浏览文件 @
a0237aae
...
@@ -3,7 +3,6 @@ system sh/stop_dnodes.sh
...
@@ -3,7 +3,6 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024
system sh/cfg.sh -n dnode1 -c compression -v 1
system sh/cfg.sh -n dnode1 -c compression -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/compress/compress.sim
浏览文件 @
a0237aae
...
@@ -3,7 +3,6 @@ system sh/stop_dnodes.sh
...
@@ -3,7 +3,6 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024
system sh/cfg.sh -n dnode1 -c compression -v 1
system sh/cfg.sh -n dnode1 -c compression -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/compress/compress2.sim
浏览文件 @
a0237aae
...
@@ -3,7 +3,6 @@ system sh/stop_dnodes.sh
...
@@ -3,7 +3,6 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024
system sh/cfg.sh -n dnode1 -c compression -v 2
system sh/cfg.sh -n dnode1 -c compression -v 2
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/compress/uncompress.sim
浏览文件 @
a0237aae
...
@@ -3,7 +3,6 @@ system sh/stop_dnodes.sh
...
@@ -3,7 +3,6 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024
system sh/cfg.sh -n dnode1 -c compression -v 1
system sh/cfg.sh -n dnode1 -c compression -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/db/back_insert.sim
浏览文件 @
a0237aae
sql connect
sql connect
$x = 1
$x = 1
begin:
begin:
sql reset query cache
sleep 1000
sql insert into db.tb values(now, $x ) -x begin
sql insert into db.tb values(now, $x ) -x begin
#print ===> insert successed $x
#print ===> insert successed $x
$x = $x + 1
$x = $x + 1
...
...
tests/script/general/db/delete_reuse1.sim
浏览文件 @
a0237aae
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode3 -i 3
...
@@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
...
@@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql connect
print ======== step1
print ======== step1
...
@@ -78,6 +73,8 @@ sql insert into d1.t1 values(now, 2) -x step2
...
@@ -78,6 +73,8 @@ sql insert into d1.t1 values(now, 2) -x step2
step2:
step2:
print ========= step3
print ========= step3
sql reset query cache
sleep 1000
sql create database d1 replica 1
sql create database d1 replica 1
sql create table d1.t1 (ts timestamp, i int)
sql create table d1.t1 (ts timestamp, i int)
sql insert into d1.t1 values(now, 2)
sql insert into d1.t1 values(now, 2)
...
@@ -97,6 +94,8 @@ while $x < 20
...
@@ -97,6 +94,8 @@ while $x < 20
step4:
step4:
sql create database d1 replica 1
sql create database d1 replica 1
sql reset query cache
sleep 1000
sql create table d1.t1 (ts timestamp, i int)
sql create table d1.t1 (ts timestamp, i int)
sql insert into d1.t1 values(now, $x )
sql insert into d1.t1 values(now, $x )
sql select * from d1.t1
sql select * from d1.t1
...
...
tests/script/general/db/delete_reuse2.sim
浏览文件 @
a0237aae
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode3 -i 3
...
@@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
...
@@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql connect
print ======== step1
print ======== step1
...
@@ -79,6 +74,8 @@ step2:
...
@@ -79,6 +74,8 @@ step2:
print ========= step3
print ========= step3
sql create database db1 replica 1
sql create database db1 replica 1
sql reset query cache
sleep 1000
sql create table db1.tb1 (ts timestamp, i int)
sql create table db1.tb1 (ts timestamp, i int)
sql insert into db1.tb1 values(now, 2)
sql insert into db1.tb1 values(now, 2)
sql select * from db1.tb1
sql select * from db1.tb1
...
@@ -104,6 +101,9 @@ while $x < 20
...
@@ -104,6 +101,9 @@ while $x < 20
$db = db . $x
$db = db . $x
$tb = tb . $x
$tb = tb . $x
sql reset query cache
sleep 1000
sql create database $db replica 1
sql create database $db replica 1
sql use $db
sql use $db
sql create table $tb (ts timestamp, i int)
sql create table $tb (ts timestamp, i int)
...
...
tests/script/general/db/delete_reusevnode.sim
浏览文件 @
a0237aae
...
@@ -5,19 +5,16 @@ system sh/deploy.sh -n dnode1 -i 1
...
@@ -5,19 +5,16 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200
print ========= start dnodes
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
s
leep 3000
s
ql connect
print ======== step1
print ======== step1
$tbPrefix = t
$tbPrefix = t
$i = 0
$i = 0
while $i <
100
0
while $i <
3
0
$db = db . $i
$db = db . $i
sql create database $db
sql create database $db
sql use $db
sql use $db
...
@@ -37,38 +34,32 @@ endw
...
@@ -37,38 +34,32 @@ endw
print ======== step2
print ======== step2
sleep 1000
sleep 1000
sql drop database $db
sql show databases
sql show databases
if $rows != 0 then
if $rows != 0 then
return -1
return -1
endi
endi
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
sleep 3000
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200
print ========= start dnodes
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
s
leep 3000
s
ql connect
print ======== step1
print ======== step1
$tbPrefix = t
$tbPrefix = t
$i = 0
$i = 0
while $i < 10
00
while $i < 10
$db = db . $i
$db = db . $i
sql create database $db maxTables 4
sql create database $db maxTables 4
sql use $db
sql use $db
sql create table st (ts times
e
tamp, i int) tags(j int);
sql create table st (ts timestamp, i int) tags(j int);
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
$tb = $tb . a
$tb = $tb . a
...
@@ -114,7 +105,6 @@ endw
...
@@ -114,7 +105,6 @@ endw
print ======== step2
print ======== step2
sleep 1000
sleep 1000
sql drop database $db
sql show databases
sql show databases
if $rows != 0 then
if $rows != 0 then
return -1
return -1
...
...
tests/script/general/db/delete_reusevnode2.sim
浏览文件 @
a0237aae
...
@@ -5,26 +5,19 @@ system sh/deploy.sh -n dnode1 -i 1
...
@@ -5,26 +5,19 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200
print ========= start dnodes
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 3000
print ======== step1
print ======== step1
sql create database db maxTables 4;
sql create database db maxTables 4;
sql use db
sql use db
$tbPrefix = t
$tbPrefix = t
$i = 0
$i = 0
while $i < 1000
while $i < 10
sql create table st (ts timestamp, i int) tags(j int);
sql create table st (ts timestamp, i int) tags(j int);
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/general/db/delete_writing1.sim
浏览文件 @
a0237aae
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode3 -i 3
...
@@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
...
@@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql connect
sql create database db
sql create database db
...
@@ -39,7 +34,7 @@ sql create table db.tb (ts timestamp, i int)
...
@@ -39,7 +34,7 @@ sql create table db.tb (ts timestamp, i int)
sql insert into db.tb values(now, 1)
sql insert into db.tb values(now, 1)
print ======== start back
print ======== start back
run_back
lite
/db/back_insert.sim
run_back
general
/db/back_insert.sim
sleep 1000
sleep 1000
print ======== step1
print ======== step1
...
...
tests/script/general/db/delete_writing2.sim
浏览文件 @
a0237aae
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
print ========= start dnodes
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql connect
sql create database db
sql create database db
...
@@ -27,7 +25,7 @@ sql create table db4.tb4 (ts timestamp, i int)
...
@@ -27,7 +25,7 @@ sql create table db4.tb4 (ts timestamp, i int)
sql insert into db4.tb4 values(now, 1)
sql insert into db4.tb4 values(now, 1)
print ======== start back
print ======== start back
run_back
lite
/db/back_insert.sim
run_back
general
/db/back_insert.sim
sleep 1000
sleep 1000
print ======== step1
print ======== step1
...
...
tests/script/general/db/len.sim
浏览文件 @
a0237aae
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/db/tables.sim
浏览文件 @
a0237aae
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
sql connect
sql connect
print =============== step2
print =============== step2
sql create database db
tables 2
sql create database db
maxtables 4
sql show databases
sql show databases
print $rows $data07
print $rows $data07
...
@@ -19,7 +18,7 @@ if $rows != 1 then
...
@@ -19,7 +18,7 @@ if $rows != 1 then
return -1
return -1
endi
endi
if $data07 !=
2
then
if $data07 !=
4
then
return -1
return -1
endi
endi
...
@@ -30,9 +29,17 @@ sql create table t2 (ts timestamp, i int)
...
@@ -30,9 +29,17 @@ sql create table t2 (ts timestamp, i int)
sql create table t3 (ts timestamp, i int)
sql create table t3 (ts timestamp, i int)
sql create table t4 (ts timestamp, i int)
sql create table t4 (ts timestamp, i int)
sql create table t11 (ts timestamp, i int)
sql create table t11 (ts timestamp, i int)
sql create table t12 (ts timestamp, i int)
sql create table t13 (ts timestamp, i int)
sql create table t14 (ts timestamp, i int)
sql create table t21 (ts timestamp, i int)
sql create table t22 (ts timestamp, i int)
sql create table t22 (ts timestamp, i int)
sql create table t23 (ts timestamp, i int)
sql create table t24 (ts timestamp, i int)
sql create table t31 (ts timestamp, i int)
sql create table t32 (ts timestamp, i int)
sql create table t33 (ts timestamp, i int)
sql create table t33 (ts timestamp, i int)
sql create table t
4
4 (ts timestamp, i int)
sql create table t
3
4 (ts timestamp, i int)
print =============== step4
print =============== step4
sql insert into t1 values(now, 1)
sql insert into t1 values(now, 1)
...
@@ -42,7 +49,7 @@ sql insert into t4 values(now, 4)
...
@@ -42,7 +49,7 @@ sql insert into t4 values(now, 4)
sql insert into t11 values(now, 1)
sql insert into t11 values(now, 1)
sql insert into t22 values(now, 2)
sql insert into t22 values(now, 2)
sql insert into t33 values(now, 3)
sql insert into t33 values(now, 3)
sql insert into t
4
4 values(now, 4)
sql insert into t
3
4 values(now, 4)
print =============== step5
print =============== step5
sql select * from t1
sql select * from t1
...
@@ -68,10 +75,10 @@ endi
...
@@ -68,10 +75,10 @@ endi
print =============== step6
print =============== step6
sql drop database db
sql drop database db
sql reset query cache
sql reset query cache
sleep
20
000
sleep
4
000
print =============== step7
print =============== step7
sql create database db
tables 2
sql create database db
maxtables 4
sql show databases
sql show databases
print $rows $data07
print $rows $data07
...
@@ -79,7 +86,7 @@ if $rows != 1 then
...
@@ -79,7 +86,7 @@ if $rows != 1 then
return -1
return -1
endi
endi
if $data07 !=
2
then
if $data07 !=
4
then
return -1
return -1
endi
endi
...
@@ -90,9 +97,17 @@ sql create table t2 (ts timestamp, i int)
...
@@ -90,9 +97,17 @@ sql create table t2 (ts timestamp, i int)
sql create table t3 (ts timestamp, i int)
sql create table t3 (ts timestamp, i int)
sql create table t4 (ts timestamp, i int)
sql create table t4 (ts timestamp, i int)
sql create table t11 (ts timestamp, i int)
sql create table t11 (ts timestamp, i int)
sql create table t12 (ts timestamp, i int)
sql create table t13 (ts timestamp, i int)
sql create table t14 (ts timestamp, i int)
sql create table t21 (ts timestamp, i int)
sql create table t22 (ts timestamp, i int)
sql create table t22 (ts timestamp, i int)
sql create table t23 (ts timestamp, i int)
sql create table t24 (ts timestamp, i int)
sql create table t31 (ts timestamp, i int)
sql create table t32 (ts timestamp, i int)
sql create table t33 (ts timestamp, i int)
sql create table t33 (ts timestamp, i int)
sql create table t
4
4 (ts timestamp, i int)
sql create table t
3
4 (ts timestamp, i int)
print =============== step9
print =============== step9
sql insert into t1 values(now, 1)
sql insert into t1 values(now, 1)
...
@@ -102,7 +117,7 @@ sql insert into t4 values(now, 4)
...
@@ -102,7 +117,7 @@ sql insert into t4 values(now, 4)
sql insert into t11 values(now, 1)
sql insert into t11 values(now, 1)
sql insert into t22 values(now, 2)
sql insert into t22 values(now, 2)
sql insert into t33 values(now, 3)
sql insert into t33 values(now, 3)
sql insert into t
4
4 values(now, 4)
sql insert into t
3
4 values(now, 4)
print =============== step10
print =============== step10
sql select * from t1
sql select * from t1
...
...
tests/script/general/db/testSuite.sim
浏览文件 @
a0237aae
#
run general//db/basic.sim
run general//db/basic.sim
run general/db/basic1.sim
run general/db/basic1.sim
run general/db/basic2.sim
run general/db/basic2.sim
run general/db/basic3.sim
run general/db/basic3.sim
run general/db/basic4.sim
run general/db/basic4.sim
run general/db/basic5.sim
run general/db/basic5.sim
run general/db/delete_reuse1.sim
#run general/db/delete_reuse1
.sim
run general/db/delete_reuse2
.sim
#run general/db/delete_reuse2
.sim
run general/db/delete_reusevnode
.sim
#run general/db/delete_
writing1
.sim
#run general/db/delete_
reusevnode2
.sim
#run general/db/delete_writing2
.sim
run general/db/delete_writing1
.sim
run general/db/delete_writing2.sim
#
run general/db/len.sim
run general/db/len.sim
#
run general/db/repeat.sim
run general/db/repeat.sim
#
run general/db/tables.sim
run general/db/tables.sim
tests/script/general/import/basic.sim
浏览文件 @
a0237aae
...
@@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10
...
@@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode2 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode2 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode3 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode3 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode4 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode4 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c commitlog -v 0
system sh/cfg.sh -n dnode1 -c commitlog -v 0
system sh/cfg.sh -n dnode2 -c commitlog -v 0
system sh/cfg.sh -n dnode2 -c commitlog -v 0
...
...
tests/script/general/import/commit.sim
浏览文件 @
a0237aae
...
@@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10
...
@@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode2 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode2 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode3 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode3 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode4 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode4 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c commitlog -v 0
system sh/cfg.sh -n dnode1 -c commitlog -v 0
system sh/cfg.sh -n dnode2 -c commitlog -v 0
system sh/cfg.sh -n dnode2 -c commitlog -v 0
...
...
tests/script/general/import/large.sim
浏览文件 @
a0237aae
...
@@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10
...
@@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode2 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode2 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode3 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode3 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode4 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode4 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c commitlog -v 0
system sh/cfg.sh -n dnode1 -c commitlog -v 0
system sh/cfg.sh -n dnode2 -c commitlog -v 0
system sh/cfg.sh -n dnode2 -c commitlog -v 0
...
...
tests/script/general/import/replica1.sim
浏览文件 @
a0237aae
...
@@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10
...
@@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode2 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode2 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode3 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode3 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode4 -c
session
sPerVnode -v 2000
system sh/cfg.sh -n dnode4 -c
maxtable
sPerVnode -v 2000
system sh/cfg.sh -n dnode1 -c commitlog -v 0
system sh/cfg.sh -n dnode1 -c commitlog -v 0
system sh/cfg.sh -n dnode2 -c commitlog -v 0
system sh/cfg.sh -n dnode2 -c commitlog -v 0
...
...
tests/script/general/insert/insert_drop.sim
浏览文件 @
a0237aae
...
@@ -19,7 +19,7 @@ $stb = stb
...
@@ -19,7 +19,7 @@ $stb = stb
sql drop database $db -x step1
sql drop database $db -x step1
step1:
step1:
sql create database $db tables 10 ctime 30
sql create database $db
max
tables 10 ctime 30
print ====== create tables
print ====== create tables
sql use $db
sql use $db
sql create table $stb (ts timestamp, c1 int) tags(t1 int)
sql create table $stb (ts timestamp, c1 int) tags(t1 int)
...
...
tests/script/general/metrics/disk.sim
浏览文件 @
a0237aae
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 4
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/metrics/metrics.sim
浏览文件 @
a0237aae
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 4
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/metrics/values.sim
浏览文件 @
a0237aae
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 4
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/metrics/vnode3.sim
浏览文件 @
a0237aae
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
...
@@ -4,7 +4,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 4
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/parser/alter.sim
浏览文件 @
a0237aae
...
@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
sql connect
sql connect
...
...
tests/script/general/parser/alter_stable.sim
浏览文件 @
a0237aae
...
@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
sql connect
sql connect
...
...
tests/script/general/parser/auto_create_tb.sim
浏览文件 @
a0237aae
...
@@ -3,7 +3,7 @@ system sh/stop_dnodes.sh
...
@@ -3,7 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/parser/binary_escapeCharacter.sim
浏览文件 @
a0237aae
...
@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
sql connect
sql connect
...
...
tests/script/general/parser/columnValue.sim
浏览文件 @
a0237aae
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
sql connect
sql connect
...
...
tests/script/general/parser/columnValue_bigint.sim
浏览文件 @
a0237aae
...
@@ -10,89 +10,89 @@ print ========== bigint
...
@@ -10,89 +10,89 @@ print ========== bigint
sql create table mt_bigint (ts timestamp, c bigint) tags (tagname bigint)
sql create table mt_bigint (ts timestamp, c bigint) tags (tagname bigint)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_bigint_0 using mt_bigint tags (
null
)
sql create table st_bigint_0 using mt_bigint tags (
NULL
)
sql
describe
st_bigint_0
sql
select tagname from
st_bigint_0
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_bigint_1 using mt_bigint tags (NULL)
sql create table st_bigint_1 using mt_bigint tags (NULL)
sql
describe
st_bigint_1
sql
select tagname from
st_bigint_1
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_bigint_2 using mt_bigint tags ('
null
')
sql create table st_bigint_2 using mt_bigint tags ('
NULL
')
sql
describe
st_bigint_2
sql
select tagname from
st_bigint_2
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_bigint_3 using mt_bigint tags ('NULL')
sql create table st_bigint_3 using mt_bigint tags ('NULL')
sql
describe
st_bigint_3
sql
select tagname from
st_bigint_3
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_bigint_4 using mt_bigint tags ("
null
")
sql create table st_bigint_4 using mt_bigint tags ("
NULL
")
sql
describe
st_bigint_4
sql
select tagname from
st_bigint_4
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_bigint_5 using mt_bigint tags ("NULL")
sql create table st_bigint_5 using mt_bigint tags ("NULL")
sql
describe
st_bigint_5
sql
select tagname from
st_bigint_5
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_bigint_6 using mt_bigint tags (-9223372036854775807)
sql create table st_bigint_6 using mt_bigint tags (-9223372036854775807)
sql
describe
st_bigint_6
sql
select tagname from
st_bigint_6
if $data
23
!= -9223372036854775807 then
if $data
00
!= -9223372036854775807 then
return -1
return -1
endi
endi
sql create table st_bigint_7 using mt_bigint tags (9223372036854775807)
sql create table st_bigint_7 using mt_bigint tags (9223372036854775807)
sql
describe
st_bigint_7
sql
select tagname from
st_bigint_7
if $data
23
!= 9223372036854775807 then
if $data
00
!= 9223372036854775807 then
return -1
return -1
endi
endi
sql create table st_bigint_8 using mt_bigint tags (37)
sql create table st_bigint_8 using mt_bigint tags (37)
sql
describe
st_bigint_8
sql
select tagname from
st_bigint_8
if $data
23
!= 37 then
if $data
00
!= 37 then
return -1
return -1
endi
endi
sql create table st_bigint_9 using mt_bigint tags (-100)
sql create table st_bigint_9 using mt_bigint tags (-100)
sql
describe
st_bigint_9
sql
select tagname from
st_bigint_9
if $data
23
!= -100 then
if $data
00
!= -100 then
return -1
return -1
endi
endi
sql create table st_bigint_10 using mt_bigint tags (+113)
sql create table st_bigint_10 using mt_bigint tags (+113)
sql
describe
st_bigint_10
sql
select tagname from
st_bigint_10
if $data
23
!= 113 then
if $data
00
!= 113 then
return -1
return -1
endi
endi
sql create table st_bigint_11 using mt_bigint tags ('-100')
sql create table st_bigint_11 using mt_bigint tags ('-100')
sql
describe
st_bigint_11
sql
select tagname from
st_bigint_11
if $data
23
!= -100 then
if $data
00
!= -100 then
return -1
return -1
endi
endi
sql create table st_bigint_12 using mt_bigint tags ("+78")
sql create table st_bigint_12 using mt_bigint tags ("+78")
sql
describe
st_bigint_12
sql
select tagname from
st_bigint_12
if $data
23
!= 78 then
if $data
00
!= 78 then
return -1
return -1
endi
endi
sql create table st_bigint_13 using mt_bigint tags (+0078)
sql create table st_bigint_13 using mt_bigint tags (+0078)
sql
describe
st_bigint_13
sql
select tagname from
st_bigint_13
if $data
23
!= 78 then
if $data
00
!= 78 then
return -1
return -1
endi
endi
sql create table st_bigint_14 using mt_bigint tags (-00078)
sql create table st_bigint_14 using mt_bigint tags (-00078)
sql
describe
st_bigint_14
sql
select tagname from
st_bigint_14
if $data
23
!= -78 then
if $data
00
!= -78 then
return -1
return -1
endi
endi
## case 01: insert values for test column values
## case 01: insert values for test column values
sql insert into st_bigint_0 values (now,
null
)
sql insert into st_bigint_0 values (now,
NULL
)
sql select * from st_bigint_0
sql select * from st_bigint_0
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_1 values (now, NULL)
sql insert into st_bigint_1 values (now, NULL)
...
@@ -100,15 +100,15 @@ sql select * from st_bigint_1
...
@@ -100,15 +100,15 @@ sql select * from st_bigint_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_2 values (now, '
null
')
sql insert into st_bigint_2 values (now, '
NULL
')
sql select * from st_bigint_2
sql select * from st_bigint_2
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_3 values (now, 'NULL')
sql insert into st_bigint_3 values (now, 'NULL')
...
@@ -116,15 +116,15 @@ sql select * from st_bigint_3
...
@@ -116,15 +116,15 @@ sql select * from st_bigint_3
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_4 values (now, "
null
")
sql insert into st_bigint_4 values (now, "
NULL
")
sql select * from st_bigint_4
sql select * from st_bigint_4
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_5 values (now, "NULL")
sql insert into st_bigint_5 values (now, "NULL")
...
@@ -132,7 +132,7 @@ sql select * from st_bigint_5
...
@@ -132,7 +132,7 @@ sql select * from st_bigint_5
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_6 values (now, 9223372036854775807)
sql insert into st_bigint_6 values (now, 9223372036854775807)
...
@@ -211,64 +211,64 @@ if $data01 != -56 then
...
@@ -211,64 +211,64 @@ if $data01 != -56 then
endi
endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_bigint_16 using mt_bigint tags (
null) values (now, null
)
sql insert into st_bigint_16 using mt_bigint tags (
NULL) values (now, NULL
)
sql
describe
st_bigint_16
sql
select tagname from
st_bigint_16
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_16
sql select * from st_bigint_16
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_17 using mt_bigint tags (NULL) values (now, NULL)
sql insert into st_bigint_17 using mt_bigint tags (NULL) values (now, NULL)
sql
describe
st_bigint_17
sql
select tagname from
st_bigint_17
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_17
sql select * from st_bigint_17
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_18 using mt_bigint tags ('
null') values (now, 'null
')
sql insert into st_bigint_18 using mt_bigint tags ('
NULL') values (now, 'NULL
')
sql
describe
st_bigint_18
sql
select tagname from
st_bigint_18
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_18
sql select * from st_bigint_18
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_19 using mt_bigint tags ('NULL') values (now, 'NULL')
sql insert into st_bigint_19 using mt_bigint tags ('NULL') values (now, 'NULL')
sql
describe
st_bigint_19
sql
select tagname from
st_bigint_19
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_19
sql select * from st_bigint_19
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_20 using mt_bigint tags ("
null") values (now, "null
")
sql insert into st_bigint_20 using mt_bigint tags ("
NULL") values (now, "NULL
")
sql
describe
st_bigint_20
sql
select tagname from
st_bigint_20
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_20
sql select * from st_bigint_20
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_21 using mt_bigint tags ("NULL") values (now, "NULL")
sql insert into st_bigint_21 using mt_bigint tags ("NULL") values (now, "NULL")
sql
describe
st_bigint_21
sql
select tagname from
st_bigint_21
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_21
sql select * from st_bigint_21
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_bigint_22 using mt_bigint tags (9223372036854775807) values (now, 9223372036854775807)
sql insert into st_bigint_22 using mt_bigint tags (9223372036854775807) values (now, 9223372036854775807)
sql
describe
st_bigint_22
sql
select tagname from
st_bigint_22
if $data
23
!= 9223372036854775807 then
if $data
00
!= 9223372036854775807 then
return -1
return -1
endi
endi
sql select * from st_bigint_22
sql select * from st_bigint_22
...
@@ -276,8 +276,8 @@ if $data01 != 9223372036854775807 then
...
@@ -276,8 +276,8 @@ if $data01 != 9223372036854775807 then
return -1
return -1
endi
endi
sql insert into st_bigint_23 using mt_bigint tags (-9223372036854775807) values (now, -9223372036854775807)
sql insert into st_bigint_23 using mt_bigint tags (-9223372036854775807) values (now, -9223372036854775807)
sql
describe
st_bigint_23
sql
select tagname from
st_bigint_23
if $data
23
!= -9223372036854775807 then
if $data
00
!= -9223372036854775807 then
return -1
return -1
endi
endi
sql select * from st_bigint_23
sql select * from st_bigint_23
...
@@ -285,8 +285,8 @@ if $data01 != -9223372036854775807 then
...
@@ -285,8 +285,8 @@ if $data01 != -9223372036854775807 then
return -1
return -1
endi
endi
sql insert into st_bigint_24 using mt_bigint tags (10) values (now, 10)
sql insert into st_bigint_24 using mt_bigint tags (10) values (now, 10)
sql
describe
st_bigint_24
sql
select tagname from
st_bigint_24
if $data
23
!= 10 then
if $data
00
!= 10 then
return -1
return -1
endi
endi
sql select * from st_bigint_24
sql select * from st_bigint_24
...
@@ -294,8 +294,8 @@ if $data01 != 10 then
...
@@ -294,8 +294,8 @@ if $data01 != 10 then
return -1
return -1
endi
endi
sql insert into st_bigint_25 using mt_bigint tags ("-0") values (now, "-0")
sql insert into st_bigint_25 using mt_bigint tags ("-0") values (now, "-0")
sql
describe
st_bigint_25
sql
select tagname from
st_bigint_25
if $data
23
!= 0 then
if $data
00
!= 0 then
return -1
return -1
endi
endi
sql select * from st_bigint_25
sql select * from st_bigint_25
...
@@ -303,8 +303,8 @@ if $data01 != 0 then
...
@@ -303,8 +303,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_bigint_26 using mt_bigint tags ('123') values (now, '123')
sql insert into st_bigint_26 using mt_bigint tags ('123') values (now, '123')
sql
describe
st_bigint_26
sql
select tagname from
st_bigint_26
if $data
23
!= 123 then
if $data
00
!= 123 then
return -1
return -1
endi
endi
sql select * from st_bigint_26
sql select * from st_bigint_26
...
@@ -312,8 +312,8 @@ if $data01 != 123 then
...
@@ -312,8 +312,8 @@ if $data01 != 123 then
return -1
return -1
endi
endi
sql insert into st_bigint_27 using mt_bigint tags (+056) values (now, +00056)
sql insert into st_bigint_27 using mt_bigint tags (+056) values (now, +00056)
sql
describe
st_bigint_27
sql
select tagname from
st_bigint_27
if $data
23
!= 56 then
if $data
00
!= 56 then
return -1
return -1
endi
endi
sql select * from st_bigint_27
sql select * from st_bigint_27
...
@@ -321,8 +321,8 @@ if $data01 != 56 then
...
@@ -321,8 +321,8 @@ if $data01 != 56 then
return -1
return -1
endi
endi
sql insert into st_bigint_28 using mt_bigint tags (-056) values (now, -0056)
sql insert into st_bigint_28 using mt_bigint tags (-056) values (now, -0056)
sql
describe
st_bigint_28
sql
select tagname from
st_bigint_28
if $data
23
!= -56 then
if $data
00
!= -56 then
return -1
return -1
endi
endi
sql select * from st_bigint_28
sql select * from st_bigint_28
...
@@ -330,47 +330,47 @@ if $data01 != -56 then
...
@@ -330,47 +330,47 @@ if $data01 != -56 then
return -1
return -1
endi
endi
## case 03: alter tag values
##
#
case 03: alter tag values
sql alter table st_bigint_0 set tag tagname=9223372036854775807
#
sql alter table st_bigint_0 set tag tagname=9223372036854775807
sql describe
st_bigint_0
#sql select tagname from
st_bigint_0
if $data23
!= 9223372036854775807 then
#if $data00
!= 9223372036854775807 then
return -1
#
return -1
endi
#endi
sql alter table st_bigint_0 set tag tagname=-9223372036854775807
#
sql alter table st_bigint_0 set tag tagname=-9223372036854775807
sql describe
st_bigint_0
#sql select tagname from
st_bigint_0
if $data23
!= -9223372036854775807 then
#if $data00
!= -9223372036854775807 then
return -1
#
return -1
endi
#endi
sql alter table st_bigint_0 set tag tagname=+100
#
sql alter table st_bigint_0 set tag tagname=+100
sql describe
st_bigint_0
#sql select tagname from
st_bigint_0
if $data23
!= 100 then
#if $data00
!= 100 then
return -1
#
return -1
endi
#
endi
sql alter table st_bigint_0 set tag tagname=-33
#
sql alter table st_bigint_0 set tag tagname=-33
sql describe
st_bigint_0
#sql select tagname from
st_bigint_0
if $data23
!= -33 then
#if $data00
!= -33 then
return -1
#
return -1
endi
#
endi
sql alter table st_bigint_0 set tag tagname='+98'
#
sql alter table st_bigint_0 set tag tagname='+98'
sql describe
st_bigint_0
#sql select tagname from
st_bigint_0
if $data23
!= 98 then
#if $data00
!= 98 then
return -1
#
return -1
endi
#
endi
sql alter table st_bigint_0 set tag tagname='-076'
#
sql alter table st_bigint_0 set tag tagname='-076'
sql describe
st_bigint_0
#sql select tagname from
st_bigint_0
if $data23
!= -76 then
#if $data00
!= -76 then
return -1
#
return -1
endi
#
endi
sql alter table st_bigint_0 set tag tagname=+0012
#
sql alter table st_bigint_0 set tag tagname=+0012
sql describe
st_bigint_0
#sql select tagname from
st_bigint_0
if $data23
!= 12 then
#if $data00
!= 12 then
return -1
#
return -1
endi
#
endi
sql alter table st_bigint_0 set tag tagname=-00063
#
sql alter table st_bigint_0 set tag tagname=-00063
sql describe
st_bigint_0
#sql select tagname from
st_bigint_0
if $data23
!= -63 then
#if $data00
!= -63 then
return -1
#
return -1
endi
#
endi
## case 04: illegal input
## case 04: illegal input
################## when overflow, auto set max
################## when overflow, auto set max
...
@@ -454,13 +454,13 @@ sql insert into st_bigint_e23 using mt_bigint tags (033) values (now, 00062)
...
@@ -454,13 +454,13 @@ sql insert into st_bigint_e23 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e24 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e24 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e25 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e25 using mt_bigint tags (033) values (now, 00062)
sql alter table st_bigint_e13 set tag tagname=9223372036854775808
#
sql alter table st_bigint_e13 set tag tagname=9223372036854775808
sql_error alter table st_bigint_e14 set tag tagname=-9223372036854775808
#sql_error alter table st_bigint_e14 set tag tagname=-9223372036854775808
sql alter table st_bigint_e15 set tag tagname=92233720368547758080
#sql alter table st_bigint_e15 set tag tagname=92233720368547758080
sql_error alter table st_bigint_e16 set tag tagname=-92233720368547758080
#sql_error alter table st_bigint_e16 set tag tagname=-92233720368547758080
sql_error alter table st_bigint_e19 set tag tagname=123abc
#sql_error alter table st_bigint_e19 set tag tagname=123abc
sql_error alter table st_bigint_e20 set tag tagname="123abc"
#sql_error alter table st_bigint_e20 set tag tagname="123abc"
sql_error alter table st_bigint_e22 set tag tagname=abc
#sql_error alter table st_bigint_e22 set tag tagname=abc
sql_error alter table st_bigint_e23 set tag tagname="abc"
#sql_error alter table st_bigint_e23 set tag tagname="abc"
sql_error alter table st_bigint_e24 set tag tagname=" "
#sql_error alter table st_bigint_e24 set tag tagname=" "
sql_error alter table st_bigint_e25 set tag tagname=''
#sql_error alter table st_bigint_e25 set tag tagname=''
tests/script/general/parser/columnValue_bool.sim
浏览文件 @
a0237aae
...
@@ -12,110 +12,110 @@ sql create table mt_bool (ts timestamp, c bool) tags (tagname bool)
...
@@ -12,110 +12,110 @@ sql create table mt_bool (ts timestamp, c bool) tags (tagname bool)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_bool_0 using mt_bool tags (null)
sql create table st_bool_0 using mt_bool tags (null)
sql select tagname from st_bool_0
sql select tagname from st_bool_0
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==1== expect: NULL, actually: $data
23
print ==1== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql create table st_bool_1 using mt_bool tags (NULL)
sql create table st_bool_1 using mt_bool tags (NULL)
sql select tagname from st_bool_1
sql select tagname from st_bool_1
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==2== expect: NULL, actually: $data
23
print ==2== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql create table st_bool_2 using mt_bool tags ('null')
sql create table st_bool_2 using mt_bool tags ('null')
sql select tagname from st_bool_2
sql select tagname from st_bool_2
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==3== expect: NULL, actually: $data
23
print ==3== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql create table st_bool_3 using mt_bool tags ('NULL')
sql create table st_bool_3 using mt_bool tags ('NULL')
sql select tagname from st_bool_3
sql select tagname from st_bool_3
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==4== expect: NULL, actually: $data
23
print ==4== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql create table st_bool_4 using mt_bool tags ("null")
sql create table st_bool_4 using mt_bool tags ("null")
sql select tagname from st_bool_4
sql select tagname from st_bool_4
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==5== expect: NULL, actually: $data
23
print ==5== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql create table st_bool_5 using mt_bool tags ("NULL")
sql create table st_bool_5 using mt_bool tags ("NULL")
sql select tagname from st_bool_5
sql select tagname from st_bool_5
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==6== expect: NULL, actually: $data
23
print ==6== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql create table st_bool_6 using mt_bool tags ("true")
sql create table st_bool_6 using mt_bool tags ("true")
sql select tagname from st_bool_6
sql select tagname from st_bool_6
if $data
23 != true
then
if $data
00 != 1
then
print ==7== expect:
true, actually: $data23
print ==7== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_7 using mt_bool tags ('true')
sql create table st_bool_7 using mt_bool tags ('true')
sql select tagname from st_bool_7
sql select tagname from st_bool_7
if $data
23 != true
then
if $data
00 != 1
then
print ==8== expect:
true, actually: $data23
print ==8== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_8 using mt_bool tags (true)
sql create table st_bool_8 using mt_bool tags (true)
sql select tagname from st_bool_8
sql select tagname from st_bool_8
if $data
23 != true
then
if $data
00 != 1
then
print ==9== expect:
true, actually: $data23
print ==9== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_9 using mt_bool tags ("false")
sql create table st_bool_9 using mt_bool tags ("false")
sql select tagname from st_bool_9
sql select tagname from st_bool_9
if $data
23 != false
then
if $data
00 != 0
then
print ==10== expect:
false, actually: $data23
print ==10== expect:
0, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_10 using mt_bool tags ('false')
sql create table st_bool_10 using mt_bool tags ('false')
sql select tagname from st_bool_10
sql select tagname from st_bool_10
if $data
23 != false
then
if $data
00 != 0
then
print ==11== expect:
false, actually: $data23
print ==11== expect:
0, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_11 using mt_bool tags (false)
sql create table st_bool_11 using mt_bool tags (false)
sql select tagname from st_bool_11
sql select tagname from st_bool_11
if $data
23 != false
then
if $data
00 != 0
then
print ==12== expect:
false, actually: $data23
print ==12== expect:
0, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_12 using mt_bool tags (0)
sql create table st_bool_12 using mt_bool tags (0)
sql select tagname from st_bool_12
sql select tagname from st_bool_12
if $data
23 != false
then
if $data
00 != 0
then
print ==13== expect:
false, actually: $data23
print ==13== expect:
0, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_13 using mt_bool tags (1)
sql create table st_bool_13 using mt_bool tags (1)
sql select tagname from st_bool_13
sql select tagname from st_bool_13
if $data
23 != true
then
if $data
00 != 1
then
print ==14== expect:
true, actually: $data23
print ==14== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_14 using mt_bool tags (6.9)
sql create table st_bool_14 using mt_bool tags (6.9)
sql select tagname from st_bool_14
sql select tagname from st_bool_14
if $data
23 != true
then
if $data
00 != 1
then
print ==15== expect:
true, actually: $data23
print ==15== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_15 using mt_bool tags (-3)
sql create table st_bool_15 using mt_bool tags (-3)
sql select tagname from st_bool_15
sql select tagname from st_bool_15
if $data
23 != true
then
if $data
00 != 1
then
print ==16== expect:
true, actually: $data23
print ==16== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_15_0 using mt_bool tags (+300)
sql create table st_bool_15_0 using mt_bool tags (+300)
sql select tagname from st_bool_15_0
sql select tagname from st_bool_15_0
if $data
23 != true
then
if $data
00 != 1
then
print ==16== expect:
true, actually: $data23
print ==16== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_15_1 using mt_bool tags (-8.03)
sql create table st_bool_15_1 using mt_bool tags (-8.03)
sql select tagname from st_bool_15_1
sql select tagname from st_bool_15_1
if $data
23 != true
then
if $data
00 != 1
then
print ==16== expect:
true, actually: $data23
print ==16== expect:
1, actually: $data00
return -1
return -1
endi
endi
...
@@ -125,7 +125,7 @@ sql select * from st_bool_0
...
@@ -125,7 +125,7 @@ sql select * from st_bool_0
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==17== expect: NULL, actually: $data01
print ==17== expect: NULL, actually: $data01
return -1
return -1
endi
endi
...
@@ -134,7 +134,7 @@ sql select * from st_bool_1
...
@@ -134,7 +134,7 @@ sql select * from st_bool_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==18== expect: NULL, actually: $data01
print ==18== expect: NULL, actually: $data01
return -1
return -1
endi
endi
...
@@ -143,7 +143,7 @@ sql select * from st_bool_2
...
@@ -143,7 +143,7 @@ sql select * from st_bool_2
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==19== expect: NULL, actually: $data01
print ==19== expect: NULL, actually: $data01
return -1
return -1
endi
endi
...
@@ -152,7 +152,7 @@ sql select * from st_bool_3
...
@@ -152,7 +152,7 @@ sql select * from st_bool_3
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==20== expect: NULL, actually: $data01
print ==20== expect: NULL, actually: $data01
return -1
return -1
endi
endi
...
@@ -161,7 +161,7 @@ sql select * from st_bool_4
...
@@ -161,7 +161,7 @@ sql select * from st_bool_4
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==21== expect: NULL, actually: $data01
print ==21== expect: NULL, actually: $data01
return -1
return -1
endi
endi
...
@@ -170,7 +170,7 @@ sql select * from st_bool_5
...
@@ -170,7 +170,7 @@ sql select * from st_bool_5
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==22== expect: NULL, actually: $data01
print ==22== expect: NULL, actually: $data01
return -1
return -1
endi
endi
...
@@ -180,7 +180,7 @@ if $rows != 1 then
...
@@ -180,7 +180,7 @@ if $rows != 1 then
return -1
return -1
endi
endi
if $data01 != 1 then
if $data01 != 1 then
print ==23== expect:
true
, actually: $data01
print ==23== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_7 values (now, 'true')
sql insert into st_bool_7 values (now, 'true')
...
@@ -189,7 +189,7 @@ if $rows != 1 then
...
@@ -189,7 +189,7 @@ if $rows != 1 then
return -1
return -1
endi
endi
if $data01 != 1 then
if $data01 != 1 then
print ==24== expect:
true
, actually: $data01
print ==24== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_8 values (now, true)
sql insert into st_bool_8 values (now, true)
...
@@ -198,7 +198,7 @@ if $rows != 1 then
...
@@ -198,7 +198,7 @@ if $rows != 1 then
return -1
return -1
endi
endi
if $data01 != 1 then
if $data01 != 1 then
print ==25== expect:
true
, actually: $data01
print ==25== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_9 values (now, "false")
sql insert into st_bool_9 values (now, "false")
...
@@ -243,7 +243,7 @@ if $rows != 1 then
...
@@ -243,7 +243,7 @@ if $rows != 1 then
return -1
return -1
endi
endi
if $data01 != 1 then
if $data01 != 1 then
print ==30== expect:
true
, actually: $data01
print ==30== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_14 values (now, 6.9)
sql insert into st_bool_14 values (now, 6.9)
...
@@ -252,7 +252,7 @@ if $rows != 1 then
...
@@ -252,7 +252,7 @@ if $rows != 1 then
return -1
return -1
endi
endi
if $data01 != 1 then
if $data01 != 1 then
print ==31== expect:
true
, actually: $data01
print ==31== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_15 values (now, -3)
sql insert into st_bool_15 values (now, -3)
...
@@ -286,201 +286,201 @@ endi
...
@@ -286,201 +286,201 @@ endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_bool_16 using mt_bool tags (null) values (now, null)
sql insert into st_bool_16 using mt_bool tags (null) values (now, null)
sql select tagname from st_bool_16
sql select tagname from st_bool_16
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==33== expect: NULL, actually: $data
23
print ==33== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql select * from st_bool_16
sql select * from st_bool_16
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==34== expect: NULL, actually: $data01
print ==34== expect: NULL, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_17 using mt_bool tags (NULL) values (now, NULL)
sql insert into st_bool_17 using mt_bool tags (NULL) values (now, NULL)
sql select tagname from st_bool_17
sql select tagname from st_bool_17
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==35== expect: NULL, actually: $data
23
print ==35== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql select * from st_bool_17
sql select * from st_bool_17
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==36== expect: NULL, actually: $data01
print ==36== expect: NULL, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_18 using mt_bool tags ('null') values (now, 'null')
sql insert into st_bool_18 using mt_bool tags ('null') values (now, 'null')
sql select tagname from st_bool_18
sql select tagname from st_bool_18
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==37== expect: NULL, actually: $data
23
print ==37== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql select * from st_bool_18
sql select * from st_bool_18
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==38== expect: NULL, actually: $data01
print ==38== expect: NULL, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_19 using mt_bool tags ('NULL') values (now, 'NULL')
sql insert into st_bool_19 using mt_bool tags ('NULL') values (now, 'NULL')
sql select tagname from st_bool_19
sql select tagname from st_bool_19
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==39== expect: NULL, actually: $data
23
print ==39== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql select * from st_bool_19
sql select * from st_bool_19
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==40== expect: NULL, actually: $data01
print ==40== expect: NULL, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_20 using mt_bool tags ("null") values (now, "null")
sql insert into st_bool_20 using mt_bool tags ("null") values (now, "null")
sql select tagname from st_bool_20
sql select tagname from st_bool_20
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==41== expect: NULL, actually: $data
23
print ==41== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql select * from st_bool_20
sql select * from st_bool_20
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==42== expect: NULL, actually: $data01
print ==42== expect: NULL, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_21 using mt_bool tags ("NULL") values (now, "NULL")
sql insert into st_bool_21 using mt_bool tags ("NULL") values (now, "NULL")
sql select tagname from st_bool_21
sql select tagname from st_bool_21
if $data
23
!= NULL then
if $data
00
!= NULL then
print ==43== expect: NULL, actually: $data
23
print ==43== expect: NULL, actually: $data
00
return -1
return -1
endi
endi
sql select * from st_bool_21
sql select * from st_bool_21
if $data01 !=
null
then
if $data01 !=
NULL
then
print ==44== expect: NULL, actually: $data01
print ==44== expect: NULL, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_22 using mt_bool tags ("true") values (now, "true")
sql insert into st_bool_22 using mt_bool tags ("true") values (now, "true")
sql select tagname from st_bool_22
sql select tagname from st_bool_22
if $data
23 != true
then
if $data
00 != 1
then
print ==45== expect:
true, actually: $data23
print ==45== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_22
sql select * from st_bool_22
if $data01 != 1 then
if $data01 != 1 then
print ==46== expect:
true
, actually: $data01
print ==46== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_23 using mt_bool tags ('true') values (now, 'true')
sql insert into st_bool_23 using mt_bool tags ('true') values (now, 'true')
sql select tagname from st_bool_23
sql select tagname from st_bool_23
if $data
23 != true
then
if $data
00 != 1
then
print ==47== expect:
true, actually: $data23
print ==47== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_23
sql select * from st_bool_23
if $data01 != 1 then
if $data01 != 1 then
print ==48== expect:
true
, actually: $data01
print ==48== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_24 using mt_bool tags (true) values (now, true)
sql insert into st_bool_24 using mt_bool tags (true) values (now, true)
sql select tagname from st_bool_24
sql select tagname from st_bool_24
if $data
23 != true
then
if $data
00 != 1
then
print ==49== expect:
true, actually: $data23
print ==49== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_24
sql select * from st_bool_24
if $data01 != 1 then
if $data01 != 1 then
print ==50== expect:
true
, actually: $data01
print ==50== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_25 using mt_bool tags ("false") values (now, "false")
sql insert into st_bool_25 using mt_bool tags ("false") values (now, "false")
sql select tagname from st_bool_25
sql select tagname from st_bool_25
if $data
23 != false
then
if $data
00 != 0
then
print ==51== expect:
false, actually: $data23
print ==51== expect:
0, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_25
sql select * from st_bool_25
if $data01 != 0 then
if $data01 != 0 then
print ==52== expect:
false
, actually: $data01
print ==52== expect:
0
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_26 using mt_bool tags ('false') values (now, 'false')
sql insert into st_bool_26 using mt_bool tags ('false') values (now, 'false')
sql select tagname from st_bool_26
sql select tagname from st_bool_26
if $data
23 != false
then
if $data
00 != 0
then
print ==53== expect:
false, actually: $data23
print ==53== expect:
0, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_26
sql select * from st_bool_26
if $data01 != 0 then
if $data01 != 0 then
print ==54== expect:
false
, actually: $data01
print ==54== expect:
0
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_27 using mt_bool tags (false) values (now, false)
sql insert into st_bool_27 using mt_bool tags (false) values (now, false)
sql select tagname from st_bool_27
sql select tagname from st_bool_27
if $data
23 != false
then
if $data
00 != 0
then
print ==55== expect:
false, actually: $data23
print ==55== expect:
0, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_27
sql select * from st_bool_27
if $data01 != 0 then
if $data01 != 0 then
print ==56== expect:
false
, actually: $data01
print ==56== expect:
0
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_28 using mt_bool tags (0) values (now, 0)
sql insert into st_bool_28 using mt_bool tags (0) values (now, 0)
sql select tagname from st_bool_28
sql select tagname from st_bool_28
if $data
23 != false
then
if $data
00 != 0
then
print ==57== expect:
false, actually: $data23
print ==57== expect:
0, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_28
sql select * from st_bool_28
if $data01 != 0 then
if $data01 != 0 then
print ==58== expect:
false
, actually: $data01
print ==58== expect:
0
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_29 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_29 using mt_bool tags (1) values (now, 1)
sql select tagname from st_bool_29
sql select tagname from st_bool_29
if $data
23 != true
then
if $data
00 != 1
then
print ==59== expect:
true, actually: $data23
print ==59== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_29
sql select * from st_bool_29
if $data01 != 1 then
if $data01 != 1 then
print ==60== expect:
true
, actually: $data01
print ==60== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_30 using mt_bool tags (6.9) values (now, 6.9)
sql insert into st_bool_30 using mt_bool tags (6.9) values (now, 6.9)
sql select tagname from st_bool_30
sql select tagname from st_bool_30
if $data
23 != true
then
if $data
00 != 1
then
print ==61== expect:
true, actually: $data23
print ==61== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_30
sql select * from st_bool_30
if $data01 != 1 then
if $data01 != 1 then
print ==62== expect:
true
, actually: $data01
print ==62== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_31 using mt_bool tags (-3) values (now, -3)
sql insert into st_bool_31 using mt_bool tags (-3) values (now, -3)
sql select tagname from st_bool_31
sql select tagname from st_bool_31
if $data
23 != true
then
if $data
00 != 1
then
print ==63== expect:
true, actually: $data23
print ==63== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_31
sql select * from st_bool_31
if $data01 != 1 then
if $data01 != 1 then
print ==64== expect:
true
, actually: $data01
print ==64== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_32 using mt_bool tags (+300) values (now, +300)
sql insert into st_bool_32 using mt_bool tags (+300) values (now, +300)
sql select tagname from st_bool_32
sql select tagname from st_bool_32
if $data
23 != true
then
if $data
00 != 1
then
print ==63== expect:
true, actually: $data23
print ==63== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_32
sql select * from st_bool_32
if $data01 != 1 then
if $data01 != 1 then
print ==64== expect:
true
, actually: $data01
print ==64== expect:
1
, actually: $data01
return -1
return -1
endi
endi
sql insert into st_bool_33 using mt_bool tags (+30.890) values (now, +30.890)
sql insert into st_bool_33 using mt_bool tags (+30.890) values (now, +30.890)
sql select tagname from st_bool_33
sql select tagname from st_bool_33
if $data
23 != true
then
if $data
00 != 1
then
print ==63== expect:
true, actually: $data23
print ==63== expect:
1, actually: $data00
return -1
return -1
endi
endi
sql select * from st_bool_33
sql select * from st_bool_33
if $data01 != 1 then
if $data01 != 1 then
print ==64== expect:
true
, actually: $data01
print ==64== expect:
1
, actually: $data01
return -1
return -1
endi
endi
...
@@ -490,86 +490,86 @@ endi
...
@@ -490,86 +490,86 @@ endi
## case 03: alter tag values
## case 03: alter tag values
sql alter table st_bool_0 set tag tagname=true
#
sql alter table st_bool_0 set tag tagname=true
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= true then
#if $data00
!= true then
return -1
#
return -1
endi
#endi
sql alter table st_bool_0 set tag tagname=NULL
#
sql alter table st_bool_0 set tag tagname=NULL
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= NULL then
#if $data00
!= NULL then
return -1
#
return -1
endi
#endi
sql alter table st_bool_0 set tag tagname=false
#
sql alter table st_bool_0 set tag tagname=false
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= false then
#if $data00
!= false then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname=null
#
sql alter table st_bool_0 set tag tagname=null
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= NULL then
#if $data00
!= NULL then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname='true'
#
sql alter table st_bool_0 set tag tagname='true'
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= true then
#if $data00
!= true then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname='null'
#
sql alter table st_bool_0 set tag tagname='null'
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= NULL then
#if $data00
!= NULL then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname='false'
#
sql alter table st_bool_0 set tag tagname='false'
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= false then
#if $data00
!= false then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname='NULL'
#
sql alter table st_bool_0 set tag tagname='NULL'
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= NULL then
#if $data00
!= NULL then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname="true"
#
sql alter table st_bool_0 set tag tagname="true"
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= true then
#if $data00
!= true then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname="null"
#
sql alter table st_bool_0 set tag tagname="null"
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= NULL then
#if $data00
!= NULL then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname="false"
#
sql alter table st_bool_0 set tag tagname="false"
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= false then
#if $data00
!= false then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname="NULL"
#
sql alter table st_bool_0 set tag tagname="NULL"
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= NULL then
#if $data00
!= NULL then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname=1
#
sql alter table st_bool_0 set tag tagname=1
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= true then
#if $data00
!= true then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname=0
#
sql alter table st_bool_0 set tag tagname=0
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= false then
#if $data00
!= false then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname=6.9
#
sql alter table st_bool_0 set tag tagname=6.9
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= true then
#if $data00
!= true then
return -1
#
return -1
endi
#
endi
sql alter table st_bool_0 set tag tagname=-3
#
sql alter table st_bool_0 set tag tagname=-3
sql select tagname from st_bool_0
#
sql select tagname from st_bool_0
if $data23
!= true then
#if $data00
!= true then
return -1
#
return -1
endi
#
endi
# case 04: illegal input
# case 04: illegal input
sql_error create table st_bool_e0 using mt_bool tags (123abc)
sql_error create table st_bool_e0 using mt_bool tags (123abc)
...
...
tests/script/general/parser/columnValue_double.sim
浏览文件 @
a0237aae
...
@@ -11,145 +11,146 @@ print ========== double
...
@@ -11,145 +11,146 @@ print ========== double
sql create table mt_double (ts timestamp, c double) tags (tagname double)
sql create table mt_double (ts timestamp, c double) tags (tagname double)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_double_0 using mt_double tags (
null
)
sql create table st_double_0 using mt_double tags (
NULL
)
sql
describe
st_double_0
sql
select tagname from
st_double_0
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_double_1 using mt_double tags (NULL)
sql create table st_double_1 using mt_double tags (NULL)
sql
describe
st_double_1
sql
select tagname from
st_double_1
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_double_2 using mt_double tags ('
null
')
sql create table st_double_2 using mt_double tags ('
NULL
')
sql
describe
st_double_2
sql
select tagname from
st_double_2
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_double_3 using mt_double tags ('NULL')
sql create table st_double_3 using mt_double tags ('NULL')
sql
describe
st_double_3
sql
select tagname from
st_double_3
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_double_4 using mt_double tags ("
null
")
sql create table st_double_4 using mt_double tags ("
NULL
")
sql
describe
st_double_4
sql
select tagname from
st_double_4
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_double_5 using mt_double tags ("NULL")
sql create table st_double_5 using mt_double tags ("NULL")
sql
describe
st_double_5
sql
select tagname from
st_double_5
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_double_6 using mt_double tags (-123.321)
sql create table st_double_6 using mt_double tags (-123.321)
sql describe st_double_6
sql select tagname from st_double_6
if $data23 != -123.321000 then
if $data00 != -123.321000000 then
print expect -123.321000000, actual: $data00
return -1
return -1
endi
endi
sql create table st_double_7 using mt_double tags (+1.567)
sql create table st_double_7 using mt_double tags (+1.567)
sql
describe
st_double_7
sql
select tagname from
st_double_7
if $data
23 != 1.567
000 then
if $data
00 != 1.567000
000 then
return -1
return -1
endi
endi
sql create table st_double_8 using mt_double tags (379.001)
sql create table st_double_8 using mt_double tags (379.001)
sql
describe
st_double_8
sql
select tagname from
st_double_8
if $data
23 != 379.001
000 then
if $data
00 != 379.001000
000 then
return -1
return -1
endi
endi
sql create table st_double_9 using mt_double tags (1.5e+3)
sql create table st_double_9 using mt_double tags (1.5e+3)
sql
describe
st_double_9
sql
select tagname from
st_double_9
if $data
23 != 1500.
000000 then
if $data
00 != 1500.000
000000 then
return -1
return -1
endi
endi
sql create table st_double_10 using mt_double tags (-1.5e-3)
sql create table st_double_10 using mt_double tags (-1.5e-3)
sql
describe
st_double_10
sql
select tagname from
st_double_10
if $data
23 != -0.0015
00 then
if $data
00 != -0.0015000
00 then
return -1
return -1
endi
endi
sql create table st_double_11 using mt_double tags (+1.5e+3)
sql create table st_double_11 using mt_double tags (+1.5e+3)
sql
describe
st_double_11
sql
select tagname from
st_double_11
if $data
23 != 1500.
000000 then
if $data
00 != 1500.000
000000 then
return -1
return -1
endi
endi
sql create table st_double_12 using mt_double tags (-1.5e+3)
sql create table st_double_12 using mt_double tags (-1.5e+3)
sql
describe
st_double_12
sql
select tagname from
st_double_12
if $data
23 != -1500.
000000 then
if $data
00 != -1500.000
000000 then
return -1
return -1
endi
endi
sql create table st_double_13 using mt_double tags (1.5e-3)
sql create table st_double_13 using mt_double tags (1.5e-3)
sql
describe
st_double_13
sql
select tagname from
st_double_13
if $data
23 != 0.0015
00 then
if $data
00 != 0.0015000
00 then
return -1
return -1
endi
endi
sql create table st_double_14 using mt_double tags (1.5E-3)
sql create table st_double_14 using mt_double tags (1.5E-3)
sql
describe
st_double_14
sql
select tagname from
st_double_14
if $data
23 != 0.0015
00 then
if $data
00 != 0.0015000
00 then
return -1
return -1
endi
endi
sql create table st_double_6_0 using mt_double tags ('-123.321')
sql create table st_double_6_0 using mt_double tags ('-123.321')
sql
describe
st_double_6_0
sql
select tagname from
st_double_6_0
if $data
23 != -123.321
000 then
if $data
00 != -123.321000
000 then
return -1
return -1
endi
endi
sql create table st_double_7_0 using mt_double tags ('+1.567')
sql create table st_double_7_0 using mt_double tags ('+1.567')
sql
describe
st_double_7_0
sql
select tagname from
st_double_7_0
if $data
23 != 1.567
000 then
if $data
00 != 1.567000
000 then
return -1
return -1
endi
endi
sql create table st_double_8_0 using mt_double tags ('379.001')
sql create table st_double_8_0 using mt_double tags ('379.001')
sql
describe
st_double_8_0
sql
select tagname from
st_double_8_0
if $data
23 != 379.001
000 then
if $data
00 != 379.001000
000 then
return -1
return -1
endi
endi
sql create table st_double_9_0 using mt_double tags ('1.5e+3')
sql create table st_double_9_0 using mt_double tags ('1.5e+3')
sql
describe
st_double_9_0
sql
select tagname from
st_double_9_0
if $data
23 != 1500.
000000 then
if $data
00 != 1500.000
000000 then
return -1
return -1
endi
endi
sql create table st_double_10_0 using mt_double tags ('-1.5e-3')
sql create table st_double_10_0 using mt_double tags ('-1.5e-3')
sql
describe
st_double_10_0
sql
select tagname from
st_double_10_0
if $data
23 != -0.0015
00 then
if $data
00 != -0.0015000
00 then
return -1
return -1
endi
endi
sql create table st_double_11_0 using mt_double tags ('+1.5e+3')
sql create table st_double_11_0 using mt_double tags ('+1.5e+3')
sql
describe
st_double_11_0
sql
select tagname from
st_double_11_0
if $data
23 != 1500.
000000 then
if $data
00 != 1500.000
000000 then
return -1
return -1
endi
endi
sql create table st_double_12_0 using mt_double tags ('-1.5e+3')
sql create table st_double_12_0 using mt_double tags ('-1.5e+3')
sql
describe
st_double_12_0
sql
select tagname from
st_double_12_0
if $data
23 != -1500.
000000 then
if $data
00 != -1500.000
000000 then
return -1
return -1
endi
endi
sql create table st_double_13_0 using mt_double tags ('1.5e-3')
sql create table st_double_13_0 using mt_double tags ('1.5e-3')
sql
describe
st_double_13_0
sql
select tagname from
st_double_13_0
if $data
23 != 0.0015
00 then
if $data
00 != 0.0015000
00 then
return -1
return -1
endi
endi
sql create table st_double_14_0 using mt_double tags ('1.5E-3')
sql create table st_double_14_0 using mt_double tags ('1.5E-3')
sql
describe
st_double_14_0
sql
select tagname from
st_double_14_0
if $data
23 != 0.0015
00 then
if $data
00 != 0.0015000
00 then
return -1
return -1
endi
endi
sql create table st_double_15_0 using mt_double tags (1.7976931348623157e+308)
sql create table st_double_15_0 using mt_double tags (1.7976931348623157e+308)
sql
describe
st_double_15_0
sql
select tagname from
st_double_15_0
#if $data
23 != 0.0015
00 then
#if $data
00 != 0.0015000
00 then
# return -1
# return -1
#endi
#endi
sql create table st_double_16_0 using mt_double tags (-1.7976931348623157e+308)
sql create table st_double_16_0 using mt_double tags (-1.7976931348623157e+308)
sql
describe
st_double_16_0
sql
select tagname from
st_double_16_0
#if $data
23 != 0.0015
00 then
#if $data
00 != 0.0015000
00 then
# return -1
# return -1
#endi
#endi
## case 01: insert values for test column values
## case 01: insert values for test column values
sql insert into st_double_0 values (now,
null
)
sql insert into st_double_0 values (now,
NULL
)
sql select * from st_double_0
sql select * from st_double_0
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_1 values (now, NULL)
sql insert into st_double_1 values (now, NULL)
...
@@ -157,15 +158,15 @@ sql select * from st_double_1
...
@@ -157,15 +158,15 @@ sql select * from st_double_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_2 values (now, '
null
')
sql insert into st_double_2 values (now, '
NULL
')
sql select * from st_double_2
sql select * from st_double_2
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_3 values (now, 'NULL')
sql insert into st_double_3 values (now, 'NULL')
...
@@ -173,15 +174,15 @@ sql select * from st_double_3
...
@@ -173,15 +174,15 @@ sql select * from st_double_3
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_4 values (now, "
null
")
sql insert into st_double_4 values (now, "
NULL
")
sql select * from st_double_4
sql select * from st_double_4
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_5 values (now, "NULL")
sql insert into st_double_5 values (now, "NULL")
...
@@ -189,7 +190,7 @@ sql select * from st_double_5
...
@@ -189,7 +190,7 @@ sql select * from st_double_5
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
...
@@ -215,7 +216,7 @@ sql select * from st_double_8
...
@@ -215,7 +216,7 @@ sql select * from st_double_8
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
#if $data01 != 100.89000 then
#if $data01 != 100.89000
000
then
# return -1
# return -1
#endi
#endi
sql insert into st_double_9 values (now, "-0.98")
sql insert into st_double_9 values (now, "-0.98")
...
@@ -223,7 +224,7 @@ sql select * from st_double_9
...
@@ -223,7 +224,7 @@ sql select * from st_double_9
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
#if $data01 != -0.980000 then
#if $data01 != -0.980000
000
then
# return -1
# return -1
#endi
#endi
sql insert into st_double_10 values (now, '0')
sql insert into st_double_10 values (now, '0')
...
@@ -231,7 +232,7 @@ sql select * from st_double_10
...
@@ -231,7 +232,7 @@ sql select * from st_double_10
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
#if $data01 != 0.00000 then # tsim only print 4 bits after dot
#if $data01 != 0.00000
000
then # tsim only print 4 bits after dot
# return -1
# return -1
#endi
#endi
sql insert into st_double_11 values (now, -0)
sql insert into st_double_11 values (now, -0)
...
@@ -239,7 +240,7 @@ sql select * from st_double_11
...
@@ -239,7 +240,7 @@ sql select * from st_double_11
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
#if $data01 != 0.00000 then
#if $data01 != 0.00000
0000
then
# return -1
# return -1
#endi
#endi
sql insert into st_double_12 values (now, "+056")
sql insert into st_double_12 values (now, "+056")
...
@@ -256,7 +257,7 @@ sql select * from st_double_13
...
@@ -256,7 +257,7 @@ sql select * from st_double_13
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
#if $data01 != 56.000000 then
#if $data01 != 56.000000
000
then
# return -1
# return -1
#endi
#endi
...
@@ -270,64 +271,64 @@ endi
...
@@ -270,64 +271,64 @@ endi
#endi
#endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_double_16 using mt_double tags (
null) values (now, null
)
sql insert into st_double_16 using mt_double tags (
NULL ) values (now, NULL
)
sql
describe
st_double_16
sql
select tagname from
st_double_16
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_16
sql select * from st_double_16
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_17 using mt_double tags (NULL) values (now, NULL)
sql insert into st_double_17 using mt_double tags (NULL) values (now, NULL)
sql
describe
st_double_17
sql
select tagname from
st_double_17
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_17
sql select * from st_double_17
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_18 using mt_double tags ('
null') values (now, 'null
')
sql insert into st_double_18 using mt_double tags ('
NULL') values (now, 'NULL
')
sql
describe
st_double_18
sql
select tagname from
st_double_18
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_18
sql select * from st_double_18
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_19 using mt_double tags ('NULL') values (now, 'NULL')
sql insert into st_double_19 using mt_double tags ('NULL') values (now, 'NULL')
sql
describe
st_double_19
sql
select tagname from
st_double_19
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_19
sql select * from st_double_19
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_20 using mt_double tags ("
null") values (now, "null
")
sql insert into st_double_20 using mt_double tags ("
NULL") values (now, "NULL
")
sql
describe
st_double_20
sql
select tagname from
st_double_20
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_20
sql select * from st_double_20
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_21 using mt_double tags ("NULL") values (now, "NULL")
sql insert into st_double_21 using mt_double tags ("NULL") values (now, "NULL")
sql
describe
st_double_21
sql
select tagname from
st_double_21
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_21
sql select * from st_double_21
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_double_22 using mt_double tags (127) values (now, 1.7976931348623157e+308)
sql insert into st_double_22 using mt_double tags (127) values (now, 1.7976931348623157e+308)
sql
describe
st_double_22
sql
select tagname from
st_double_22
#if $data
23
!= 127 then
#if $data
00
!= 127 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_22
sql select * from st_double_22
...
@@ -335,8 +336,8 @@ sql select * from st_double_22
...
@@ -335,8 +336,8 @@ sql select * from st_double_22
# return -1
# return -1
#endi
#endi
sql insert into st_double_23 using mt_double tags (-127) values (now, -1.7976931348623157e+308)
sql insert into st_double_23 using mt_double tags (-127) values (now, -1.7976931348623157e+308)
sql
describe
st_double_23
sql
select tagname from
st_double_23
#if $data
23
!= -127 then
#if $data
00
!= -127 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_23
sql select * from st_double_23
...
@@ -344,8 +345,8 @@ sql select * from st_double_23
...
@@ -344,8 +345,8 @@ sql select * from st_double_23
# return -1
# return -1
#endi
#endi
sql insert into st_double_24 using mt_double tags (10) values (now, 10)
sql insert into st_double_24 using mt_double tags (10) values (now, 10)
sql
describe
st_double_24
sql
select tagname from
st_double_24
#if $data
23
!= 10 then
#if $data
00
!= 10 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_24
sql select * from st_double_24
...
@@ -353,8 +354,8 @@ sql select * from st_double_24
...
@@ -353,8 +354,8 @@ sql select * from st_double_24
# return -1
# return -1
#endi
#endi
sql insert into st_double_25 using mt_double tags ("-0") values (now, "-0")
sql insert into st_double_25 using mt_double tags ("-0") values (now, "-0")
sql
describe
st_double_25
sql
select tagname from
st_double_25
#if $data
23
!= 0 then
#if $data
00
!= 0 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_25
sql select * from st_double_25
...
@@ -362,8 +363,8 @@ sql select * from st_double_25
...
@@ -362,8 +363,8 @@ sql select * from st_double_25
# return -1
# return -1
#endi
#endi
sql insert into st_double_26 using mt_double tags ('123') values (now, '12.3')
sql insert into st_double_26 using mt_double tags ('123') values (now, '12.3')
sql
describe
st_double_26
sql
select tagname from
st_double_26
#if $data
23
!= 123 then
#if $data
00
!= 123 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_26
sql select * from st_double_26
...
@@ -371,8 +372,8 @@ sql select * from st_double_26
...
@@ -371,8 +372,8 @@ sql select * from st_double_26
# return -1
# return -1
#endi
#endi
sql insert into st_double_27 using mt_double tags (+056) values (now, +0005.6)
sql insert into st_double_27 using mt_double tags (+056) values (now, +0005.6)
sql
describe
st_double_27
sql
select tagname from
st_double_27
#if $data
23
!= 56 then
#if $data
00
!= 56 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_27
sql select * from st_double_27
...
@@ -380,8 +381,8 @@ sql select * from st_double_27
...
@@ -380,8 +381,8 @@ sql select * from st_double_27
# return -1
# return -1
#endi
#endi
sql insert into st_double_28 using mt_double tags (-056) values (now, -005.6)
sql insert into st_double_28 using mt_double tags (-056) values (now, -005.6)
sql
describe
st_double_28
sql
select tagname from
st_double_28
#if $data
23
!= -56 then
#if $data
00
!= -56 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_28
sql select * from st_double_28
...
@@ -389,47 +390,47 @@ sql select * from st_double_28
...
@@ -389,47 +390,47 @@ sql select * from st_double_28
# return -1
# return -1
#endi
#endi
## case 03: alter tag values
##
#
case 03: alter tag values
sql alter table st_double_0 set tag tagname=1.7976931348623157e+308
#
sql alter table st_double_0 set tag tagname=1.7976931348623157e+308
sql describe
st_double_0
#sql select tagname from
st_double_0
#
if $data23
!= 127 then
#
#if $data00
!= 127 then
# return -1
#
#
return -1
#
endi
#
#endi
sql alter table st_double_0 set tag tagname=-1.7976931348623157e+308
#
sql alter table st_double_0 set tag tagname=-1.7976931348623157e+308
sql describe
st_double_0
#sql select tagname from
st_double_0
#
if $data23
!= -127 then
#
#if $data00
!= -127 then
# return -1
#
#
return -1
#
endi
#
#endi
sql alter table st_double_0 set tag tagname=+10.340
#
sql alter table st_double_0 set tag tagname=+10.340
sql describe
st_double_0
#sql select tagname from
st_double_0
#
if $data23
!= 100 then
#
#if $data00
!= 100 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_double_0 set tag tagname=-33.87
#
sql alter table st_double_0 set tag tagname=-33.87
sql describe
st_double_0
#sql select tagname from
st_double_0
#
if $data23
!= -33 then
#
#if $data00
!= -33 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_double_0 set tag tagname='+9.8'
#
sql alter table st_double_0 set tag tagname='+9.8'
sql describe
st_double_0
#sql select tagname from
st_double_0
#
if $data23
!= 98 then
#
#if $data00
!= 98 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_double_0 set tag tagname='-07.6'
#
sql alter table st_double_0 set tag tagname='-07.6'
sql describe
st_double_0
#sql select tagname from
st_double_0
#
if $data23
!= -76 then
#
#if $data00
!= -76 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_double_0 set tag tagname=+0012.871
#
sql alter table st_double_0 set tag tagname=+0012.871
sql describe
st_double_0
#sql select tagname from
st_double_0
#
if $data23
!= 12 then
#
#if $data00
!= 12 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_double_0 set tag tagname=-00063.582
#
sql alter table st_double_0 set tag tagname=-00063.582
sql describe
st_double_0
#sql select tagname from
st_double_0
#
if $data23
!= -63 then
#
#if $data00
!= -63 then
# return -1
#
#
return -1
#endi
#
#
endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_double_e0 using mt_double tags (1.8976931348623157e+308)
sql_error create table st_double_e0 using mt_double tags (1.8976931348623157e+308)
...
...
tests/script/general/parser/columnValue_float.sim
浏览文件 @
a0237aae
...
@@ -11,145 +11,163 @@ print ========== float
...
@@ -11,145 +11,163 @@ print ========== float
sql create table mt_float (ts timestamp, c float) tags (tagname float)
sql create table mt_float (ts timestamp, c float) tags (tagname float)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_float_0 using mt_float tags (
null
)
sql create table st_float_0 using mt_float tags (
NULL
)
sql
describe
st_float_0
sql
select tagname from
st_float_0
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_float_1 using mt_float tags (NULL)
sql create table st_float_1 using mt_float tags (NULL)
sql
describe
st_float_1
sql
select tagname from
st_float_1
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_float_2 using mt_float tags ('
null
')
sql create table st_float_2 using mt_float tags ('
NULL
')
sql
describe
st_float_2
sql
select tagname from
st_float_2
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_float_3 using mt_float tags ('NULL')
sql create table st_float_3 using mt_float tags ('NULL')
sql
describe
st_float_3
sql
select tagname from
st_float_3
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_float_4 using mt_float tags ("
null
")
sql create table st_float_4 using mt_float tags ("
NULL
")
sql
describe
st_float_4
sql
select tagname from
st_float_4
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_float_5 using mt_float tags ("NULL")
sql create table st_float_5 using mt_float tags ("NULL")
sql
describe
st_float_5
sql
select tagname from
st_float_5
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_float_6 using mt_float tags (-123.321)
sql create table st_float_6 using mt_float tags (-123.321)
sql describe st_float_6
sql select tagname from st_float_6
if $data23 != -123.320999 then
if $data00 != -123.32100 then
print expect -123.32100, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_7 using mt_float tags (+1.567)
sql create table st_float_7 using mt_float tags (+1.567)
sql describe st_float_7
sql select tagname from st_float_7
if $data23 != 1.567000 then
if $data00 != 1.56700 then
print expect 1.56700, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_8 using mt_float tags (379.001)
sql create table st_float_8 using mt_float tags (379.001)
sql describe st_float_8
sql select tagname from st_float_8
if $data23 != 379.001007 then
if $data00 != 379.00101 then
print expect 379.00101, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_9 using mt_float tags (1.5e+3)
sql create table st_float_9 using mt_float tags (1.5e+3)
sql describe st_float_9
sql select tagname from st_float_9
if $data23 != 1500.000000 then
if $data00 != 1500.00000 then
print expect 1500.00000, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_10 using mt_float tags (-1.5e-3)
sql create table st_float_10 using mt_float tags (-1.5e-3)
sql describe st_float_10
sql select tagname from st_float_10
if $data23 != -0.001500 then
if $data00 != -0.00150 then
print expect -0.00150, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_11 using mt_float tags (+1.5e+3)
sql create table st_float_11 using mt_float tags (+1.5e+3)
sql describe st_float_11
sql select tagname from st_float_11
if $data23 != 1500.000000 then
if $data00 != 1500.00000 then
print expect 1500.00000, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_12 using mt_float tags (-1.5e+3)
sql create table st_float_12 using mt_float tags (-1.5e+3)
sql describe st_float_12
sql select tagname from st_float_12
if $data23 != -1500.000000 then
if $data00 != -1500.00000 then
print expect -1500.00000, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_13 using mt_float tags (1.5e-3)
sql create table st_float_13 using mt_float tags (1.5e-3)
sql describe st_float_13
sql select tagname from st_float_13
if $data23 != 0.001500 then
if $data00 != 0.00150 then
print expect 0.00150, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_14 using mt_float tags (1.5E-3)
sql create table st_float_14 using mt_float tags (1.5E-3)
sql describe st_float_14
sql select tagname from st_float_14
if $data23 != 0.001500 then
if $data00 != 0.00150 then
print expect 0.00150, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_6_0 using mt_float tags ('-123.321')
sql create table st_float_6_0 using mt_float tags ('-123.321')
sql describe st_float_6_0
sql select tagname from st_float_6_0
if $data23 != -123.320999 then
if $data00 != -123.32100 then
print expect -123.32100, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_7_0 using mt_float tags ('+1.567')
sql create table st_float_7_0 using mt_float tags ('+1.567')
sql describe st_float_7_0
sql select tagname from st_float_7_0
if $data23 != 1.567000 then
if $data00 != 1.56700 then
print expect 1.56700, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_8_0 using mt_float tags ('379.001')
sql create table st_float_8_0 using mt_float tags ('379.001')
sql describe st_float_8_0
sql select tagname from st_float_8_0
if $data23 != 379.001007 then
if $data00 != 379.00101 then
print expect 379.00101, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_9_0 using mt_float tags ('1.5e+3')
sql create table st_float_9_0 using mt_float tags ('1.5e+3')
sql describe st_float_9_0
sql select tagname from st_float_9_0
if $data23 != 1500.000000 then
if $data00 != 1500.00000 then
print expect 1500.00000, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_10_0 using mt_float tags ('-1.5e-3')
sql create table st_float_10_0 using mt_float tags ('-1.5e-3')
sql describe st_float_10_0
sql select tagname from st_float_10_0
if $data23 != -0.001500 then
if $data00 != -0.00150 then
print expect -0.00150, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_11_0 using mt_float tags ('+1.5e+3')
sql create table st_float_11_0 using mt_float tags ('+1.5e+3')
sql describe st_float_11_0
sql select tagname from st_float_11_0
if $data23 != 1500.000000 then
if $data00 != 1500.00000 then
print expect 1500.00000, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_12_0 using mt_float tags ('-1.5e+3')
sql create table st_float_12_0 using mt_float tags ('-1.5e+3')
sql describe st_float_12_0
sql select tagname from st_float_12_0
if $data23 != -1500.000000 then
if $data00 != -1500.00000 then
print expect -1500.00000, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_13_0 using mt_float tags ('1.5e-3')
sql create table st_float_13_0 using mt_float tags ('1.5e-3')
sql describe st_float_13_0
sql select tagname from st_float_13_0
if $data23 != 0.001500 then
if $data00 != 0.00150 then
print expect 0.00150, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_14_0 using mt_float tags ('1.5E-3')
sql create table st_float_14_0 using mt_float tags ('1.5E-3')
sql describe st_float_14_0
sql select tagname from st_float_14_0
if $data23 != 0.001500 then
if $data00 != 0.00150 then
print expect 0.00150, actual: $data00
return -1
return -1
endi
endi
sql create table st_float_15_0 using mt_float tags (3.40282347e+38)
sql create table st_float_15_0 using mt_float tags (3.40282347e+38)
sql
describe
st_float_15_0
sql
select tagname from
st_float_15_0
#if $data
23
!= 0.001500 then
#if $data
00
!= 0.001500 then
# return -1
# return -1
#endi
#endi
sql create table st_float_16_0 using mt_float tags (-3.40282347e+38)
sql create table st_float_16_0 using mt_float tags (-3.40282347e+38)
sql
describe
st_float_16_0
sql
select tagname from
st_float_16_0
#if $data
23
!= 0.001500 then
#if $data
00
!= 0.001500 then
# return -1
# return -1
#endi
#endi
## case 01: insert values for test column values
## case 01: insert values for test column values
sql insert into st_float_0 values (now,
null
)
sql insert into st_float_0 values (now,
NULL
)
sql select * from st_float_0
sql select * from st_float_0
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_1 values (now, NULL)
sql insert into st_float_1 values (now, NULL)
...
@@ -157,15 +175,15 @@ sql select * from st_float_1
...
@@ -157,15 +175,15 @@ sql select * from st_float_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_2 values (now, '
null
')
sql insert into st_float_2 values (now, '
NULL
')
sql select * from st_float_2
sql select * from st_float_2
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_3 values (now, 'NULL')
sql insert into st_float_3 values (now, 'NULL')
...
@@ -173,15 +191,15 @@ sql select * from st_float_3
...
@@ -173,15 +191,15 @@ sql select * from st_float_3
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_4 values (now, "
null
")
sql insert into st_float_4 values (now, "
NULL
")
sql select * from st_float_4
sql select * from st_float_4
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_5 values (now, "NULL")
sql insert into st_float_5 values (now, "NULL")
...
@@ -189,7 +207,7 @@ sql select * from st_float_5
...
@@ -189,7 +207,7 @@ sql select * from st_float_5
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
...
@@ -270,64 +288,64 @@ endi
...
@@ -270,64 +288,64 @@ endi
#endi
#endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_float_16 using mt_float tags (
null) values (now, null
)
sql insert into st_float_16 using mt_float tags (
NULL) values (now, NULL
)
sql
describe
st_float_16
sql
select tagname from
st_float_16
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_16
sql select * from st_float_16
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_17 using mt_float tags (NULL) values (now, NULL)
sql insert into st_float_17 using mt_float tags (NULL) values (now, NULL)
sql
describe
st_float_17
sql
select tagname from
st_float_17
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_17
sql select * from st_float_17
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_18 using mt_float tags ('
null') values (now, 'null
')
sql insert into st_float_18 using mt_float tags ('
NULL') values (now, 'NULL
')
sql
describe
st_float_18
sql
select tagname from
st_float_18
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_18
sql select * from st_float_18
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_19 using mt_float tags ('NULL') values (now, 'NULL')
sql insert into st_float_19 using mt_float tags ('NULL') values (now, 'NULL')
sql
describe
st_float_19
sql
select tagname from
st_float_19
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_19
sql select * from st_float_19
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_20 using mt_float tags ("
null") values (now, "null
")
sql insert into st_float_20 using mt_float tags ("
NULL") values (now, "NULL
")
sql
describe
st_float_20
sql
select tagname from
st_float_20
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_20
sql select * from st_float_20
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_21 using mt_float tags ("NULL") values (now, "NULL")
sql insert into st_float_21 using mt_float tags ("NULL") values (now, "NULL")
sql
describe
st_float_21
sql
select tagname from
st_float_21
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_21
sql select * from st_float_21
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_float_22 using mt_float tags (127) values (now, 3.40282347e+38)
sql insert into st_float_22 using mt_float tags (127) values (now, 3.40282347e+38)
sql
describe
st_float_22
sql
select tagname from
st_float_22
#if $data
23
!= 127 then
#if $data
00
!= 127 then
# return -1
# return -1
#endi
#endi
sql select * from st_float_22
sql select * from st_float_22
...
@@ -335,8 +353,8 @@ sql select * from st_float_22
...
@@ -335,8 +353,8 @@ sql select * from st_float_22
# return -1
# return -1
#endi
#endi
sql insert into st_float_23 using mt_float tags (-127) values (now, -3.40282347e+38)
sql insert into st_float_23 using mt_float tags (-127) values (now, -3.40282347e+38)
sql
describe
st_float_23
sql
select tagname from
st_float_23
#if $data
23
!= -127 then
#if $data
00
!= -127 then
# return -1
# return -1
#endi
#endi
sql select * from st_float_23
sql select * from st_float_23
...
@@ -344,8 +362,8 @@ sql select * from st_float_23
...
@@ -344,8 +362,8 @@ sql select * from st_float_23
# return -1
# return -1
#endi
#endi
sql insert into st_float_24 using mt_float tags (10) values (now, 10)
sql insert into st_float_24 using mt_float tags (10) values (now, 10)
sql
describe
st_float_24
sql
select tagname from
st_float_24
#if $data
23
!= 10 then
#if $data
00
!= 10 then
# return -1
# return -1
#endi
#endi
sql select * from st_float_24
sql select * from st_float_24
...
@@ -353,8 +371,8 @@ sql select * from st_float_24
...
@@ -353,8 +371,8 @@ sql select * from st_float_24
# return -1
# return -1
#endi
#endi
sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0")
sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0")
sql
describe
st_float_25
sql
select tagname from
st_float_25
#if $data
23
!= 0 then
#if $data
00
!= 0 then
# return -1
# return -1
#endi
#endi
sql select * from st_float_25
sql select * from st_float_25
...
@@ -362,8 +380,8 @@ sql select * from st_float_25
...
@@ -362,8 +380,8 @@ sql select * from st_float_25
# return -1
# return -1
#endi
#endi
sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3')
sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3')
sql
describe
st_float_26
sql
select tagname from
st_float_26
#if $data
23
!= 123 then
#if $data
00
!= 123 then
# return -1
# return -1
#endi
#endi
sql select * from st_float_26
sql select * from st_float_26
...
@@ -371,8 +389,8 @@ sql select * from st_float_26
...
@@ -371,8 +389,8 @@ sql select * from st_float_26
# return -1
# return -1
#endi
#endi
sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6)
sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6)
sql
describe
st_float_27
sql
select tagname from
st_float_27
#if $data
23
!= 56 then
#if $data
00
!= 56 then
# return -1
# return -1
#endi
#endi
sql select * from st_float_27
sql select * from st_float_27
...
@@ -380,8 +398,8 @@ sql select * from st_float_27
...
@@ -380,8 +398,8 @@ sql select * from st_float_27
# return -1
# return -1
#endi
#endi
sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6)
sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6)
sql
describe
st_float_28
sql
select tagname from
st_float_28
#if $data
23
!= -56 then
#if $data
00
!= -56 then
# return -1
# return -1
#endi
#endi
sql select * from st_float_28
sql select * from st_float_28
...
@@ -389,47 +407,47 @@ sql select * from st_float_28
...
@@ -389,47 +407,47 @@ sql select * from st_float_28
# return -1
# return -1
#endi
#endi
## case 03: alter tag values
##
#
case 03: alter tag values
sql alter table st_float_0 set tag tagname=3.40282347e+38
#
sql alter table st_float_0 set tag tagname=3.40282347e+38
sql describe
st_float_0
#sql select tagname from
st_float_0
#
if $data23
!= 127 then
#
#if $data00
!= 127 then
# return -1
#
#
return -1
#
endi
#
#endi
sql alter table st_float_0 set tag tagname=-3.40282347e+38
#
sql alter table st_float_0 set tag tagname=-3.40282347e+38
sql describe
st_float_0
#sql select tagname from
st_float_0
#
if $data23
!= -127 then
#
#if $data00
!= -127 then
# return -1
#
#
return -1
#
endi
#
#endi
sql alter table st_float_0 set tag tagname=+10.340
#
sql alter table st_float_0 set tag tagname=+10.340
sql describe
st_float_0
#sql select tagname from
st_float_0
#
if $data23
!= 100 then
#
#if $data00
!= 100 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_float_0 set tag tagname=-33.87
#
sql alter table st_float_0 set tag tagname=-33.87
sql describe
st_float_0
#sql select tagname from
st_float_0
#
if $data23
!= -33 then
#
#if $data00
!= -33 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_float_0 set tag tagname='+9.8'
#
sql alter table st_float_0 set tag tagname='+9.8'
sql describe
st_float_0
#sql select tagname from
st_float_0
#
if $data23
!= 98 then
#
#if $data00
!= 98 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_float_0 set tag tagname='-07.6'
#
sql alter table st_float_0 set tag tagname='-07.6'
sql describe
st_float_0
#sql select tagname from
st_float_0
#
if $data23
!= -76 then
#
#if $data00
!= -76 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_float_0 set tag tagname=+0012.871
#
sql alter table st_float_0 set tag tagname=+0012.871
sql describe
st_float_0
#sql select tagname from
st_float_0
#
if $data23
!= 12 then
#
#if $data00
!= 12 then
# return -1
#
#
return -1
#endi
#
#
endi
sql alter table st_float_0 set tag tagname=-00063.582
#
sql alter table st_float_0 set tag tagname=-00063.582
sql describe
st_float_0
#sql select tagname from
st_float_0
#
if $data23
!= -63 then
#
#if $data00
!= -63 then
# return -1
#
#
return -1
#endi
#
#
endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_float_e0 using mt_float tags (3.50282347e+38)
sql_error create table st_float_e0 using mt_float tags (3.50282347e+38)
...
...
tests/script/general/parser/columnValue_int.sim
浏览文件 @
a0237aae
...
@@ -10,89 +10,89 @@ print ========== int
...
@@ -10,89 +10,89 @@ print ========== int
sql create table mt_int (ts timestamp, c int) tags (tagname int)
sql create table mt_int (ts timestamp, c int) tags (tagname int)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_int_0 using mt_int tags (
null
)
sql create table st_int_0 using mt_int tags (
NULL
)
sql
describe
st_int_0
sql
select tagname from
st_int_0
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_int_1 using mt_int tags (NULL)
sql create table st_int_1 using mt_int tags (NULL)
sql
describe
st_int_1
sql
select tagname from
st_int_1
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_int_2 using mt_int tags ('
null
')
sql create table st_int_2 using mt_int tags ('
NULL
')
sql
describe
st_int_2
sql
select tagname from
st_int_2
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_int_3 using mt_int tags ('NULL')
sql create table st_int_3 using mt_int tags ('NULL')
sql
describe
st_int_3
sql
select tagname from
st_int_3
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_int_4 using mt_int tags ("
null
")
sql create table st_int_4 using mt_int tags ("
NULL
")
sql
describe
st_int_4
sql
select tagname from
st_int_4
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_int_5 using mt_int tags ("NULL")
sql create table st_int_5 using mt_int tags ("NULL")
sql
describe
st_int_5
sql
select tagname from
st_int_5
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_int_6 using mt_int tags (-2147483647)
sql create table st_int_6 using mt_int tags (-2147483647)
sql
describe
st_int_6
sql
select tagname from
st_int_6
if $data
23
!= -2147483647 then
if $data
00
!= -2147483647 then
return -1
return -1
endi
endi
sql create table st_int_7 using mt_int tags (2147483647)
sql create table st_int_7 using mt_int tags (2147483647)
sql
describe
st_int_7
sql
select tagname from
st_int_7
if $data
23
!= 2147483647 then
if $data
00
!= 2147483647 then
return -1
return -1
endi
endi
sql create table st_int_8 using mt_int tags (37)
sql create table st_int_8 using mt_int tags (37)
sql
describe
st_int_8
sql
select tagname from
st_int_8
if $data
23
!= 37 then
if $data
00
!= 37 then
return -1
return -1
endi
endi
sql create table st_int_9 using mt_int tags (-100)
sql create table st_int_9 using mt_int tags (-100)
sql
describe
st_int_9
sql
select tagname from
st_int_9
if $data
23
!= -100 then
if $data
00
!= -100 then
return -1
return -1
endi
endi
sql create table st_int_10 using mt_int tags (+113)
sql create table st_int_10 using mt_int tags (+113)
sql
describe
st_int_10
sql
select tagname from
st_int_10
if $data
23
!= 113 then
if $data
00
!= 113 then
return -1
return -1
endi
endi
sql create table st_int_11 using mt_int tags ('-100')
sql create table st_int_11 using mt_int tags ('-100')
sql
describe
st_int_11
sql
select tagname from
st_int_11
if $data
23
!= -100 then
if $data
00
!= -100 then
return -1
return -1
endi
endi
sql create table st_int_12 using mt_int tags ("+78")
sql create table st_int_12 using mt_int tags ("+78")
sql
describe
st_int_12
sql
select tagname from
st_int_12
if $data
23
!= 78 then
if $data
00
!= 78 then
return -1
return -1
endi
endi
sql create table st_int_13 using mt_int tags (+0078)
sql create table st_int_13 using mt_int tags (+0078)
sql
describe
st_int_13
sql
select tagname from
st_int_13
if $data
23
!= 78 then
if $data
00
!= 78 then
return -1
return -1
endi
endi
sql create table st_int_14 using mt_int tags (-00078)
sql create table st_int_14 using mt_int tags (-00078)
sql
describe
st_int_14
sql
select tagname from
st_int_14
if $data
23
!= -78 then
if $data
00
!= -78 then
return -1
return -1
endi
endi
## case 01: insert values for test column values
## case 01: insert values for test column values
sql insert into st_int_0 values (now,
null
)
sql insert into st_int_0 values (now,
NULL
)
sql select * from st_int_0
sql select * from st_int_0
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_1 values (now, NULL)
sql insert into st_int_1 values (now, NULL)
...
@@ -100,15 +100,15 @@ sql select * from st_int_1
...
@@ -100,15 +100,15 @@ sql select * from st_int_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_2 values (now, '
null
')
sql insert into st_int_2 values (now, '
NULL
')
sql select * from st_int_2
sql select * from st_int_2
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_3 values (now, 'NULL')
sql insert into st_int_3 values (now, 'NULL')
...
@@ -116,15 +116,15 @@ sql select * from st_int_3
...
@@ -116,15 +116,15 @@ sql select * from st_int_3
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_4 values (now, "
null
")
sql insert into st_int_4 values (now, "
NULL
")
sql select * from st_int_4
sql select * from st_int_4
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_5 values (now, "NULL")
sql insert into st_int_5 values (now, "NULL")
...
@@ -132,7 +132,7 @@ sql select * from st_int_5
...
@@ -132,7 +132,7 @@ sql select * from st_int_5
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_6 values (now, 2147483647)
sql insert into st_int_6 values (now, 2147483647)
...
@@ -211,64 +211,64 @@ if $data01 != -56 then
...
@@ -211,64 +211,64 @@ if $data01 != -56 then
endi
endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_int_16 using mt_int tags (
null) values (now, null
)
sql insert into st_int_16 using mt_int tags (
NULL) values (now, NULL
)
sql
describe
st_int_16
sql
select tagname from
st_int_16
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_16
sql select * from st_int_16
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_17 using mt_int tags (NULL) values (now, NULL)
sql insert into st_int_17 using mt_int tags (NULL) values (now, NULL)
sql
describe
st_int_17
sql
select tagname from
st_int_17
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_17
sql select * from st_int_17
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_18 using mt_int tags ('
null') values (now, 'null
')
sql insert into st_int_18 using mt_int tags ('
NULL') values (now, 'NULL
')
sql
describe
st_int_18
sql
select tagname from
st_int_18
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_18
sql select * from st_int_18
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_19 using mt_int tags ('NULL') values (now, 'NULL')
sql insert into st_int_19 using mt_int tags ('NULL') values (now, 'NULL')
sql
describe
st_int_19
sql
select tagname from
st_int_19
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_19
sql select * from st_int_19
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_20 using mt_int tags ("
null") values (now, "null
")
sql insert into st_int_20 using mt_int tags ("
NULL") values (now, "NULL
")
sql
describe
st_int_20
sql
select tagname from
st_int_20
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_20
sql select * from st_int_20
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_21 using mt_int tags ("NULL") values (now, "NULL")
sql insert into st_int_21 using mt_int tags ("NULL") values (now, "NULL")
sql
describe
st_int_21
sql
select tagname from
st_int_21
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_21
sql select * from st_int_21
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_int_22 using mt_int tags (2147483647) values (now, 2147483647)
sql insert into st_int_22 using mt_int tags (2147483647) values (now, 2147483647)
sql
describe
st_int_22
sql
select tagname from
st_int_22
if $data
23
!= 2147483647 then
if $data
00
!= 2147483647 then
return -1
return -1
endi
endi
sql select * from st_int_22
sql select * from st_int_22
...
@@ -276,8 +276,8 @@ if $data01 != 2147483647 then
...
@@ -276,8 +276,8 @@ if $data01 != 2147483647 then
return -1
return -1
endi
endi
sql insert into st_int_23 using mt_int tags (-2147483647) values (now, -2147483647)
sql insert into st_int_23 using mt_int tags (-2147483647) values (now, -2147483647)
sql
describe
st_int_23
sql
select tagname from
st_int_23
if $data
23
!= -2147483647 then
if $data
00
!= -2147483647 then
return -1
return -1
endi
endi
sql select * from st_int_23
sql select * from st_int_23
...
@@ -285,8 +285,8 @@ if $data01 != -2147483647 then
...
@@ -285,8 +285,8 @@ if $data01 != -2147483647 then
return -1
return -1
endi
endi
sql insert into st_int_24 using mt_int tags (10) values (now, 10)
sql insert into st_int_24 using mt_int tags (10) values (now, 10)
sql
describe
st_int_24
sql
select tagname from
st_int_24
if $data
23
!= 10 then
if $data
00
!= 10 then
return -1
return -1
endi
endi
sql select * from st_int_24
sql select * from st_int_24
...
@@ -294,8 +294,8 @@ if $data01 != 10 then
...
@@ -294,8 +294,8 @@ if $data01 != 10 then
return -1
return -1
endi
endi
sql insert into st_int_25 using mt_int tags ("-0") values (now, "-0")
sql insert into st_int_25 using mt_int tags ("-0") values (now, "-0")
sql
describe
st_int_25
sql
select tagname from
st_int_25
if $data
23
!= 0 then
if $data
00
!= 0 then
return -1
return -1
endi
endi
sql select * from st_int_25
sql select * from st_int_25
...
@@ -303,8 +303,8 @@ if $data01 != 0 then
...
@@ -303,8 +303,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_int_26 using mt_int tags ('123') values (now, '123')
sql insert into st_int_26 using mt_int tags ('123') values (now, '123')
sql
describe
st_int_26
sql
select tagname from
st_int_26
if $data
23
!= 123 then
if $data
00
!= 123 then
return -1
return -1
endi
endi
sql select * from st_int_26
sql select * from st_int_26
...
@@ -312,8 +312,8 @@ if $data01 != 123 then
...
@@ -312,8 +312,8 @@ if $data01 != 123 then
return -1
return -1
endi
endi
sql insert into st_int_27 using mt_int tags (+056) values (now, +00056)
sql insert into st_int_27 using mt_int tags (+056) values (now, +00056)
sql
describe
st_int_27
sql
select tagname from
st_int_27
if $data
23
!= 56 then
if $data
00
!= 56 then
return -1
return -1
endi
endi
sql select * from st_int_27
sql select * from st_int_27
...
@@ -321,8 +321,8 @@ if $data01 != 56 then
...
@@ -321,8 +321,8 @@ if $data01 != 56 then
return -1
return -1
endi
endi
sql insert into st_int_28 using mt_int tags (-056) values (now, -0056)
sql insert into st_int_28 using mt_int tags (-056) values (now, -0056)
sql
describe
st_int_28
sql
select tagname from
st_int_28
if $data
23
!= -56 then
if $data
00
!= -56 then
return -1
return -1
endi
endi
sql select * from st_int_28
sql select * from st_int_28
...
@@ -330,47 +330,47 @@ if $data01 != -56 then
...
@@ -330,47 +330,47 @@ if $data01 != -56 then
return -1
return -1
endi
endi
## case 03: alter tag values
##
#
case 03: alter tag values
sql alter table st_int_0 set tag tagname=2147483647
#
sql alter table st_int_0 set tag tagname=2147483647
sql describe
st_int_0
#sql select tagname from
st_int_0
if $data23
!= 2147483647 then
#if $data00
!= 2147483647 then
return -1
#
return -1
endi
#endi
sql alter table st_int_0 set tag tagname=-2147483647
#
sql alter table st_int_0 set tag tagname=-2147483647
sql describe
st_int_0
#sql select tagname from
st_int_0
if $data23
!= -2147483647 then
#if $data00
!= -2147483647 then
return -1
#
return -1
endi
#endi
sql alter table st_int_0 set tag tagname=+100
#
sql alter table st_int_0 set tag tagname=+100
sql describe
st_int_0
#sql select tagname from
st_int_0
if $data23
!= 100 then
#if $data00
!= 100 then
return -1
#
return -1
endi
#
endi
sql alter table st_int_0 set tag tagname=-33
#
sql alter table st_int_0 set tag tagname=-33
sql describe
st_int_0
#sql select tagname from
st_int_0
if $data23
!= -33 then
#if $data00
!= -33 then
return -1
#
return -1
endi
#
endi
sql alter table st_int_0 set tag tagname='+98'
#
sql alter table st_int_0 set tag tagname='+98'
sql describe
st_int_0
#sql select tagname from
st_int_0
if $data23
!= 98 then
#if $data00
!= 98 then
return -1
#
return -1
endi
#
endi
sql alter table st_int_0 set tag tagname='-076'
#
sql alter table st_int_0 set tag tagname='-076'
sql describe
st_int_0
#sql select tagname from
st_int_0
if $data23
!= -76 then
#if $data00
!= -76 then
return -1
#
return -1
endi
#
endi
sql alter table st_int_0 set tag tagname=+0012
#
sql alter table st_int_0 set tag tagname=+0012
sql describe
st_int_0
#sql select tagname from
st_int_0
if $data23
!= 12 then
#if $data00
!= 12 then
return -1
#
return -1
endi
#
endi
sql alter table st_int_0 set tag tagname=-00063
#
sql alter table st_int_0 set tag tagname=-00063
sql describe
st_int_0
#sql select tagname from
st_int_0
if $data23
!= -63 then
#if $data00
!= -63 then
return -1
#
return -1
endi
#
endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_int_e0 using mt_int tags (2147483648)
sql_error create table st_int_e0 using mt_int tags (2147483648)
...
...
tests/script/general/parser/columnValue_smallint.sim
浏览文件 @
a0237aae
...
@@ -10,89 +10,89 @@ print ========== smallint
...
@@ -10,89 +10,89 @@ print ========== smallint
sql create table mt_smallint (ts timestamp, c smallint) tags (tagname smallint)
sql create table mt_smallint (ts timestamp, c smallint) tags (tagname smallint)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_smallint_0 using mt_smallint tags (
null
)
sql create table st_smallint_0 using mt_smallint tags (
NULL
)
sql
describe
st_smallint_0
sql
select tagname from
st_smallint_0
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_smallint_1 using mt_smallint tags (NULL)
sql create table st_smallint_1 using mt_smallint tags (NULL)
sql
describe
st_smallint_1
sql
select tagname from
st_smallint_1
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_smallint_2 using mt_smallint tags ('
null
')
sql create table st_smallint_2 using mt_smallint tags ('
NULL
')
sql
describe
st_smallint_2
sql
select tagname from
st_smallint_2
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_smallint_3 using mt_smallint tags ('NULL')
sql create table st_smallint_3 using mt_smallint tags ('NULL')
sql
describe
st_smallint_3
sql
select tagname from
st_smallint_3
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_smallint_4 using mt_smallint tags ("
null
")
sql create table st_smallint_4 using mt_smallint tags ("
NULL
")
sql
describe
st_smallint_4
sql
select tagname from
st_smallint_4
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_smallint_5 using mt_smallint tags ("NULL")
sql create table st_smallint_5 using mt_smallint tags ("NULL")
sql
describe
st_smallint_5
sql
select tagname from
st_smallint_5
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_smallint_6 using mt_smallint tags (-32767)
sql create table st_smallint_6 using mt_smallint tags (-32767)
sql
describe
st_smallint_6
sql
select tagname from
st_smallint_6
if $data
23
!= -32767 then
if $data
00
!= -32767 then
return -1
return -1
endi
endi
sql create table st_smallint_7 using mt_smallint tags (32767)
sql create table st_smallint_7 using mt_smallint tags (32767)
sql
describe
st_smallint_7
sql
select tagname from
st_smallint_7
if $data
23
!= 32767 then
if $data
00
!= 32767 then
return -1
return -1
endi
endi
sql create table st_smallint_8 using mt_smallint tags (37)
sql create table st_smallint_8 using mt_smallint tags (37)
sql
describe
st_smallint_8
sql
select tagname from
st_smallint_8
if $data
23
!= 37 then
if $data
00
!= 37 then
return -1
return -1
endi
endi
sql create table st_smallint_9 using mt_smallint tags (-100)
sql create table st_smallint_9 using mt_smallint tags (-100)
sql
describe
st_smallint_9
sql
select tagname from
st_smallint_9
if $data
23
!= -100 then
if $data
00
!= -100 then
return -1
return -1
endi
endi
sql create table st_smallint_10 using mt_smallint tags (+113)
sql create table st_smallint_10 using mt_smallint tags (+113)
sql
describe
st_smallint_10
sql
select tagname from
st_smallint_10
if $data
23
!= 113 then
if $data
00
!= 113 then
return -1
return -1
endi
endi
sql create table st_smallint_11 using mt_smallint tags ('-100')
sql create table st_smallint_11 using mt_smallint tags ('-100')
sql
describe
st_smallint_11
sql
select tagname from
st_smallint_11
if $data
23
!= -100 then
if $data
00
!= -100 then
return -1
return -1
endi
endi
sql create table st_smallint_12 using mt_smallint tags ("+78")
sql create table st_smallint_12 using mt_smallint tags ("+78")
sql
describe
st_smallint_12
sql
select tagname from
st_smallint_12
if $data
23
!= 78 then
if $data
00
!= 78 then
return -1
return -1
endi
endi
sql create table st_smallint_13 using mt_smallint tags (+0078)
sql create table st_smallint_13 using mt_smallint tags (+0078)
sql
describe
st_smallint_13
sql
select tagname from
st_smallint_13
if $data
23
!= 78 then
if $data
00
!= 78 then
return -1
return -1
endi
endi
sql create table st_smallint_14 using mt_smallint tags (-00078)
sql create table st_smallint_14 using mt_smallint tags (-00078)
sql
describe
st_smallint_14
sql
select tagname from
st_smallint_14
if $data
23
!= -78 then
if $data
00
!= -78 then
return -1
return -1
endi
endi
## case 01: insert values for test column values
## case 01: insert values for test column values
sql insert into st_smallint_0 values (now,
null
)
sql insert into st_smallint_0 values (now,
NULL
)
sql select * from st_smallint_0
sql select * from st_smallint_0
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_1 values (now, NULL)
sql insert into st_smallint_1 values (now, NULL)
...
@@ -100,15 +100,15 @@ sql select * from st_smallint_1
...
@@ -100,15 +100,15 @@ sql select * from st_smallint_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_2 values (now, '
null
')
sql insert into st_smallint_2 values (now, '
NULL
')
sql select * from st_smallint_2
sql select * from st_smallint_2
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_3 values (now, 'NULL')
sql insert into st_smallint_3 values (now, 'NULL')
...
@@ -116,15 +116,15 @@ sql select * from st_smallint_3
...
@@ -116,15 +116,15 @@ sql select * from st_smallint_3
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_4 values (now, "
null
")
sql insert into st_smallint_4 values (now, "
NULL
")
sql select * from st_smallint_4
sql select * from st_smallint_4
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_5 values (now, "NULL")
sql insert into st_smallint_5 values (now, "NULL")
...
@@ -132,7 +132,7 @@ sql select * from st_smallint_5
...
@@ -132,7 +132,7 @@ sql select * from st_smallint_5
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_6 values (now, 32767)
sql insert into st_smallint_6 values (now, 32767)
...
@@ -211,64 +211,64 @@ if $data01 != -56 then
...
@@ -211,64 +211,64 @@ if $data01 != -56 then
endi
endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_smallint_16 using mt_smallint tags (
null) values (now, null
)
sql insert into st_smallint_16 using mt_smallint tags (
NULL) values (now, NULL
)
sql
describe
st_smallint_16
sql
select tagname from
st_smallint_16
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_16
sql select * from st_smallint_16
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_17 using mt_smallint tags (NULL) values (now, NULL)
sql insert into st_smallint_17 using mt_smallint tags (NULL) values (now, NULL)
sql
describe
st_smallint_17
sql
select tagname from
st_smallint_17
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_17
sql select * from st_smallint_17
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_18 using mt_smallint tags ('
null') values (now, 'null
')
sql insert into st_smallint_18 using mt_smallint tags ('
NULL') values (now, 'NULL
')
sql
describe
st_smallint_18
sql
select tagname from
st_smallint_18
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_18
sql select * from st_smallint_18
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_19 using mt_smallint tags ('NULL') values (now, 'NULL')
sql insert into st_smallint_19 using mt_smallint tags ('NULL') values (now, 'NULL')
sql
describe
st_smallint_19
sql
select tagname from
st_smallint_19
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_19
sql select * from st_smallint_19
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_20 using mt_smallint tags ("
null") values (now, "null
")
sql insert into st_smallint_20 using mt_smallint tags ("
NULL") values (now, "NULL
")
sql
describe
st_smallint_20
sql
select tagname from
st_smallint_20
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_20
sql select * from st_smallint_20
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_21 using mt_smallint tags ("NULL") values (now, "NULL")
sql insert into st_smallint_21 using mt_smallint tags ("NULL") values (now, "NULL")
sql
describe
st_smallint_21
sql
select tagname from
st_smallint_21
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_21
sql select * from st_smallint_21
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_smallint_22 using mt_smallint tags (32767) values (now, 32767)
sql insert into st_smallint_22 using mt_smallint tags (32767) values (now, 32767)
sql
describe
st_smallint_22
sql
select tagname from
st_smallint_22
if $data
23
!= 32767 then
if $data
00
!= 32767 then
return -1
return -1
endi
endi
sql select * from st_smallint_22
sql select * from st_smallint_22
...
@@ -276,8 +276,8 @@ if $data01 != 32767 then
...
@@ -276,8 +276,8 @@ if $data01 != 32767 then
return -1
return -1
endi
endi
sql insert into st_smallint_23 using mt_smallint tags (-32767) values (now, -32767)
sql insert into st_smallint_23 using mt_smallint tags (-32767) values (now, -32767)
sql
describe
st_smallint_23
sql
select tagname from
st_smallint_23
if $data
23
!= -32767 then
if $data
00
!= -32767 then
return -1
return -1
endi
endi
sql select * from st_smallint_23
sql select * from st_smallint_23
...
@@ -285,8 +285,8 @@ if $data01 != -32767 then
...
@@ -285,8 +285,8 @@ if $data01 != -32767 then
return -1
return -1
endi
endi
sql insert into st_smallint_24 using mt_smallint tags (10) values (now, 10)
sql insert into st_smallint_24 using mt_smallint tags (10) values (now, 10)
sql
describe
st_smallint_24
sql
select tagname from
st_smallint_24
if $data
23
!= 10 then
if $data
00
!= 10 then
return -1
return -1
endi
endi
sql select * from st_smallint_24
sql select * from st_smallint_24
...
@@ -294,8 +294,8 @@ if $data01 != 10 then
...
@@ -294,8 +294,8 @@ if $data01 != 10 then
return -1
return -1
endi
endi
sql insert into st_smallint_25 using mt_smallint tags ("-0") values (now, "-0")
sql insert into st_smallint_25 using mt_smallint tags ("-0") values (now, "-0")
sql
describe
st_smallint_25
sql
select tagname from
st_smallint_25
if $data
23
!= 0 then
if $data
00
!= 0 then
return -1
return -1
endi
endi
sql select * from st_smallint_25
sql select * from st_smallint_25
...
@@ -303,8 +303,8 @@ if $data01 != 0 then
...
@@ -303,8 +303,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_smallint_26 using mt_smallint tags ('123') values (now, '123')
sql insert into st_smallint_26 using mt_smallint tags ('123') values (now, '123')
sql
describe
st_smallint_26
sql
select tagname from
st_smallint_26
if $data
23
!= 123 then
if $data
00
!= 123 then
return -1
return -1
endi
endi
sql select * from st_smallint_26
sql select * from st_smallint_26
...
@@ -312,8 +312,8 @@ if $data01 != 123 then
...
@@ -312,8 +312,8 @@ if $data01 != 123 then
return -1
return -1
endi
endi
sql insert into st_smallint_27 using mt_smallint tags (+056) values (now, +00056)
sql insert into st_smallint_27 using mt_smallint tags (+056) values (now, +00056)
sql
describe
st_smallint_27
sql
select tagname from
st_smallint_27
if $data
23
!= 56 then
if $data
00
!= 56 then
return -1
return -1
endi
endi
sql select * from st_smallint_27
sql select * from st_smallint_27
...
@@ -321,8 +321,8 @@ if $data01 != 56 then
...
@@ -321,8 +321,8 @@ if $data01 != 56 then
return -1
return -1
endi
endi
sql insert into st_smallint_28 using mt_smallint tags (-056) values (now, -0056)
sql insert into st_smallint_28 using mt_smallint tags (-056) values (now, -0056)
sql
describe
st_smallint_28
sql
select tagname from
st_smallint_28
if $data
23
!= -56 then
if $data
00
!= -56 then
return -1
return -1
endi
endi
sql select * from st_smallint_28
sql select * from st_smallint_28
...
@@ -331,46 +331,46 @@ if $data01 != -56 then
...
@@ -331,46 +331,46 @@ if $data01 != -56 then
endi
endi
## case 03: alter tag values
## case 03: alter tag values
sql alter table st_smallint_0 set tag tagname=32767
#
sql alter table st_smallint_0 set tag tagname=32767
sql describe
st_smallint_0
#sql select tagname from
st_smallint_0
if $data23
!= 32767 then
#if $data00
!= 32767 then
return -1
#
return -1
endi
#endi
sql alter table st_smallint_0 set tag tagname=-32767
#
sql alter table st_smallint_0 set tag tagname=-32767
sql describe
st_smallint_0
#sql select tagname from
st_smallint_0
if $data23
!= -32767 then
#if $data00
!= -32767 then
return -1
#
return -1
endi
#endi
sql alter table st_smallint_0 set tag tagname=+100
#
sql alter table st_smallint_0 set tag tagname=+100
sql describe
st_smallint_0
#sql select tagname from
st_smallint_0
if $data23
!= 100 then
#if $data00
!= 100 then
return -1
#
return -1
endi
#
endi
sql alter table st_smallint_0 set tag tagname=-33
#
sql alter table st_smallint_0 set tag tagname=-33
sql describe
st_smallint_0
#sql select tagname from
st_smallint_0
if $data23
!= -33 then
#if $data00
!= -33 then
return -1
#
return -1
endi
#
endi
sql alter table st_smallint_0 set tag tagname='+98'
#
sql alter table st_smallint_0 set tag tagname='+98'
sql describe
st_smallint_0
#sql select tagname from
st_smallint_0
if $data23
!= 98 then
#if $data00
!= 98 then
return -1
#
return -1
endi
#
endi
sql alter table st_smallint_0 set tag tagname='-076'
#
sql alter table st_smallint_0 set tag tagname='-076'
sql describe
st_smallint_0
#sql select tagname from
st_smallint_0
if $data23
!= -76 then
#if $data00
!= -76 then
return -1
#
return -1
endi
#
endi
sql alter table st_smallint_0 set tag tagname=+0012
#
sql alter table st_smallint_0 set tag tagname=+0012
sql describe
st_smallint_0
#sql select tagname from
st_smallint_0
if $data23
!= 12 then
#if $data00
!= 12 then
return -1
#
return -1
endi
#
endi
sql alter table st_smallint_0 set tag tagname=-00063
#
sql alter table st_smallint_0 set tag tagname=-00063
sql describe
st_smallint_0
#sql select tagname from
st_smallint_0
if $data23
!= -63 then
#if $data00
!= -63 then
return -1
#
return -1
endi
#
endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_smallint_e0 using mt_smallint tags (32768)
sql_error create table st_smallint_e0 using mt_smallint tags (32768)
...
...
tests/script/general/parser/columnValue_tinyint.sim
浏览文件 @
a0237aae
...
@@ -10,89 +10,90 @@ print ========== tinyint
...
@@ -10,89 +10,90 @@ print ========== tinyint
sql create table mt_tinyint (ts timestamp, c tinyint) tags (tagname tinyint)
sql create table mt_tinyint (ts timestamp, c tinyint) tags (tagname tinyint)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_tinyint_0 using mt_tinyint tags (null)
sql create table st_tinyint_0 using mt_tinyint tags (NULL)
sql describe st_tinyint_0
sql select tagname from st_tinyint_0
if $data23 != NULL then
if $data00 != NULL then
print expect NULL, actually: $data00
return -1
return -1
endi
endi
sql create table st_tinyint_1 using mt_tinyint tags (NULL)
sql create table st_tinyint_1 using mt_tinyint tags (NULL)
sql
describe
st_tinyint_1
sql
select tagname from
st_tinyint_1
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_tinyint_2 using mt_tinyint tags ('
null
')
sql create table st_tinyint_2 using mt_tinyint tags ('
NULL
')
sql
describe
st_tinyint_2
sql
select tagname from
st_tinyint_2
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_tinyint_3 using mt_tinyint tags ('NULL')
sql create table st_tinyint_3 using mt_tinyint tags ('NULL')
sql
describe
st_tinyint_3
sql
select tagname from
st_tinyint_3
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_tinyint_4 using mt_tinyint tags ("
null
")
sql create table st_tinyint_4 using mt_tinyint tags ("
NULL
")
sql
describe
st_tinyint_4
sql
select tagname from
st_tinyint_4
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_tinyint_5 using mt_tinyint tags ("NULL")
sql create table st_tinyint_5 using mt_tinyint tags ("NULL")
sql
describe
st_tinyint_5
sql
select tagname from
st_tinyint_5
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql create table st_tinyint_6 using mt_tinyint tags (-127)
sql create table st_tinyint_6 using mt_tinyint tags (-127)
sql
describe
st_tinyint_6
sql
select tagname from
st_tinyint_6
if $data
23
!= -127 then
if $data
00
!= -127 then
return -1
return -1
endi
endi
sql create table st_tinyint_7 using mt_tinyint tags (127)
sql create table st_tinyint_7 using mt_tinyint tags (127)
sql
describe
st_tinyint_7
sql
select tagname from
st_tinyint_7
if $data
23
!= 127 then
if $data
00
!= 127 then
return -1
return -1
endi
endi
sql create table st_tinyint_8 using mt_tinyint tags (37)
sql create table st_tinyint_8 using mt_tinyint tags (37)
sql
describe
st_tinyint_8
sql
select tagname from
st_tinyint_8
if $data
23
!= 37 then
if $data
00
!= 37 then
return -1
return -1
endi
endi
sql create table st_tinyint_9 using mt_tinyint tags (-100)
sql create table st_tinyint_9 using mt_tinyint tags (-100)
sql
describe
st_tinyint_9
sql
select tagname from
st_tinyint_9
if $data
23
!= -100 then
if $data
00
!= -100 then
return -1
return -1
endi
endi
sql create table st_tinyint_10 using mt_tinyint tags (+113)
sql create table st_tinyint_10 using mt_tinyint tags (+113)
sql
describe
st_tinyint_10
sql
select tagname from
st_tinyint_10
if $data
23
!= 113 then
if $data
00
!= 113 then
return -1
return -1
endi
endi
sql create table st_tinyint_11 using mt_tinyint tags ('-100')
sql create table st_tinyint_11 using mt_tinyint tags ('-100')
sql
describe
st_tinyint_11
sql
select tagname from
st_tinyint_11
if $data
23
!= -100 then
if $data
00
!= -100 then
return -1
return -1
endi
endi
sql create table st_tinyint_12 using mt_tinyint tags ("+78")
sql create table st_tinyint_12 using mt_tinyint tags ("+78")
sql
describe
st_tinyint_12
sql
select tagname from
st_tinyint_12
if $data
23
!= 78 then
if $data
00
!= 78 then
return -1
return -1
endi
endi
sql create table st_tinyint_13 using mt_tinyint tags (+0078)
sql create table st_tinyint_13 using mt_tinyint tags (+0078)
sql
describe
st_tinyint_13
sql
select tagname from
st_tinyint_13
if $data
23
!= 78 then
if $data
00
!= 78 then
return -1
return -1
endi
endi
sql create table st_tinyint_14 using mt_tinyint tags (-00078)
sql create table st_tinyint_14 using mt_tinyint tags (-00078)
sql
describe
st_tinyint_14
sql
select tagname from
st_tinyint_14
if $data
23
!= -78 then
if $data
00
!= -78 then
return -1
return -1
endi
endi
## case 01: insert values for test column values
## case 01: insert values for test column values
sql insert into st_tinyint_0 values (now,
null
)
sql insert into st_tinyint_0 values (now,
NULL
)
sql select * from st_tinyint_0
sql select * from st_tinyint_0
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_1 values (now, NULL)
sql insert into st_tinyint_1 values (now, NULL)
...
@@ -100,15 +101,15 @@ sql select * from st_tinyint_1
...
@@ -100,15 +101,15 @@ sql select * from st_tinyint_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_2 values (now, '
null
')
sql insert into st_tinyint_2 values (now, '
NULL
')
sql select * from st_tinyint_2
sql select * from st_tinyint_2
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_3 values (now, 'NULL')
sql insert into st_tinyint_3 values (now, 'NULL')
...
@@ -116,15 +117,15 @@ sql select * from st_tinyint_3
...
@@ -116,15 +117,15 @@ sql select * from st_tinyint_3
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_4 values (now, "
null
")
sql insert into st_tinyint_4 values (now, "
NULL
")
sql select * from st_tinyint_4
sql select * from st_tinyint_4
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_5 values (now, "NULL")
sql insert into st_tinyint_5 values (now, "NULL")
...
@@ -132,7 +133,7 @@ sql select * from st_tinyint_5
...
@@ -132,7 +133,7 @@ sql select * from st_tinyint_5
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_6 values (now, 127)
sql insert into st_tinyint_6 values (now, 127)
...
@@ -211,64 +212,64 @@ if $data01 != -56 then
...
@@ -211,64 +212,64 @@ if $data01 != -56 then
endi
endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_tinyint_16 using mt_tinyint tags (
null) values (now, null
)
sql insert into st_tinyint_16 using mt_tinyint tags (
NULL) values (now, NULL
)
sql
describe
st_tinyint_16
sql
select tagname from
st_tinyint_16
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_16
sql select * from st_tinyint_16
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_17 using mt_tinyint tags (NULL) values (now, NULL)
sql insert into st_tinyint_17 using mt_tinyint tags (NULL) values (now, NULL)
sql
describe
st_tinyint_17
sql
select tagname from
st_tinyint_17
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_17
sql select * from st_tinyint_17
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_18 using mt_tinyint tags ('
null') values (now, 'null
')
sql insert into st_tinyint_18 using mt_tinyint tags ('
NULL') values (now, 'NULL
')
sql
describe
st_tinyint_18
sql
select tagname from
st_tinyint_18
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_18
sql select * from st_tinyint_18
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_19 using mt_tinyint tags ('NULL') values (now, 'NULL')
sql insert into st_tinyint_19 using mt_tinyint tags ('NULL') values (now, 'NULL')
sql
describe
st_tinyint_19
sql
select tagname from
st_tinyint_19
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_19
sql select * from st_tinyint_19
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_20 using mt_tinyint tags ("
null") values (now, "null
")
sql insert into st_tinyint_20 using mt_tinyint tags ("
NULL") values (now, "NULL
")
sql
describe
st_tinyint_20
sql
select tagname from
st_tinyint_20
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_20
sql select * from st_tinyint_20
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_21 using mt_tinyint tags ("NULL") values (now, "NULL")
sql insert into st_tinyint_21 using mt_tinyint tags ("NULL") values (now, "NULL")
sql
describe
st_tinyint_21
sql
select tagname from
st_tinyint_21
if $data
23
!= NULL then
if $data
00
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_21
sql select * from st_tinyint_21
if $data01 !=
null
then
if $data01 !=
NULL
then
return -1
return -1
endi
endi
sql insert into st_tinyint_22 using mt_tinyint tags (127) values (now, 127)
sql insert into st_tinyint_22 using mt_tinyint tags (127) values (now, 127)
sql
describe
st_tinyint_22
sql
select tagname from
st_tinyint_22
if $data
23
!= 127 then
if $data
00
!= 127 then
return -1
return -1
endi
endi
sql select * from st_tinyint_22
sql select * from st_tinyint_22
...
@@ -276,8 +277,8 @@ if $data01 != 127 then
...
@@ -276,8 +277,8 @@ if $data01 != 127 then
return -1
return -1
endi
endi
sql insert into st_tinyint_23 using mt_tinyint tags (-127) values (now, -127)
sql insert into st_tinyint_23 using mt_tinyint tags (-127) values (now, -127)
sql
describe
st_tinyint_23
sql
select tagname from
st_tinyint_23
if $data
23
!= -127 then
if $data
00
!= -127 then
return -1
return -1
endi
endi
sql select * from st_tinyint_23
sql select * from st_tinyint_23
...
@@ -285,8 +286,8 @@ if $data01 != -127 then
...
@@ -285,8 +286,8 @@ if $data01 != -127 then
return -1
return -1
endi
endi
sql insert into st_tinyint_24 using mt_tinyint tags (10) values (now, 10)
sql insert into st_tinyint_24 using mt_tinyint tags (10) values (now, 10)
sql
describe
st_tinyint_24
sql
select tagname from
st_tinyint_24
if $data
23
!= 10 then
if $data
00
!= 10 then
return -1
return -1
endi
endi
sql select * from st_tinyint_24
sql select * from st_tinyint_24
...
@@ -294,8 +295,8 @@ if $data01 != 10 then
...
@@ -294,8 +295,8 @@ if $data01 != 10 then
return -1
return -1
endi
endi
sql insert into st_tinyint_25 using mt_tinyint tags ("-0") values (now, "-0")
sql insert into st_tinyint_25 using mt_tinyint tags ("-0") values (now, "-0")
sql
describe
st_tinyint_25
sql
select tagname from
st_tinyint_25
if $data
23
!= 0 then
if $data
00
!= 0 then
return -1
return -1
endi
endi
sql select * from st_tinyint_25
sql select * from st_tinyint_25
...
@@ -303,8 +304,8 @@ if $data01 != 0 then
...
@@ -303,8 +304,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_tinyint_26 using mt_tinyint tags ('123') values (now, '123')
sql insert into st_tinyint_26 using mt_tinyint tags ('123') values (now, '123')
sql
describe
st_tinyint_26
sql
select tagname from
st_tinyint_26
if $data
23
!= 123 then
if $data
00
!= 123 then
return -1
return -1
endi
endi
sql select * from st_tinyint_26
sql select * from st_tinyint_26
...
@@ -312,8 +313,8 @@ if $data01 != 123 then
...
@@ -312,8 +313,8 @@ if $data01 != 123 then
return -1
return -1
endi
endi
sql insert into st_tinyint_27 using mt_tinyint tags (+056) values (now, +00056)
sql insert into st_tinyint_27 using mt_tinyint tags (+056) values (now, +00056)
sql
describe
st_tinyint_27
sql
select tagname from
st_tinyint_27
if $data
23
!= 56 then
if $data
00
!= 56 then
return -1
return -1
endi
endi
sql select * from st_tinyint_27
sql select * from st_tinyint_27
...
@@ -321,8 +322,8 @@ if $data01 != 56 then
...
@@ -321,8 +322,8 @@ if $data01 != 56 then
return -1
return -1
endi
endi
sql insert into st_tinyint_28 using mt_tinyint tags (-056) values (now, -0056)
sql insert into st_tinyint_28 using mt_tinyint tags (-056) values (now, -0056)
sql
describe
st_tinyint_28
sql
select tagname from
st_tinyint_28
if $data
23
!= -56 then
if $data
00
!= -56 then
return -1
return -1
endi
endi
sql select * from st_tinyint_28
sql select * from st_tinyint_28
...
@@ -331,46 +332,46 @@ if $data01 != -56 then
...
@@ -331,46 +332,46 @@ if $data01 != -56 then
endi
endi
## case 03: alter tag values
## case 03: alter tag values
sql alter table st_tinyint_0 set tag tagname=127
#
sql alter table st_tinyint_0 set tag tagname=127
sql describe
st_tinyint_0
#sql select tagname from
st_tinyint_0
if $data23
!= 127 then
#if $data00
!= 127 then
return -1
#
return -1
endi
#endi
sql alter table st_tinyint_0 set tag tagname=-127
#
sql alter table st_tinyint_0 set tag tagname=-127
sql describe
st_tinyint_0
#sql select tagname from
st_tinyint_0
if $data23
!= -127 then
#if $data00
!= -127 then
return -1
#
return -1
endi
#endi
sql alter table st_tinyint_0 set tag tagname=+100
#
sql alter table st_tinyint_0 set tag tagname=+100
sql describe
st_tinyint_0
#sql select tagname from
st_tinyint_0
if $data23
!= 100 then
#if $data00
!= 100 then
return -1
#
return -1
endi
#
endi
sql alter table st_tinyint_0 set tag tagname=-33
#
sql alter table st_tinyint_0 set tag tagname=-33
sql describe
st_tinyint_0
#sql select tagname from
st_tinyint_0
if $data23
!= -33 then
#if $data00
!= -33 then
return -1
#
return -1
endi
#
endi
sql alter table st_tinyint_0 set tag tagname='+98'
#
sql alter table st_tinyint_0 set tag tagname='+98'
sql describe
st_tinyint_0
#sql select tagname from
st_tinyint_0
if $data23
!= 98 then
#if $data00
!= 98 then
return -1
#
return -1
endi
#
endi
sql alter table st_tinyint_0 set tag tagname='-076'
#
sql alter table st_tinyint_0 set tag tagname='-076'
sql describe
st_tinyint_0
#sql select tagname from
st_tinyint_0
if $data23
!= -76 then
#if $data00
!= -76 then
return -1
#
return -1
endi
#
endi
sql alter table st_tinyint_0 set tag tagname=+0012
#
sql alter table st_tinyint_0 set tag tagname=+0012
sql describe
st_tinyint_0
#sql select tagname from
st_tinyint_0
if $data23
!= 12 then
#if $data00
!= 12 then
return -1
#
return -1
endi
#
endi
sql alter table st_tinyint_0 set tag tagname=-00063
#
sql alter table st_tinyint_0 set tag tagname=-00063
sql describe
st_tinyint_0
#sql select tagname from
st_tinyint_0
if $data23
!= -63 then
#if $data00
!= -63 then
return -1
#
return -1
endi
#
endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_tinyint_e0 using mt_tinyint tags (128)
sql_error create table st_tinyint_e0 using mt_tinyint tags (128)
...
...
tests/script/general/parser/commit.sim
浏览文件 @
a0237aae
...
@@ -23,7 +23,7 @@ $stb = $stbPrefix . $i
...
@@ -23,7 +23,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
sql drop database $db -x step1
step1:
step1:
sql create database $db
rows 255 ablocks 1024 tblocks 512 tables 100 ctime 3600
sql create database $db
maxrows 255 maxtables 100 ctime 3600
print ====== create tables
print ====== create tables
sql use $db
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int)
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int)
...
...
tests/script/general/parser/create_db.sim
浏览文件 @
a0237aae
...
@@ -163,7 +163,7 @@ sql_error create database $db rows 199
...
@@ -163,7 +163,7 @@ sql_error create database $db rows 199
sql_error create database $db cache 99
sql_error create database $db cache 99
#sql_error create database $db cache 10485761
#sql_error create database $db cache 10485761
# ablocks [overwriten by 4*
session
sPerVnode, 409600]
# ablocks [overwriten by 4*
maxtable
sPerVnode, 409600]
sql_error create database $db ablocks -1
sql_error create database $db ablocks -1
#sql_error create database $db ablocks 409601
#sql_error create database $db ablocks 409601
...
...
tests/script/general/parser/first_last.sim
浏览文件 @
a0237aae
...
@@ -69,7 +69,7 @@ sql import into $tb (ts) values ( $ts )
...
@@ -69,7 +69,7 @@ sql import into $tb (ts) values ( $ts )
print ====== test data created
print ====== test data created
run
lite
/parser/first_last_query.sim
run
general
/parser/first_last_query.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -79,5 +79,5 @@ print ================== server restart completed
...
@@ -79,5 +79,5 @@ print ================== server restart completed
sql connect
sql connect
sleep 3000
sleep 3000
run
lite
/parser/first_last_query.sim
run
general
/parser/first_last_query.sim
tests/script/general/parser/interp.sim
浏览文件 @
a0237aae
...
@@ -56,7 +56,7 @@ while $i < $halfNum
...
@@ -56,7 +56,7 @@ while $i < $halfNum
endw
endw
print ====== tables created
print ====== tables created
run
lite
/parser/interp_test.sim
run
general
/parser/interp_test.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -64,4 +64,4 @@ sleep 2000
...
@@ -64,4 +64,4 @@ sleep 2000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
run
lite
/parser/interp_test.sim
run
general
/parser/interp_test.sim
tests/script/general/parser/lastrow.sim
浏览文件 @
a0237aae
...
@@ -57,7 +57,7 @@ endw
...
@@ -57,7 +57,7 @@ endw
print ====== test data created
print ====== test data created
run
lite
/parser/lastrow_query.sim
run
general
/parser/lastrow_query.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -67,4 +67,4 @@ print ================== server restart completed
...
@@ -67,4 +67,4 @@ print ================== server restart completed
sql connect
sql connect
sleep 3000
sleep 3000
run
lite
/parser/lastrow_query.sim
run
general
/parser/lastrow_query.sim
tests/script/general/parser/limit.sim
浏览文件 @
a0237aae
...
@@ -56,8 +56,8 @@ while $i < $halfNum
...
@@ -56,8 +56,8 @@ while $i < $halfNum
endw
endw
print ====== tables created
print ====== tables created
run
lite
/parser/limit_tb.sim
run
general
/parser/limit_tb.sim
run
lite
/parser/limit_stb.sim
run
general
/parser/limit_stb.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -67,5 +67,5 @@ print ================== server restart completed
...
@@ -67,5 +67,5 @@ print ================== server restart completed
sql connect
sql connect
sleep 3000
sleep 3000
run
lite
/parser/limit_tb.sim
run
general
/parser/limit_tb.sim
run
lite
/parser/limit_stb.sim
run
general
/parser/limit_stb.sim
tests/script/general/parser/limit1.sim
浏览文件 @
a0237aae
...
@@ -56,8 +56,8 @@ while $i < $halfNum
...
@@ -56,8 +56,8 @@ while $i < $halfNum
endw
endw
print ====== tables created
print ====== tables created
run
lite
/parser/limit1_tb.sim
run
general
/parser/limit1_tb.sim
run
lite
/parser/limit1_stb.sim
run
general
/parser/limit1_stb.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -65,5 +65,5 @@ sleep 2000
...
@@ -65,5 +65,5 @@ sleep 2000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
run
lite
/parser/limit1_tb.sim
run
general
/parser/limit1_tb.sim
run
lite
/parser/limit1_stb.sim
run
general
/parser/limit1_stb.sim
tests/script/general/parser/limit1_tblocks100.sim
浏览文件 @
a0237aae
...
@@ -56,8 +56,8 @@ while $i < $halfNum
...
@@ -56,8 +56,8 @@ while $i < $halfNum
endw
endw
print ====== tables created
print ====== tables created
run
lite
/parser/limit1_tb.sim
run
general
/parser/limit1_tb.sim
run
lite
/parser/limit1_stb.sim
run
general
/parser/limit1_stb.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -65,5 +65,5 @@ sleep 2000
...
@@ -65,5 +65,5 @@ sleep 2000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
run
lite
/parser/limit1_tb.sim
run
general
/parser/limit1_tb.sim
run
lite
/parser/limit1_stb.sim
run
general
/parser/limit1_stb.sim
tests/script/general/parser/limit2.sim
浏览文件 @
a0237aae
...
@@ -65,7 +65,7 @@ while $i < $halfNum
...
@@ -65,7 +65,7 @@ while $i < $halfNum
endw
endw
print ====== tables created
print ====== tables created
#run
lite
/parser/limit2_query.sim
#run
general
/parser/limit2_query.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -73,4 +73,4 @@ sleep 3000
...
@@ -73,4 +73,4 @@ sleep 3000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
run
lite
/parser/limit2_query.sim
run
general
/parser/limit2_query.sim
tests/script/general/parser/limit2_tblocks100.sim
浏览文件 @
a0237aae
...
@@ -65,7 +65,7 @@ while $i < $halfNum
...
@@ -65,7 +65,7 @@ while $i < $halfNum
endw
endw
print ====== tables created
print ====== tables created
#run
lite
/parser/limit2_query.sim
#run
general
/parser/limit2_query.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -73,4 +73,4 @@ sleep 3000
...
@@ -73,4 +73,4 @@ sleep 3000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
run
lite
/parser/limit2_query.sim
run
general
/parser/limit2_query.sim
tests/script/general/parser/null_char.sim
浏览文件 @
a0237aae
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
...
@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/parser/repeatAlter.sim
浏览文件 @
a0237aae
...
@@ -2,6 +2,6 @@ $i = 1
...
@@ -2,6 +2,6 @@ $i = 1
$loops = 10
$loops = 10
while $i <= $loops
while $i <= $loops
print ====== repeat: $i
print ====== repeat: $i
run
lite
/parser/alter.sim
run
general
/parser/alter.sim
$i = $i + 1
$i = $i + 1
endw
endw
tests/script/general/parser/repeatStream.sim
浏览文件 @
a0237aae
...
@@ -2,6 +2,6 @@ $i = 1
...
@@ -2,6 +2,6 @@ $i = 1
$repeats = 5
$repeats = 5
while $i <= $repeats
while $i <= $repeats
print ====== repeat: $i
print ====== repeat: $i
run
lite
/parser/stream.sim
run
general
/parser/stream.sim
$i = $i + 1
$i = $i + 1
endw
endw
tests/script/general/parser/select_across_vnodes.sim
浏览文件 @
a0237aae
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 5
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 5
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/parser/select_from_cache_disk.sim
浏览文件 @
a0237aae
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/parser/single_row_in_tb.sim
浏览文件 @
a0237aae
...
@@ -27,7 +27,7 @@ sql create table $tb1 using $stb tags( 1 )
...
@@ -27,7 +27,7 @@ sql create table $tb1 using $stb tags( 1 )
sql insert into $tb1 values ( $ts0 , 1, 2, 3, 4, true, 'binay10', '涛思nchar10' )
sql insert into $tb1 values ( $ts0 , 1, 2, 3, 4, true, 'binay10', '涛思nchar10' )
print ====== tables created
print ====== tables created
run
lite
/parser/single_row_in_tb_query.sim
run
general
/parser/single_row_in_tb_query.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -35,4 +35,4 @@ sleep 2000
...
@@ -35,4 +35,4 @@ sleep 2000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
run
lite
/parser/single_row_in_tb_query.sim
run
general
/parser/single_row_in_tb_query.sim
tests/script/general/parser/slimit.sim
浏览文件 @
a0237aae
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 4
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
@@ -94,7 +94,7 @@ while $i < $tbNum
...
@@ -94,7 +94,7 @@ while $i < $tbNum
endw
endw
print ====== $db tables created
print ====== $db tables created
run
lite
/parser/slimit_query.sim
run
general
/parser/slimit_query.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -104,4 +104,4 @@ print ================== server restart completed
...
@@ -104,4 +104,4 @@ print ================== server restart completed
sql connect
sql connect
sleep 3000
sleep 3000
run
lite
/parser/slimit_query.sim
run
general
/parser/slimit_query.sim
tests/script/general/parser/slimit1.sim
浏览文件 @
a0237aae
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
@@ -53,7 +53,7 @@ endw
...
@@ -53,7 +53,7 @@ endw
print ================== tables and data created
print ================== tables and data created
run
lite
/parser/slimit1_query.sim
run
general
/parser/slimit1_query.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -63,4 +63,4 @@ print ================== server restart completed
...
@@ -63,4 +63,4 @@ print ================== server restart completed
sql connect
sql connect
sleep 3000
sleep 3000
run
lite
/parser/slimit1_query.sim
run
general
/parser/slimit1_query.sim
tests/script/general/parser/slimit_alter_tags.sim
浏览文件 @
a0237aae
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c
session
sPerVnode -v 2
system sh/cfg.sh -n dnode1 -c
maxtable
sPerVnode -v 2
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
...
...
tests/script/general/parser/stream.sim
浏览文件 @
a0237aae
...
@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 5
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 5
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 5
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sleep 3000
sql connect
sql connect
...
...
tests/script/general/parser/tbnameIn.sim
浏览文件 @
a0237aae
...
@@ -64,7 +64,7 @@ while $i < $halfNum
...
@@ -64,7 +64,7 @@ while $i < $halfNum
endw
endw
print ====== tables created
print ====== tables created
run
lite
/parser/tbnameIn_query.sim
run
general
/parser/tbnameIn_query.sim
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -72,4 +72,4 @@ sleep 2000
...
@@ -72,4 +72,4 @@ sleep 2000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
run
lite
/parser/tbnameIn_query.sim
run
general
/parser/tbnameIn_query.sim
tests/script/general/parser/testSuite.sim
浏览文件 @
a0237aae
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#run general/parser/auto_create_tb.sim
#run general/parser/auto_create_tb.sim
#sleep 2000
#sleep 2000
#run general/parser/auto_create_tb_drop_tb.sim
#run general/parser/auto_create_tb_drop_tb.sim
sleep 2000
sleep 2000
run general/parser/col_arithmetic_operation.sim
run general/parser/col_arithmetic_operation.sim
sleep 2000
sleep 2000
...
...
tests/script/general/parser/timestamp.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/general/stream/metrics_del.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/general/stream/metrics_replica1_vnoden.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/general/stream/stream_3.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/general/stream/table_del.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/general/stream/table_replica1_vnoden.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/general/table/delete_writing.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/general/table/limit.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/general/user/monitor.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/jenkins/basic.txt
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/big/maxvnodes.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/big/tcp.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/cluster/balance3.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/db/delete.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/import/replica2.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/import/replica3.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/metrics/balance_replica1.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/metrics/dnode2.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/metrics/dnode2_stop.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/metrics/dnode3.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/metrics/replica2_dnode4.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/metrics/replica2_vnode3.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/metrics/replica3_dnode6.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/metrics/replica3_vnode3.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_balance.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_replica1_dnode2.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_replica2_dnode3.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_replica3_dnode4.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_balance.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_move.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_replica1_dnode2.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_replica2_dnode2_vnoden.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_replica2_dnode3.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_replica3_dnode4.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/table/delete_part.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/script/unique/vnode/replica3_vgroup.sim
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
tests/tsim/src/simExe.c
浏览文件 @
a0237aae
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录