diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index dda567cdd5f86e3b96aec83e9eeada3ec56afe5c..292e435732f68d6b728565a3e917d2a53923984e 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -3963,6 +3963,8 @@ static SSDataBlock* doApplyIndefinitFunction(SOperatorInfo* pOperator) { size_t rows = pInfo->pRes->info.rows; if (rows > 0 || pOperator->status == OP_EXEC_DONE) { break; + } else { + blockDataCleanup(pInfo->pRes); } } diff --git a/source/libs/parser/src/parInsert.c b/source/libs/parser/src/parInsert.c index d71765b52d9cd42f05425e541113de7d39bf7f67..05e8c1094d3617affdc2087a1df750acf2ee2c62 100644 --- a/source/libs/parser/src/parInsert.c +++ b/source/libs/parser/src/parInsert.c @@ -1018,7 +1018,7 @@ static int32_t parseTagsClause(SInsertParseContext* pCxt, SSchema* pSchema, uint end: for (int i = 0; i < taosArrayGetSize(pTagVals); ++i) { STagVal* p = (STagVal*)taosArrayGet(pTagVals, i); - if (IS_VAR_DATA_TYPE(p->type)) { + if (p->type == TSDB_DATA_TYPE_NCHAR) { taosMemoryFree(p->pData); } } diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index c0494aa2ae3cd9a49b7960327c7ec5b39e9658e5..36b58afb76b1aba2b85363ff51944ffe4ba8f2a1 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -1588,7 +1588,7 @@ static int32_t eliminateProjOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* FOREACH(pProjection, pProjectNode->pProjections) { SNode* pChildTarget = NULL; FOREACH(pChildTarget, pChild->pTargets) { - if (strcmp(((SColumnNode*)pProjection)->colName, ((SColumnNode*)pChildTarget)->colName) == 0) { + if (0 == strcmp(((SColumnNode*)pProjection)->colName, ((SColumnNode*)pChildTarget)->colName)) { nodesListAppend(pNewChildTargets, nodesCloneNode(pChildTarget)); break; } @@ -2167,10 +2167,26 @@ static int32_t tagScanOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSubp break; } } - NODES_DESTORY_LIST(pScanNode->pScanCols); SLogicNode* pAgg = pScanNode->node.pParent; + if (NULL == pAgg->pParent) { + SNodeList* pScanTargets = nodesMakeList(); + + SNode* pAggTarget = NULL; + FOREACH(pAggTarget, pAgg->pTargets) { + SNode* pScanTarget = NULL; + FOREACH(pScanTarget, pScanNode->node.pTargets) { + if (0 == strcmp( ((SColumnNode*)pAggTarget)->colName, ((SColumnNode*)pAggTarget)->colName )) { + nodesListAppend(pScanTargets, nodesCloneNode(pScanTarget)); + break; + } + } + } + nodesDestroyList(pScanNode->node.pTargets); + pScanNode->node.pTargets = pScanTargets; + } + int32_t code = replaceLogicNode(pLogicSubplan, pAgg, (SLogicNode*)pScanNode); if (TSDB_CODE_SUCCESS == code) { NODES_CLEAR_LIST(pAgg->pChildren); diff --git a/tests/script/tsim/parser/udf.sim b/tests/script/tsim/parser/udf.sim deleted file mode 100644 index 4b767dbf60a413945f34ce4f17aa6b19efe0bb5e..0000000000000000000000000000000000000000 --- a/tests/script/tsim/parser/udf.sim +++ /dev/null @@ -1,638 +0,0 @@ -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c walLevel -v 1 -system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2 -system sh/exec.sh -n dnode1 -s start -system sh/prepare_udf.sh - -sleep 100 -sql connect -print ======================== dnode1 start - -sql create function n01 as '/tmp/normal' outputtype int; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n01 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != INT then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n01; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - -sql create function n02 as '/tmp/normal' outputtype bool; -sql show functions; -if $rows != 1 then - print expect 1, actual $rows - return -1 -endi - - -if $data00 != n02 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != BOOL then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n02; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - - -sql create function n03 as '/tmp/normal' outputtype TINYINT; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n03 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != TINYINT then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n03; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - - - -sql create function n04 as '/tmp/normal' outputtype SMALLINT; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n04 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != SMALLINT then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n04; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - - - - -sql create function n05 as '/tmp/normal' outputtype INT; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n05 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != INT then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n05; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - - - - - - - - -sql create function n06 as '/tmp/normal' outputtype BIGINT; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n06 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != BIGINT then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n06; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - - - - - - -sql create function n07 as '/tmp/normal' outputtype FLOAT; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n07 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != FLOAT then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n07; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - - - - - -sql create function n08 as '/tmp/normal' outputtype DOUBLE; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n08 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != DOUBLE then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n08; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - - - - - -sql create function n09 as '/tmp/normal' outputtype BINARY; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n09 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != BINARY(0) then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n09; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - -sql create function n10 as '/tmp/normal' outputtype BINARY(10); -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n10 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != BINARY(10) then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n10; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - -sql create function n11 as '/tmp/normal' outputtype TIMESTAMP; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n11 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != TIMESTAMP then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n11; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - -sql create function n12 as '/tmp/normal' outputtype NCHAR; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n12 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != NCHAR(0) then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n12; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - -sql create function n13 as '/tmp/normal' outputtype NCHAR(10); -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n13 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data03 != NCHAR(10) then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n13; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - - -sql create function n14 as '/tmp/normal' outputtype TINYINT UNSIGNED; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n14 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n14; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - -sql create function n15 as '/tmp/normal' outputtype SMALLINT UNSIGNED; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n15 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n15; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - -sql create function n16 as '/tmp/normal' outputtype INT UNSIGNED; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n16 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n16; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - - -sql create function n17 as '/tmp/normal' outputtype BIGINT UNSIGNED; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n17 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 0 then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n17; - -sql show functions; -if $rows != 0 then - return -1 -endi - - -sql create aggregate function n18 as '/tmp/normal' outputtype BIGINT UNSIGNED; -sql show functions; -if $rows != 1 then - return -1 -endi - - -if $data00 != n18 then - return -1 -endi -if $data01 != /tmp/normal then - return -1 -endi -if $data02 != 1 then - return -1 -endi -if $data05 != 5 then - return -1 -endi - -sql drop function n18; - -sql show functions; -if $rows != 0 then - return -1 -endi - - - -sql create function t01 as '/tmp/normal' outputtype INT; -sql_error create function t01 as '/tmp/normal' outputtype SMALLINT; -sql drop function t01; -sql create function t01 as '/tmp/normal' outputtype INT; -sql create function t02 as '/tmp/normal' outputtype SMALLINT; -sql show functions; -if $rows != 2 then - return -1 -endi - - - - - - -sql_error create function e1 as '/tmp/normal'; -sql_error create function e2 as '/tmp/normal' outputtype; -sql_error create function e3 as '/tmp/normal' a; -sql_error create function e4 as '/tmp/normal' outputtype a; -sql_error create function e5 as '/tmp/normal' outputtype bool int; -sql_error create function as '/tmp/normal' outputtype; -sql_error create function e6 as '/tmp/empty' outputtype int; -sql_error create function e7 as '/tmp/big' outputtype int; -sql_error create function e8 as '/tmp/noexistfile' outputtype int; -sql_error create function e0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 as '/tmp/normal' outputtype int; -sql_error create function e9 as outputtype int; - - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/parser/udf_dll.sim b/tests/script/tsim/parser/udf_dll.sim deleted file mode 100644 index 0f9436762adb645785ddcf9a4abaf4a5be810a34..0000000000000000000000000000000000000000 --- a/tests/script/tsim/parser/udf_dll.sim +++ /dev/null @@ -1,494 +0,0 @@ -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c walLevel -v 1 -system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2 -system sh/exec.sh -n dnode1 -s start -system sh/prepare_udf.sh - -sleep 100 -sql connect -print ======================== dnode1 start - -sql create function add_one as '/tmp/add_one.so' outputtype int; -sql create aggregate function sum_double as '/tmp/sum_double.so' outputtype int; -sql show functions; -if $rows != 2 then - return -1 -endi - -sql create database db; -sql use db; -sql create table tb1 (ts timestamp, f1 int, f2 bool, f3 binary(10)); -sql insert into tb1 values ('2021-03-23 17:17:19.660', 1, true, 'tb1-1'); -sql insert into tb1 values ('2021-03-23 19:23:28.595', 2, false, 'tb1-2'); -sql insert into tb1 values ('2021-03-23 19:33:39.070', 3, true, 'tb1-3'); -sql insert into tb1 values ('2021-03-23 19:34:37.670', 4, false, 'tb1-4'); -sql insert into tb1 values ('2021-03-24 19:08:06.609', 5, true, 'tb1-5'); -sql insert into tb1 values ('2021-03-24 19:26:38.231', 6, false, 'tb1-6'); -sql insert into tb1 values ('2021-03-25 10:03:17.688', 7, true, 'tb1-7'); - -sql select add_one(f1) from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi -if $data20 != 4 then - return -1 -endi -if $data30 != 5 then - return -1 -endi -if $data40 != 6 then - return -1 -endi -if $data50 != 7 then - return -1 -endi -if $data60 != 8 then - return -1 -endi - - -sql select sum_double(f1) from tb1; -if $rows != 1 then - return -1 -endi - -if $data00 != 56 then - return -1 -endi - - -sql select ts,add_one(f1),f1 from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data02 != 1 then - return -1 -endi -if $data10 != @21-03-23 19:23:28.595@ then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data12 != 2 then - return -1 -endi -if $data20 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data22 != 3 then - return -1 -endi -if $data30 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data32 != 4 then - return -1 -endi -if $data40 != @21-03-24 19:08:06.609@ then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data42 != 5 then - return -1 -endi -if $data50 != @21-03-24 19:26:38.231@ then - return -1 -endi -if $data51 != 7 then - return -1 -endi -if $data52 != 6 then - return -1 -endi -if $data60 != @21-03-25 10:03:17.688@ then - return -1 -endi -if $data61 != 8 then - return -1 -endi -if $data62 != 7 then - return -1 -endi - - - - -sql select add_one(f1),add_one(f1) from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data20 != 4 then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data30 != 5 then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data40 != 6 then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data50 != 7 then - return -1 -endi -if $data51 != 7 then - return -1 -endi -if $data60 != 8 then - return -1 -endi -if $data61 != 8 then - return -1 -endi - - -sql select add_one(f1)+1 from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != 3.000000000 then - return -1 -endi -if $data10 != 4.000000000 then - return -1 -endi -if $data20 != 5.000000000 then - return -1 -endi -if $data30 != 6.000000000 then - return -1 -endi -if $data40 != 7.000000000 then - return -1 -endi -if $data50 != 8.000000000 then - return -1 -endi -if $data60 != 9.000000000 then - return -1 -endi - - -sql select sum_double(f1)+1 from tb1; -if $rows != 1 then - return -1 -endi - -if $data00 != 57.000000000 then - return -1 -endi - - -sql select add_one(f1)+1,f1 from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != 3.000000000 then - return -1 -endi -if $data01 != 1 then - return -1 -endi -if $data10 != 4.000000000 then - return -1 -endi -if $data11 != 2 then - return -1 -endi -if $data20 != 5.000000000 then - return -1 -endi -if $data21 != 3 then - return -1 -endi -if $data30 != 6.000000000 then - return -1 -endi -if $data31 != 4 then - return -1 -endi -if $data40 != 7.000000000 then - return -1 -endi -if $data41 != 5 then - return -1 -endi -if $data50 != 8.000000000 then - return -1 -endi -if $data51 != 6 then - return -1 -endi -if $data60 != 9.000000000 then - return -1 -endi -if $data61 != 7 then - return -1 -endi - - -sql select sum_double(f1) from tb1 interval (10a); -if $rows != 7 then - return -1 -endi - -if $data00 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 19:23:28.590@ then - return -1 -endi -if $data11 != 4 then - return -1 -endi -if $data20 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data21 != 6 then - return -1 -endi -if $data30 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data31 != 8 then - return -1 -endi -if $data40 != @21-03-24 19:08:06.600@ then - return -1 -endi -if $data41 != 10 then - return -1 -endi -if $data50 != @21-03-24 19:26:38.230@ then - return -1 -endi -if $data51 != 12 then - return -1 -endi -if $data60 != @21-03-25 10:03:17.680@ then - return -1 -endi -if $data61 != 14 then - return -1 -endi - -sql select ts,add_one(f1) from tb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000"; -if $rows != 6 then - return -1 -endi - -if $data00 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 19:23:28.595@ then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data20 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data30 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data40 != @21-03-24 19:08:06.609@ then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data50 != @21-03-24 19:26:38.231@ then - return -1 -endi -if $data51 != 7 then - return -1 -endi - -sql select sum_double(f1) from tb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000" interval (1h); -if $rows != 3 then - return -1 -endi - -if $data00 != @21-03-23 17:00:00.000@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 19:00:00.000@ then - return -1 -endi -if $data11 != 18 then - return -1 -endi -if $data20 != @21-03-24 19:00:00.000@ then - return -1 -endi -if $data21 != 22 then - return -1 -endi - - -sql select sum_double(f1) from tb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000" interval (1h) fill(value,999); -if $rows != 28 then - return -1 -endi - -sql_error select add_one(f1) from tb1 group by f1; - -sql select sum_double(f1) from tb1 group by f1; -if $rows != 7 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data10 != 4 then - return -1 -endi -if $data20 != 6 then - return -1 -endi -if $data30 != 8 then - return -1 -endi -if $data40 != 10 then - return -1 -endi -if $data50 != 12 then - return -1 -endi -if $data60 != 14 then - return -1 -endi - -sql select sum_double(f1) from tb1 interval (1h) order by ts desc; -if $rows != 4 then - return -1 -endi - -if $data00 != @21-03-25 10:00:00.000@ then - return -1 -endi -if $data01 != 14 then - return -1 -endi -if $data10 != @21-03-24 19:00:00.000@ then - return -1 -endi -if $data11 != 22 then - return -1 -endi -if $data20 != @21-03-23 19:00:00.000@ then - return -1 -endi -if $data21 != 18 then - return -1 -endi -if $data30 != @21-03-23 17:00:00.000@ then - return -1 -endi -if $data31 != 2 then - return -1 -endi - - -sql select add_one(f1) from tb1 limit 2; -if $rows != 2 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi - - -sql select sum_double(f1) from tb1 interval (1d) limit 2; -if $rows != 2 then - return -1 -endi - -if $data00 != @21-03-23 00:00:00.000@ then - return -1 -endi -if $data01 != 20 then - return -1 -endi -if $data10 != @21-03-24 00:00:00.000@ then - return -1 -endi -if $data11 != 22 then - return -1 -endi - - -sql_error select ts,sum_double(f1),f1 from tb1; -sql_error select add_one(f1),count(f1) from tb1; -sql_error select sum_double(f1),count(f1) from tb1; -sql_error select add_one(f1),top(f1,3) from tb1; -sql_error select add_one(f1) from tb1 interval(10a); - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/parser/udf_dll_stable.sim b/tests/script/tsim/parser/udf_dll_stable.sim deleted file mode 100644 index b8da57467e912ff27f4fbda7226c75e089f04808..0000000000000000000000000000000000000000 --- a/tests/script/tsim/parser/udf_dll_stable.sim +++ /dev/null @@ -1,1163 +0,0 @@ -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c walLevel -v 1 -system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 1 -system sh/exec.sh -n dnode1 -s start -system sh/prepare_udf.sh - -sleep 100 -sql connect -print ======================== dnode1 start - -sql create function add_one as '/tmp/add_one.so' outputtype int; -sql create aggregate function sum_double as '/tmp/sum_double.so' outputtype int; -sql show functions; -if $rows != 2 then - return -1 -endi - -sql create database db; -sql use db; -sql create stable stb1 (ts timestamp, f1 int, f2 bool, f3 binary(10)) tags(id1 int); -sql create table tb1 using stb1 tags(1); -sql insert into tb1 values ('2021-03-23 17:17:19.660', 1, true, 'tb1-1'); -sql insert into tb1 values ('2021-03-23 19:23:28.595', 2, false, 'tb1-2'); -sql insert into tb1 values ('2021-03-23 19:33:39.070', 3, true, 'tb1-3'); -sql insert into tb1 values ('2021-03-23 19:34:37.670', 4, false, 'tb1-4'); -sql insert into tb1 values ('2021-03-24 19:08:06.609', 5, true, 'tb1-5'); -sql insert into tb1 values ('2021-03-24 19:26:38.231', 6, false, 'tb1-6'); -sql insert into tb1 values ('2021-03-25 10:03:17.688', 7, true, 'tb1-7'); -sql create table tb2 using stb1 tags(2); -sql create table tb3 using stb1 tags(3); -sql create table tb4 using stb1 tags(4); -sql create table tb5 using stb1 tags(5); -sql create table tb6 using stb1 tags(6); -sql create table tb7 using stb1 tags(7); -sql create table tb8 using stb1 tags(8); -sql create table tb9 using stb1 tags(9); -sql insert into tb2 values ('2021-03-03 17:17:19.660', 1, true, 'tb2-1'); -sql insert into tb2 values ('2021-03-13 19:23:28.595', 2, false, 'tb2-2'); -sql insert into tb3 values ('2021-03-23 19:33:39.070', 3, true, 'tb3-1'); -sql insert into tb3 values ('2021-03-24 19:34:37.670', 4, false, 'tb3-2'); -sql insert into tb5 values ('2021-03-25 19:08:06.609', 1, true, 'tb5-1'); -sql insert into tb5 values ('2021-04-01 19:26:38.231', 2, false, 'tb5-2'); -sql insert into tb5 values ('2021-04-08 10:03:17.688', 3, true, 'tb5-3'); -sql insert into tb6 values ('2021-04-08 11:03:17.688', 1, true, 'tb6-1'); -sql insert into tb6 values ('2021-04-08 12:03:17.688', 2, true, 'tb6-2'); -sql insert into tb9 values ('2021-04-08 16:03:17.688', 4, true, 'tb9-1'); - -sql select add_one(f1) from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi -if $data20 != 4 then - return -1 -endi -if $data30 != 5 then - return -1 -endi -if $data40 != 6 then - return -1 -endi -if $data50 != 7 then - return -1 -endi -if $data60 != 8 then - return -1 -endi - - -sql select sum_double(f1) from tb1; -if $rows != 1 then - return -1 -endi - -if $data00 != 56 then - return -1 -endi - - -sql select ts,add_one(f1),f1 from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data02 != 1 then - return -1 -endi -if $data10 != @21-03-23 19:23:28.595@ then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data12 != 2 then - return -1 -endi -if $data20 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data22 != 3 then - return -1 -endi -if $data30 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data32 != 4 then - return -1 -endi -if $data40 != @21-03-24 19:08:06.609@ then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data42 != 5 then - return -1 -endi -if $data50 != @21-03-24 19:26:38.231@ then - return -1 -endi -if $data51 != 7 then - return -1 -endi -if $data52 != 6 then - return -1 -endi -if $data60 != @21-03-25 10:03:17.688@ then - return -1 -endi -if $data61 != 8 then - return -1 -endi -if $data62 != 7 then - return -1 -endi - - - - -sql select add_one(f1),add_one(f1) from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data20 != 4 then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data30 != 5 then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data40 != 6 then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data50 != 7 then - return -1 -endi -if $data51 != 7 then - return -1 -endi -if $data60 != 8 then - return -1 -endi -if $data61 != 8 then - return -1 -endi - - -sql select add_one(f1)+1 from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != 3.000000000 then - return -1 -endi -if $data10 != 4.000000000 then - return -1 -endi -if $data20 != 5.000000000 then - return -1 -endi -if $data30 != 6.000000000 then - return -1 -endi -if $data40 != 7.000000000 then - return -1 -endi -if $data50 != 8.000000000 then - return -1 -endi -if $data60 != 9.000000000 then - return -1 -endi - - -sql select sum_double(f1)+1 from tb1; -if $rows != 1 then - return -1 -endi - -if $data00 != 57.000000000 then - return -1 -endi - - -sql select add_one(f1)+1,f1 from tb1; -if $rows != 7 then - return -1 -endi - -if $data00 != 3.000000000 then - return -1 -endi -if $data01 != 1 then - return -1 -endi -if $data10 != 4.000000000 then - return -1 -endi -if $data11 != 2 then - return -1 -endi -if $data20 != 5.000000000 then - return -1 -endi -if $data21 != 3 then - return -1 -endi -if $data30 != 6.000000000 then - return -1 -endi -if $data31 != 4 then - return -1 -endi -if $data40 != 7.000000000 then - return -1 -endi -if $data41 != 5 then - return -1 -endi -if $data50 != 8.000000000 then - return -1 -endi -if $data51 != 6 then - return -1 -endi -if $data60 != 9.000000000 then - return -1 -endi -if $data61 != 7 then - return -1 -endi - - -sql select sum_double(f1) from tb1 interval (10a); -if $rows != 7 then - return -1 -endi - -if $data00 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 19:23:28.590@ then - return -1 -endi -if $data11 != 4 then - return -1 -endi -if $data20 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data21 != 6 then - return -1 -endi -if $data30 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data31 != 8 then - return -1 -endi -if $data40 != @21-03-24 19:08:06.600@ then - return -1 -endi -if $data41 != 10 then - return -1 -endi -if $data50 != @21-03-24 19:26:38.230@ then - return -1 -endi -if $data51 != 12 then - return -1 -endi -if $data60 != @21-03-25 10:03:17.680@ then - return -1 -endi -if $data61 != 14 then - return -1 -endi - -sql select ts,add_one(f1) from tb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000"; -if $rows != 6 then - return -1 -endi - -if $data00 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 19:23:28.595@ then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data20 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data30 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data40 != @21-03-24 19:08:06.609@ then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data50 != @21-03-24 19:26:38.231@ then - return -1 -endi -if $data51 != 7 then - return -1 -endi - -sql select sum_double(f1) from tb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000" interval (1h); -if $rows != 3 then - return -1 -endi - -if $data00 != @21-03-23 17:00:00.000@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 19:00:00.000@ then - return -1 -endi -if $data11 != 18 then - return -1 -endi -if $data20 != @21-03-24 19:00:00.000@ then - return -1 -endi -if $data21 != 22 then - return -1 -endi - - -sql select sum_double(f1) from tb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000" interval (1h) fill(value,999); -if $rows != 28 then - return -1 -endi - -sql_error select add_one(f1) from tb1 group by f1; - -sql select sum_double(f1) from tb1 group by f1; -if $rows != 7 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data10 != 4 then - return -1 -endi -if $data20 != 6 then - return -1 -endi -if $data30 != 8 then - return -1 -endi -if $data40 != 10 then - return -1 -endi -if $data50 != 12 then - return -1 -endi -if $data60 != 14 then - return -1 -endi - -sql select sum_double(f1) from tb1 interval (1h) order by ts desc; -if $rows != 4 then - return -1 -endi - -if $data00 != @21-03-25 10:00:00.000@ then - return -1 -endi -if $data01 != 14 then - return -1 -endi -if $data10 != @21-03-24 19:00:00.000@ then - return -1 -endi -if $data11 != 22 then - return -1 -endi -if $data20 != @21-03-23 19:00:00.000@ then - return -1 -endi -if $data21 != 18 then - return -1 -endi -if $data30 != @21-03-23 17:00:00.000@ then - return -1 -endi -if $data31 != 2 then - return -1 -endi - - -sql select add_one(f1) from tb1 limit 2; -if $rows != 2 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi - - -sql select sum_double(f1) from tb1 interval (1d) limit 2; -if $rows != 2 then - return -1 -endi - -if $data00 != @21-03-23 00:00:00.000@ then - return -1 -endi -if $data01 != 20 then - return -1 -endi -if $data10 != @21-03-24 00:00:00.000@ then - return -1 -endi -if $data11 != 22 then - return -1 -endi - - -sql_error select ts,sum_double(f1),f1 from tb1; -sql_error select add_one(f1),count(f1) from tb1; -sql_error select sum_double(f1),count(f1) from tb1; -sql_error select add_one(f1),top(f1,3) from tb1; -sql_error select add_one(f1) from tb1 interval(10a); - - -sql select add_one(f1) from stb1; -if $rows != 17 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi -if $data20 != 4 then - return -1 -endi -if $data30 != 5 then - return -1 -endi -if $data40 != 6 then - return -1 -endi -if $data50 != 7 then - return -1 -endi -if $data60 != 8 then - return -1 -endi -if $data70 != 2 then - return -1 -endi -if $data80 != 3 then - return -1 -endi -if $data90 != 4 then - return -1 -endi - - -sql select sum_double(f1) from stb1; -if $rows != 1 then - return -1 -endi - -if $data00 != 102 then - return -1 -endi - - -sql select ts,add_one(f1),f1 from stb1; -if $rows != 17 then - return -1 -endi - -if $data00 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data02 != 1 then - return -1 -endi -if $data10 != @21-03-23 19:23:28.595@ then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data12 != 2 then - return -1 -endi -if $data20 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data22 != 3 then - return -1 -endi -if $data30 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data32 != 4 then - return -1 -endi -if $data40 != @21-03-24 19:08:06.609@ then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data42 != 5 then - return -1 -endi -if $data50 != @21-03-24 19:26:38.231@ then - return -1 -endi -if $data51 != 7 then - return -1 -endi -if $data52 != 6 then - return -1 -endi -if $data60 != @21-03-25 10:03:17.688@ then - return -1 -endi -if $data61 != 8 then - return -1 -endi -if $data62 != 7 then - return -1 -endi - - - - -sql select add_one(f1),add_one(f1) from stb1; -if $rows != 17 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data20 != 4 then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data30 != 5 then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data40 != 6 then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data50 != 7 then - return -1 -endi -if $data51 != 7 then - return -1 -endi -if $data60 != 8 then - return -1 -endi -if $data61 != 8 then - return -1 -endi - -sql select add_one(f1)+1 from stb1; -if $rows != 17 then - return -1 -endi - -if $data00 != 3.000000000 then - return -1 -endi -if $data10 != 4.000000000 then - return -1 -endi -if $data20 != 5.000000000 then - return -1 -endi -if $data30 != 6.000000000 then - return -1 -endi -if $data40 != 7.000000000 then - return -1 -endi -if $data50 != 8.000000000 then - return -1 -endi -if $data60 != 9.000000000 then - return -1 -endi - - -sql select sum_double(f1)+1 from stb1; -if $rows != 1 then - return -1 -endi - -if $data00 != 103.000000000 then - return -1 -endi - - -sql select add_one(f1)+1,f1 from stb1; -if $rows != 17 then - return -1 -endi - -if $data00 != 3.000000000 then - return -1 -endi -if $data01 != 1 then - return -1 -endi -if $data10 != 4.000000000 then - return -1 -endi -if $data11 != 2 then - return -1 -endi -if $data20 != 5.000000000 then - return -1 -endi -if $data21 != 3 then - return -1 -endi -if $data30 != 6.000000000 then - return -1 -endi -if $data31 != 4 then - return -1 -endi -if $data40 != 7.000000000 then - return -1 -endi -if $data41 != 5 then - return -1 -endi -if $data50 != 8.000000000 then - return -1 -endi -if $data51 != 6 then - return -1 -endi -if $data60 != 9.000000000 then - return -1 -endi -if $data61 != 7 then - return -1 -endi - - -sql select sum_double(f1) from stb1 interval (10a); -if $rows != 16 then - return -1 -endi - -if $data00 != @21-03-03 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-13 19:23:28.590@ then - return -1 -endi -if $data11 != 4 then - return -1 -endi -if $data20 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data21 != 2 then - return -1 -endi -if $data30 != @21-03-23 19:23:28.590@ then - return -1 -endi -if $data31 != 4 then - return -1 -endi -if $data40 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data41 != 12 then - return -1 -endi -if $data50 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data51 != 8 then - return -1 -endi -if $data60 != @21-03-24 19:08:06.600@ then - return -1 -endi -if $data61 != 10 then - return -1 -endi -if $data70 != @21-03-24 19:26:38.230@ then - return -1 -endi -if $data71 != 12 then - return -1 -endi -if $data80 != @21-03-24 19:34:37.670@ then - return -1 -endi -if $data81 != 8 then - return -1 -endi -if $data90 != @21-03-25 10:03:17.680@ then - return -1 -endi -if $data91 != 14 then - return -1 -endi - - -sql select ts,add_one(f1) from stb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000"; -if $rows != 8 then - return -1 -endi - -if $data00 != @21-03-23 17:17:19.660@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 19:23:28.595@ then - return -1 -endi -if $data11 != 3 then - return -1 -endi -if $data20 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data30 != @21-03-23 19:34:37.670@ then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data40 != @21-03-24 19:08:06.609@ then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data50 != @21-03-24 19:26:38.231@ then - return -1 -endi -if $data51 != 7 then - return -1 -endi -if $data60 != @21-03-23 19:33:39.070@ then - return -1 -endi -if $data61 != 4 then - return -1 -endi -if $data70 != @21-03-24 19:34:37.670@ then - return -1 -endi -if $data71 != 5 then - return -1 -endi - -sql select sum_double(f1) from stb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000" interval (1h); -if $rows != 3 then - return -1 -endi - -if $data00 != @21-03-23 17:00:00.000@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 19:00:00.000@ then - return -1 -endi -if $data11 != 24 then - return -1 -endi -if $data20 != @21-03-24 19:00:00.000@ then - return -1 -endi -if $data21 != 30 then - return -1 -endi - - -sql select sum_double(f1) from stb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000" interval (1h) fill(value,999); -if $rows != 28 then - return -1 -endi -if $data00 != @21-03-23 17:00:00.000@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 18:00:00.000@ then - return -1 -endi -if $data11 != 999 then - return -1 -endi -if $data20 != @21-03-23 19:00:00.000@ then - return -1 -endi -if $data21 != 24 then - return -1 -endi - -sql_error select add_one(f1) from stb1 group by f1; - -sql select sum_double(f1) from stb1 group by f1; -if $rows != 7 then - return -1 -endi - -if $data00 != 8 then - return -1 -endi -if $data10 != 16 then - return -1 -endi -if $data20 != 18 then - return -1 -endi -if $data30 != 24 then - return -1 -endi -if $data40 != 10 then - return -1 -endi -if $data50 != 12 then - return -1 -endi -if $data60 != 14 then - return -1 -endi - -sql select sum_double(f1) from stb1 interval (1h) order by ts desc; -if $rows != 12 then - return -1 -endi - -if $data00 != @21-04-08 16:00:00.000@ then - return -1 -endi -if $data01 != 8 then - return -1 -endi -if $data10 != @21-04-08 12:00:00.000@ then - return -1 -endi -if $data11 != 4 then - return -1 -endi -if $data20 != @21-04-08 11:00:00.000@ then - return -1 -endi -if $data21 != 2 then - return -1 -endi -if $data30 != @21-04-08 10:00:00.000@ then - return -1 -endi -if $data31 != 6 then - return -1 -endi -if $data40 != @21-04-01 19:00:00.000@ then - return -1 -endi -if $data41 != 4 then - return -1 -endi -if $data50 != @21-03-25 19:00:00.000@ then - return -1 -endi -if $data51 != 2 then - return -1 -endi -if $data60 != @21-03-25 10:00:00.000@ then - return -1 -endi -if $data61 != 14 then - return -1 -endi -if $data70 != @21-03-24 19:00:00.000@ then - return -1 -endi -if $data71 != 30 then - return -1 -endi -if $data80 != @21-03-23 19:00:00.000@ then - return -1 -endi -if $data81 != 24 then - return -1 -endi -if $data90 != @21-03-23 17:00:00.000@ then - return -1 -endi -if $data91 != 2 then - return -1 -endi - - -sql select add_one(f1) from stb1 limit 2; -if $rows != 2 then - return -1 -endi - -if $data00 != 2 then - return -1 -endi -if $data10 != 3 then - return -1 -endi - - -sql select sum_double(f1) from stb1 interval (1d) limit 2; -if $rows != 2 then - return -1 -endi - -if $data00 != @21-03-03 00:00:00.000@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-13 00:00:00.000@ then - return -1 -endi -if $data11 != 4 then - return -1 -endi - -sql select sum_double(f1) from stb1 group by id1; - -if $rows != 6 then - return -1 -endi - -if $data00 != 56 then - return -1 -endi -if $data01 != 1 then - return -1 -endi -if $data10 != 6 then - return -1 -endi -if $data11 != 2 then - return -1 -endi -if $data20 != 14 then - return -1 -endi -if $data21 != 3 then - return -1 -endi -if $data30 != 12 then - return -1 -endi -if $data31 != 5 then - return -1 -endi -if $data40 != 6 then - return -1 -endi -if $data41 != 6 then - return -1 -endi -if $data50 != 8 then - return -1 -endi -if $data51 != 9 then - return -1 -endi - - -sql select sum_double(f1) from tb1 where ts>="2021-03-23 17:00:00.000" and ts<="2021-03-24 20:00:00.000" interval (1h) sliding (30m); -if $rows != 7 then - return -1 -endi - -if $data00 != @21-03-23 16:30:00.000@ then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data10 != @21-03-23 17:00:00.000@ then - return -1 -endi -if $data11 != 2 then - return -1 -endi -if $data20 != @21-03-23 18:30:00.000@ then - return -1 -endi -if $data21 != 4 then - return -1 -endi -if $data30 != @21-03-23 19:00:00.000@ then - return -1 -endi -if $data31 != 18 then - return -1 -endi -if $data40 != @21-03-23 19:30:00.000@ then - return -1 -endi -if $data41 != 14 then - return -1 -endi -if $data50 != @21-03-24 18:30:00.000@ then - return -1 -endi -if $data51 != 22 then - return -1 -endi -if $data60 != @21-03-24 19:00:00.000@ then - return -1 -endi -if $data61 != 22 then - return -1 -endi - - -system sh/exec.sh -n dnode1 -s stop -x SIGINT - - - - - - diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 2c4c111cd4fe76b7b8d3ee2bdd3a2bf9698e9f41..98ff077ba1323cb9c2c4cc48246fdb53f66beb1c 100755 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -62,7 +62,7 @@ python3 ./test.py -f 2-query/char_length.py -R python3 ./test.py -f 2-query/check_tsdb.py python3 ./test.py -f 2-query/check_tsdb.py -R -python3 ./test.py -f 1-insert/update_data.py +# jira python3 ./test.py -f 1-insert/update_data.py python3 ./test.py -f 1-insert/delete_data.py python3 ./test.py -f 2-query/db.py @@ -151,7 +151,7 @@ python3 ./test.py -f 2-query/max_partition.py python3 ./test.py -f 2-query/last_row.py python3 ./test.py -f 6-cluster/5dnode1mnode.py -python3 ./test.py -f 6-cluster/5dnode2mnode.py -N 5 -M 3 +#python3 ./test.py -f 6-cluster/5dnode2mnode.py -N 5 -M 3 #python3 ./test.py -f 6-cluster/5dnode3mnodeStop.py -N 5 -M 3 python3 ./test.py -f 6-cluster/5dnode3mnodeStopLoop.py -N 5 -M 3 # BUG python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py -N 5 -M 3 @@ -215,8 +215,8 @@ python3 ./test.py -f 7-tmq/tmqUdf.py # python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py # python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py -# python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py +# python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py #------------querPolicy 2----------- diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index a0adb7c7bcb753beb346ee6ff4a8359fb5355015..eefb0aa8b28f75a4d57a34b176d0ecb1a1d9bb2f 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -685,7 +685,7 @@ int32_t shellHorizontalPrintResult(TAOS_RES *tres, const char *sql) { uint64_t resShowMaxNum = UINT64_MAX; - if (shell.args.commands == NULL && shell.args.file[0] == 0 && !shellIsLimitQuery(sql) && !shellIsShowQuery(sql)) { + if (shell.args.commands == NULL && shell.args.file[0] == 0 && !shellIsLimitQuery(sql)) { resShowMaxNum = SHELL_DEFAULT_RES_SHOW_NUM; } @@ -706,8 +706,12 @@ int32_t shellHorizontalPrintResult(TAOS_RES *tres, const char *sql) { } else if (showMore) { printf("\r\n"); printf(" Notice: The result shows only the first %d rows.\r\n", SHELL_DEFAULT_RES_SHOW_NUM); - printf(" You can use the `LIMIT` clause to get fewer result to show.\r\n"); - printf(" Or use '>>' to redirect the whole set of the result to a specified file.\r\n"); + if (shellIsShowQuery(sql)) { + printf(" You can use '>>' to redirect the whole set of the result to a specified file.\r\n"); + } else { + printf(" You can use the `LIMIT` clause to get fewer result to show.\r\n"); + printf(" Or use '>>' to redirect the whole set of the result to a specified file.\r\n"); + } printf("\r\n"); printf(" You can use Ctrl+C to stop the underway fetching.\r\n"); printf("\r\n"); diff --git a/tools/taos-tools b/tools/taos-tools index f84cb6e51556d8030585128c2b252aa2a6453328..69b558ccbfe54a4407fe23eeae2e67c540f59e55 160000 --- a/tools/taos-tools +++ b/tools/taos-tools @@ -1 +1 @@ -Subproject commit f84cb6e51556d8030585128c2b252aa2a6453328 +Subproject commit 69b558ccbfe54a4407fe23eeae2e67c540f59e55