Merge pull request #28482 from taosdata/merge/mainto3.0
merge: from main to 3.0
This commit is contained in:
commit
72819548c7
|
@ -10,7 +10,7 @@ TDengine 客户端驱动提供了应用编程所需要的全部 API,并且在
|
|||
|
||||
| 参数名称 | 参数含义 |
|
||||
|:-----------:|:----------------------------------------------------------:|
|
||||
|firstEp | taos 启动时,主动连接的集群中首个 dnode 的 endpoint,缺省值:${hostname}:6030,若无法获取 ${hostname},则赋值为 localhost |
|
||||
|firstEp | taos 启动时,主动连接的集群中首个 dnode 的 endpoint,缺省值:hostname:6030,若无法获取该服务器的 hostname,则赋值为 localhost |
|
||||
|secondEp | 启动时,如果 firstEp 连接不上,尝试连接集群中第二个 dnode 的 endpoint,没有缺省值 |
|
||||
|numOfRpcSessions | 一个客户端能创建的最大连接数,取值范围:10-50000000(单位为毫秒);缺省值:500000 |
|
||||
|telemetryReporting | 是否上传 telemetry,0: 不上传,1: 上传;缺省值:1 |
|
||||
|
|
|
@ -76,7 +76,7 @@ window_clause: {
|
|||
FILL 语句指定某一窗口区间数据缺失的情况下的填充模式。填充模式包括以下几种:
|
||||
|
||||
1. 不进行填充:NONE(默认填充模式)。
|
||||
2. VALUE 填充:固定值填充,此时需要指定填充的数值。例如:FILL(VALUE, 1.23)。这里需要注意,最终填充的值受由相应列的类型决定,如 FILL(VALUE, 1.23),相应列为 INT 类型,则填充值为 1, 若查询列表中有多列需要FILL, 则需要给每一个FILL列指定VALUE, 如`SELECT _wstart, min(c1), max(c1) FROM ... FILL(VALUE, 0, 0)`, 注意, SELECT表达式中只有包含普通列时才需要指定FILL VALUE, 如`_wstart`, `_wstart+1a`, `now`, `1+1` 以及使用partition by时的partition key(如tbname)都不需要指定VALUE, 如`timediff(last(ts), _wstart)`则需要指定VALUE。
|
||||
2. VALUE 填充:固定值填充,此时需要指定填充的数值。例如:FILL(VALUE, 1.23)。这里需要注意,最终填充的值受由相应列的类型决定,如 FILL(VALUE, 1.23),相应列为 INT 类型,则填充值为 1, 若查询列表中有多列需要 FILL, 则需要给每一个 FILL 列指定 VALUE, 如 `SELECT _wstart, min(c1), max(c1) FROM ... FILL(VALUE, 0, 0)`, 注意, SELECT 表达式中只有包含普通列时才需要指定 FILL VALUE, 如 `_wstart`, `_wstart+1a`, `now`, `1+1` 以及使用 partition by 时的 partition key (如 tbname)都不需要指定 VALUE, 如 `timediff(last(ts), _wstart)` 则需要指定VALUE。
|
||||
3. PREV 填充:使用前一个非 NULL 值填充数据。例如:FILL(PREV)。
|
||||
4. NULL 填充:使用 NULL 填充数据。例如:FILL(NULL)。
|
||||
5. LINEAR 填充:根据前后距离最近的非 NULL 值做线性插值填充。例如:FILL(LINEAR)。
|
||||
|
|
|
@ -33,7 +33,7 @@ description: 对 JSON 类型如何使用的详细说明
|
|||
|
||||
## 支持的操作
|
||||
|
||||
1. 在 where 条件中时,支持函数 match/nmatch/between and/like/and/or/is null/is no null,不支持 in
|
||||
1. 在 where 条件中时,支持函数 match/nmatch/between and/like/and/or/is null/is not null,不支持 in
|
||||
|
||||
```
|
||||
select * from s1 where info->'k1' match 'v*';
|
||||
|
|
|
@ -917,6 +917,11 @@ int32_t taosGetErrSize();
|
|||
#define TSDB_CODE_FUNC_INVALID_RES_LENGTH TAOS_DEF_ERROR_CODE(0, 0x280E)
|
||||
#define TSDB_CODE_FUNC_HISTOGRAM_ERROR TAOS_DEF_ERROR_CODE(0, 0x280F)
|
||||
#define TSDB_CODE_FUNC_PERCENTILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x2810)
|
||||
#define TSDB_CODE_FUNC_FUNTION_PARA_RANGE TAOS_DEF_ERROR_CODE(0, 0x2811)
|
||||
#define TSDB_CODE_FUNC_FUNTION_PARA_PRIMTS TAOS_DEF_ERROR_CODE(0, 0x2812)
|
||||
#define TSDB_CODE_FUNC_FUNTION_PARA_PK TAOS_DEF_ERROR_CODE(0, 0x2813)
|
||||
#define TSDB_CODE_FUNC_FUNTION_PARA_HAS_COL TAOS_DEF_ERROR_CODE(0, 0x2814)
|
||||
#define TSDB_CODE_FUNC_FUNCTION_HISTO_TYPE TAOS_DEF_ERROR_CODE(0, 0x2815)
|
||||
|
||||
|
||||
//udf
|
||||
|
|
|
@ -497,6 +497,7 @@ void destroyStreamFinalIntervalOperatorInfo(void* param) {
|
|||
blockDataDestroy(pInfo->pMidRetriveRes);
|
||||
blockDataDestroy(pInfo->pMidPulloverRes);
|
||||
if (pInfo->pUpdatedMap != NULL) {
|
||||
// free flushed pos
|
||||
tSimpleHashSetFreeFp(pInfo->pUpdatedMap, destroyFlusedppPos);
|
||||
tSimpleHashCleanup(pInfo->pUpdatedMap);
|
||||
pInfo->pUpdatedMap = NULL;
|
||||
|
@ -1967,7 +1968,6 @@ int32_t createStreamFinalIntervalOperatorInfo(SOperatorInfo* downstream, SPhysiN
|
|||
code = initAggSup(&pOperator->exprSupp, &pInfo->aggSup, pExprInfo, numOfCols, keyBufSize, pTaskInfo->id.str,
|
||||
pInfo->pState, &pTaskInfo->storageAPI.functionStore);
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
tSimpleHashSetFreeFp(pInfo->aggSup.pResultRowHashTable, destroyFlusedppPos);
|
||||
|
||||
code = initExecTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pTaskInfo->window);
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
|
@ -5358,7 +5358,6 @@ int32_t createStreamIntervalOperatorInfo(SOperatorInfo* downstream, SPhysiNode*
|
|||
code = initAggSup(pSup, &pInfo->aggSup, pExprInfo, numOfCols, keyBufSize, pTaskInfo->id.str, pInfo->pState,
|
||||
&pTaskInfo->storageAPI.functionStore);
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
tSimpleHashSetFreeFp(pInfo->aggSup.pResultRowHashTable, destroyFlusedppPos);
|
||||
|
||||
if (pIntervalPhyNode->window.pExprs != NULL) {
|
||||
int32_t numOfScalar = 0;
|
||||
|
|
|
@ -22,16 +22,48 @@ extern "C" {
|
|||
|
||||
#include "functionMgtInt.h"
|
||||
|
||||
struct SFunctionParaInfo;
|
||||
|
||||
typedef int32_t (*FTranslateFunc)(SFunctionNode* pFunc, char* pErrBuf, int32_t len);
|
||||
typedef EFuncDataRequired (*FFuncDataRequired)(SFunctionNode* pFunc, STimeWindow* pTimeWindow);
|
||||
typedef int32_t (*FCreateMergeFuncParameters)(SNodeList* pRawParameters, SNode* pPartialRes, SNodeList** pParameters);
|
||||
typedef EFuncDataRequired (*FFuncDynDataRequired)(void* pRes, SDataBlockInfo* pBlocInfo);
|
||||
typedef EFuncReturnRows (*FEstimateReturnRows)(SFunctionNode* pFunc);
|
||||
|
||||
#define MAX_FUNC_PARA_NUM 16
|
||||
#define MAX_FUNC_PARA_FIXED_VALUE_NUM 16
|
||||
typedef struct SParamRange {
|
||||
int64_t iMinVal;
|
||||
int64_t iMaxVal;
|
||||
} SParamRange;
|
||||
|
||||
typedef struct SParamInfo {
|
||||
bool isLastParam;
|
||||
int8_t startParam;
|
||||
int8_t endParam;
|
||||
uint64_t validDataType;
|
||||
uint64_t validNodeType;
|
||||
uint64_t paramAttribute;
|
||||
uint8_t valueRangeFlag; // 0 for no range and no fixed value, 1 for value has range, 2 for fixed value
|
||||
uint8_t fixedValueSize;
|
||||
char* fixedStrValue[MAX_FUNC_PARA_FIXED_VALUE_NUM]; // used for input parameter
|
||||
int64_t fixedNumValue[MAX_FUNC_PARA_FIXED_VALUE_NUM]; // used for input parameter
|
||||
SParamRange range;
|
||||
} SParamInfo;
|
||||
|
||||
typedef struct SFunctionParaInfo {
|
||||
int8_t minParamNum;
|
||||
int8_t maxParamNum;
|
||||
uint8_t paramInfoPattern;
|
||||
SParamInfo inputParaInfo[MAX_FUNC_PARA_NUM][MAX_FUNC_PARA_NUM];
|
||||
SParamInfo outputParaInfo;
|
||||
} SFunctionParaInfo;
|
||||
|
||||
typedef struct SBuiltinFuncDefinition {
|
||||
const char* name;
|
||||
EFunctionType type;
|
||||
uint64_t classification;
|
||||
SFunctionParaInfo parameters;
|
||||
FTranslateFunc translateFunc;
|
||||
FFuncDataRequired dataRequiredFunc;
|
||||
FFuncDynDataRequired dynDataRequiredFunc;
|
||||
|
|
|
@ -64,6 +64,80 @@ extern "C" {
|
|||
|
||||
#define FUNC_UDF_ID_START 5000
|
||||
|
||||
#define FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(n) ((uint64_t)1 << n)
|
||||
#define FUNC_PARAM_SUPPORT_ALL_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(0)
|
||||
#define FUNC_PARAM_SUPPORT_NUMERIC_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(1)
|
||||
#define FUNC_PARAM_SUPPORT_VAR_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(2)
|
||||
#define FUNC_PARAM_SUPPORT_STRING_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(3)
|
||||
#define FUNC_PARAM_SUPPORT_BOOL_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(4)
|
||||
#define FUNC_PARAM_SUPPORT_TINYINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(5)
|
||||
#define FUNC_PARAM_SUPPORT_SMALLINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(6)
|
||||
#define FUNC_PARAM_SUPPORT_INT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(7)
|
||||
#define FUNC_PARAM_SUPPORT_BIGINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(8)
|
||||
#define FUNC_PARAM_SUPPORT_FLOAT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(9)
|
||||
#define FUNC_PARAM_SUPPORT_DOUBLE_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(10)
|
||||
#define FUNC_PARAM_SUPPORT_VARCHAR_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(11)
|
||||
#define FUNC_PARAM_SUPPORT_TIMESTAMP_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(12)
|
||||
#define FUNC_PARAM_SUPPORT_NCHAR_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(13)
|
||||
#define FUNC_PARAM_SUPPORT_UTINYINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(14)
|
||||
#define FUNC_PARAM_SUPPORT_USMALLINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(15)
|
||||
#define FUNC_PARAM_SUPPORT_UINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(16)
|
||||
#define FUNC_PARAM_SUPPORT_UBIGINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(17)
|
||||
#define FUNC_PARAM_SUPPORT_JSON_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(18)
|
||||
#define FUNC_PARAM_SUPPORT_VARB_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(19)
|
||||
#define FUNC_PARAM_SUPPORT_GEOMETRY_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(20)
|
||||
#define FUNC_PARAM_SUPPORT_INTEGER_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(21)
|
||||
#define FUNC_PARAM_SUPPORT_NULL_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(22)
|
||||
#define FUNC_PARAM_SUPPORT_UNIX_TS_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(23)
|
||||
|
||||
|
||||
|
||||
#define FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(n) ((uint64_t)1 << n)
|
||||
#define FUNC_PARAM_SUPPORT_EXPR_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(0)
|
||||
#define FUNC_PARAM_SUPPORT_VALUE_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(1)
|
||||
#define FUNC_PARAM_SUPPORT_OPERATOR_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(2)
|
||||
#define FUNC_PARAM_SUPPORT_FUNCTION_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(3)
|
||||
#define FUNC_PARAM_SUPPORT_LOGIC_CONDITION_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(4)
|
||||
#define FUNC_PARAM_SUPPORT_CASE_WHEN_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(5)
|
||||
#define FUNC_PARAM_SUPPORT_COLUMN_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(6)
|
||||
#define FUNC_PARAM_SUPPORT_NOT_VALUE_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(7)
|
||||
|
||||
#define FUNC_PARAM_NO_SPECIFIC_ATTRIBUTE 0
|
||||
#define FUNC_PARAM_MUST_BE_PRIMTS 1
|
||||
#define FUNC_PARAM_MUST_BE_PK 2
|
||||
#define FUNC_PARAM_MUST_HAVE_COLUMN 3
|
||||
#define FUNC_PARAM_MUST_BE_TIME_UNIT 4
|
||||
#define FUNC_PARAM_VALUE_NODE_NOT_NULL 5
|
||||
|
||||
#define FUNC_PARAM_NO_SPECIFIC_VALUE 0
|
||||
#define FUNC_PARAM_HAS_RANGE 1
|
||||
#define FUNC_PARAM_HAS_FIXED_VALUE 2
|
||||
|
||||
#define FUNC_ERR_RET(c) \
|
||||
do { \
|
||||
int32_t _code = c; \
|
||||
if (_code != TSDB_CODE_SUCCESS) { \
|
||||
terrno = _code; \
|
||||
return _code; \
|
||||
} \
|
||||
} while (0)
|
||||
#define FUNC_RET(c) \
|
||||
do { \
|
||||
int32_t _code = c; \
|
||||
if (_code != TSDB_CODE_SUCCESS) { \
|
||||
terrno = _code; \
|
||||
} \
|
||||
return _code; \
|
||||
} while (0)
|
||||
#define FUNC_ERR_JRET(c) \
|
||||
do { \
|
||||
code = c; \
|
||||
if (code != TSDB_CODE_SUCCESS) { \
|
||||
terrno = code; \
|
||||
goto _return; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -761,6 +761,11 @@ TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_SETUP_ERROR, "Function set up fail
|
|||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_INVALID_RES_LENGTH, "Function result exceed max length")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_HISTOGRAM_ERROR, "Function failed to calculate histogram")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_PERCENTILE_ERROR, "Function failed to calculate percentile")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_FUNTION_PARA_RANGE, "Invalid function para range")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_FUNTION_PARA_PRIMTS, "Function parameter should be primary timestamp")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_FUNTION_PARA_PK, "Function parameter should be primary key")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_FUNTION_PARA_HAS_COL, "Function parameter should have column")
|
||||
|
||||
|
||||
//udf
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_UDF_STOPPING, "udf is stopping")
|
||||
|
|
|
@ -296,7 +296,7 @@ class TDTestCase(TBase):
|
|||
|
||||
def test_error(self):
|
||||
tdSql.error("select * from (select to_iso8601(ts, timezone()), timezone() from ts_4893.meters \
|
||||
order by ts desc) limit 1000;", expectErrInfo="Not supported timzone format") # TS-5340
|
||||
order by ts desc) limit 1000;", expectErrInfo="Invalid parameter data type : to_iso8601") # TS-5340
|
||||
|
||||
def run(self):
|
||||
tdLog.debug(f"start to excute {__file__}")
|
||||
|
|
|
@ -189,10 +189,10 @@ $loop_count = 0
|
|||
|
||||
loop4:
|
||||
|
||||
sleep 200
|
||||
sleep 500
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 10 then
|
||||
if $loop_count == 20 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -324,5 +324,197 @@ if $data[29][1] != 2 then
|
|||
goto loop7
|
||||
endi
|
||||
|
||||
print step4====
|
||||
|
||||
sql create database test4 vgroups 1;
|
||||
sql use test4;
|
||||
|
||||
sql create stable st(ts timestamp,a int,b int,c int, d double) tags(ta int,tb int,tc int);
|
||||
sql create table t1 using st tags(1,1,1);
|
||||
sql create table t2 using st tags(2,2,2);
|
||||
sql create table t3 using st tags(2,2,2);
|
||||
sql create table t4 using st tags(2,2,2);
|
||||
sql create table t5 using st tags(2,2,2);
|
||||
sql create table t6 using st tags(2,2,2);
|
||||
|
||||
sql create stream streams4 trigger window_close IGNORE EXPIRED 0 into streamt as select _wstart, count(*), now from st partition by tbname interval(1s);
|
||||
sql create stream streams5 trigger window_close IGNORE EXPIRED 0 into streamt1 as select _wstart, count(*), now from st partition by b interval(1s);
|
||||
|
||||
run tsim/stream/checkTaskStatus.sim
|
||||
|
||||
sql insert into t1 values(1648791211000,1,1,1,1.1) t2 values (1648791211000,2,2,2,2.1) t3 values(1648791211000,3,3,3,3.1) t4 values(1648791211000,4,4,4,4.1) t5 values (1648791211000,5,5,5,5.1) t6 values(1648791211000,6,6,6,6.1);
|
||||
|
||||
sql insert into t1 values(now,1,1,1,1.1) t2 values (now,2,2,2,2.1) t3 values(now,3,3,3,3.1) t4 values(now,4,4,4,4.1) t5 values (now,5,5,5,5.1) t6 values(now,6,6,6,6.1);
|
||||
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop8:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 20 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt;
|
||||
sql select * from streamt;
|
||||
|
||||
if $rows != 6 then
|
||||
print ======rows=$rows
|
||||
goto loop8
|
||||
endi
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data11 != 1 then
|
||||
print ======data11=$data11
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data21 != 1 then
|
||||
print ======data21=$data21
|
||||
return -1
|
||||
endi
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop8_1:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 20 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt1;
|
||||
sql select * from streamt1;
|
||||
|
||||
if $rows != 6 then
|
||||
print ======rows=$rows
|
||||
goto loop8_1
|
||||
endi
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data11 != 1 then
|
||||
print ======data11=$data11
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data21 != 1 then
|
||||
print ======data21=$data21
|
||||
return -1
|
||||
endi
|
||||
|
||||
sleep 2000
|
||||
|
||||
sql insert into t1 values(now,1,1,1,1.1) t2 values (now,2,2,2,2.1) t3 values(now,3,3,3,3.1) t4 values(now,4,4,4,4.1) t5 values (now,5,5,5,5.1) t6 values(now,6,6,6,6.1);
|
||||
|
||||
sleep 2000
|
||||
|
||||
sql insert into t1 values(now,1,1,1,1.1) t2 values (now,2,2,2,2.1) t3 values(now,3,3,3,3.1) t4 values(now,4,4,4,4.1) t5 values (now,5,5,5,5.1) t6 values(now,6,6,6,6.1);
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop8_1:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 20 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt order by 1 desc;
|
||||
sql select * from streamt order by 1 desc;
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
goto loop8_1
|
||||
endi
|
||||
|
||||
print sql select * from streamt1 order by 1 desc;
|
||||
sql select * from streamt1 order by 1 desc;
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
goto loop8_1
|
||||
endi
|
||||
|
||||
sleep 2000
|
||||
|
||||
sql insert into t1 values(now,1,1,1,1.1)
|
||||
sql insert into t2 values(now,2,2,2,2.1);
|
||||
sql insert into t3 values(now,3,3,3,3.1);
|
||||
sql insert into t4 values(now,4,4,4,4.1);
|
||||
sql insert into t5 values(now,5,5,5,5.1);
|
||||
sql insert into t6 values(now,6,6,6,6.1);
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop9:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 10 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt order by 1 desc;
|
||||
sql select * from streamt order by 1 desc;
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
goto loop9
|
||||
endi
|
||||
|
||||
if $data11 != 1 then
|
||||
print ======data11=$data11
|
||||
goto loop9
|
||||
endi
|
||||
|
||||
if $data21 != 1 then
|
||||
print ======data21=$data21
|
||||
goto loop9
|
||||
endi
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop10:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 10 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt1 order by 1 desc;
|
||||
sql select * from streamt1 order by 1 desc;
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
goto loop10
|
||||
endi
|
||||
|
||||
if $data11 != 1 then
|
||||
print ======data11=$data11
|
||||
goto loop10
|
||||
endi
|
||||
|
||||
if $data21 != 1 then
|
||||
print ======data21=$data21
|
||||
goto loop10
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
Loading…
Reference in New Issue