diff --git a/include/libs/qworker/qworker.h b/include/libs/qworker/qworker.h index 2be0561ce7940e2c17dd49d71f62486d80538fc0..60ed94d4de5a9c43dc64ba2041073eb67889608e 100644 --- a/include/libs/qworker/qworker.h +++ b/include/libs/qworker/qworker.h @@ -106,6 +106,8 @@ int32_t qWorkerProcessLocalQuery(void *pMgmt, uint64_t sId, uint64_t qId, uint64 int32_t qWorkerProcessLocalFetch(void *pMgmt, uint64_t sId, uint64_t qId, uint64_t tId, int64_t rId, int32_t eId, void **pRsp, SArray *explainRes); +int32_t qWorkerDbgEnableDebug(char *option); + #ifdef __cplusplus } #endif diff --git a/include/util/tdef.h b/include/util/tdef.h index 85c89744ed88fdf27adb2795baf70028238906b6..ddd47edc02519902043a560beaee52020728c120 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -316,10 +316,10 @@ typedef enum ELogicConditionType { #define TSDB_MAX_KEEP_NS (365 * 292 * 1440) // data in db to be reserved. #define TSDB_DEFAULT_KEEP (3650 * 1440) // ten years #define TSDB_MIN_MINROWS_FBLOCK 10 -#define TSDB_MAX_MINROWS_FBLOCK 1000 +#define TSDB_MAX_MINROWS_FBLOCK 1000000 #define TSDB_DEFAULT_MINROWS_FBLOCK 100 #define TSDB_MIN_MAXROWS_FBLOCK 200 -#define TSDB_MAX_MAXROWS_FBLOCK 10000 +#define TSDB_MAX_MAXROWS_FBLOCK 10000000 #define TSDB_DEFAULT_MAXROWS_FBLOCK 4096 #define TSDB_MIN_FSYNC_PERIOD 0 #define TSDB_MAX_FSYNC_PERIOD 180000 // millisecond diff --git a/source/libs/catalog/src/ctgDbg.c b/source/libs/catalog/src/ctgDbg.c index 6b870232c74bdb09dfd90bbb95a9cae8954f23da..5b17b548ccd58c03e2c3922b555a14340d5880fa 100644 --- a/source/libs/catalog/src/ctgDbg.c +++ b/source/libs/catalog/src/ctgDbg.c @@ -21,6 +21,8 @@ extern SCatalogMgmt gCtgMgmt; SCtgDebug gCTGDebug = {0}; +#if 0 + void ctgdUserCallback(SMetaData *pResult, void *param, int32_t code) { taosMemoryFree(param); @@ -224,6 +226,7 @@ _return: CTG_RET(code); } +#endif int32_t ctgdEnableDebug(char *option, bool enable) { if (0 == strcasecmp(option, "lock")) { diff --git a/source/libs/catalog/src/ctgUtil.c b/source/libs/catalog/src/ctgUtil.c index cd9380778b598080405ca569672e0c7b27d5fc72..9b013c2892d20a39d2be80dedb5c12d221c20425 100644 --- a/source/libs/catalog/src/ctgUtil.c +++ b/source/libs/catalog/src/ctgUtil.c @@ -1330,6 +1330,7 @@ static void* ctgCloneDnodeList(void* pSrc) { return taosArrayDup((const SArray*) static void ctgFreeDnodeList(void* p) { taosArrayDestroy((SArray*)((SMetaRes*)p)->pRes); } +#if 0 static int32_t ctgCloneMetaDataArray(SArray* pSrc, __array_item_dup_fn_t copyFunc, SArray** pDst) { if (NULL == pSrc) { return TSDB_CODE_SUCCESS; @@ -1421,3 +1422,5 @@ void catalogFreeMetaData(SMetaData* pData) { taosMemoryFreeClear(pData->pSvrVer); taosMemoryFree(pData); } +#endif + diff --git a/source/libs/qworker/src/qwDbg.c b/source/libs/qworker/src/qwDbg.c index 0ab501ddd5abe806f62ef611900df1455b716e9f..b8d5d2e6eee3d76f96b458afd6a4043a4e5e685b 100644 --- a/source/libs/qworker/src/qwDbg.c +++ b/source/libs/qworker/src/qwDbg.c @@ -271,7 +271,7 @@ void qwDbgSimulateDead(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *rsped) { } } -int32_t qwDbgEnableDebug(char *option) { +int32_t qWorkerDbgEnableDebug(char *option) { if (0 == strcasecmp(option, "lock")) { gQWDebug.lockEnable = true; qError("qw lock debug enabled"); diff --git a/tests/script/tsim/query/explain.sim b/tests/script/tsim/query/explain.sim index eb6b102bd9a8d85352dc1312d906fcbabb22b960..2a8f07178804a166fc9e4c0e2163840825bd4459 100644 --- a/tests/script/tsim/query/explain.sim +++ b/tests/script/tsim/query/explain.sim @@ -4,7 +4,7 @@ system sh/exec.sh -n dnode1 -s start sql connect print ======== step1 -sql create database db1 vgroups 3; +sql create database db1 vgroups 3 cachesize 10 cachemodel 'both'; sql use db1; sql select * from information_schema.ins_databases; sql create stable st1 (ts timestamp, f1 int, f2 binary(200)) tags(t1 int); @@ -60,6 +60,15 @@ sql explain verbose true select * from information_schema.ins_stables where db_n sql explain verbose true select st1.f1 from st1 join st2 on st1.ts=st2.ts and st1.f1 > 0; sql explain verbose true insert into t1(ts) select st1.f1 from st1 join st2 on st1.ts=st2.ts and st1.f1 > 0; sql explain verbose true insert into t1(ts, t1) select _wstart, count(*) from st1 interval(10s); +sql explain verbose true select distinct tbname, table_name from information_schema.ins_tables; +sql explain verbose true select diff(f1) as f11 from tb1 order by f11; +sql explain verbose true select count(*) from st1 where ts > now - 3m and ts < now interval(10s) fill(linear); +sql explain verbose true select count(*) from st1 partition by tbname; +sql explain verbose true select count(*) from information_schema.ins_tables group by stable_name; +sql explain verbose true select last(*) from st1; +sql explain verbose true select last_row(*) from st1; +sql explain verbose true select interp(f1) from tb1 where ts > now - 3m and ts < now range(now-3m,now) every(1m) fill(prev); +sql explain verbose true select _wstart, _wend, count(*) from tb1 EVENT_WINDOW start with f1 > 0 end with f1 < 10; print ======== step4 sql explain analyze select ts from st1 where -2; @@ -96,6 +105,13 @@ sql explain analyze verbose true select * from information_schema.ins_stables wh sql explain analyze verbose true select * from (select min(f1),count(*) a from st1 where f1 > 0) where a < 0; sql explain analyze verbose true select count(f1) from st1 group by tbname; sql explain analyze verbose true select st1.f1 from st1 join st2 on st1.ts=st2.ts and st1.f1 > 0; +sql explain analyze verbose true select diff(f1) as f11 from tb1 order by f11; +sql explain analyze verbose true select count(*) from st1 where ts > now - 3m and ts < now interval(10s) fill(linear); +sql explain analyze verbose true select count(*) from information_schema.ins_tables group by stable_name; +sql explain analyze verbose true select last(*) from st1; +sql explain analyze verbose true select last_row(*) from st1; +sql explain analyze verbose true select interp(f1) from tb1 where ts > now - 3m and ts < now range(now-3m,now) every(1m) fill(prev); +sql explain analyze verbose true select _wstart, _wend, count(*) from tb1 EVENT_WINDOW start with f1 > 0 end with f1 < 10; #not pass case #sql explain verbose true select count(*),sum(f1) as aa from tb1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' order by aa; diff --git a/tests/script/tsim/show/basic.sim b/tests/script/tsim/show/basic.sim index cae7a66589bac72c352ed855902f3b23bb798046..8990e492fa9aa3805cc8427827484958a7fc4aaf 100644 --- a/tests/script/tsim/show/basic.sim +++ b/tests/script/tsim/show/basic.sim @@ -244,5 +244,15 @@ if $rows <= 0 then return -1 endi +sql show cluster alive; +if $rows <= 0 then + return -1 +endi + +sql show db.alive; +if $rows <= 0 then + return -1 +endi + system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT