Skip to content

Commit 7294f53

Browse files
merge: from 3.3.8 to main #34381
2 parents 6d9a1c5 + 22b1dac commit 7294f53

File tree

23 files changed

+478
-123
lines changed

23 files changed

+478
-123
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Activate TDengine TSDB-Enterprise
3+
---
4+
5+
This document describes how to activate a TDengine TSDB-Enterprise license.
6+
7+
## Prerequisites
8+
9+
- Contact TDengine or an authorized reseller to purchase TDengine TSDB-Enterprise.
10+
- Install and deploy TDengine TSDB-Enterprise on the actual machines that you intend to license.
11+
12+
## Procedure
13+
14+
1. Run the following SQL statement to obtain required information for your deployment:
15+
16+
```sql
17+
SHOW CLUSTER MACHINES;
18+
```
19+
20+
Sample output is displayed as follows:
21+
22+
```text
23+
id | dnode_num | machine | version |
24+
=======================================================================
25+
3609687158593567855 | 1 | Bdw+qvOCyvAOc3SS5GIyEOIi | 3.3.6.13 |
26+
```
27+
28+
1. Copy the entire output of the statement and send it to your account representative or authorized reseller. Also include the following information:
29+
30+
- The name of your company
31+
- The name and email address of the primary technical contact
32+
- The intended environment (production, PoC, or testing)
33+
- The desired term of the license
34+
35+
Your account representative or reseller will send you an activation code that you use to activate your TDengine TSDB-Enterprise deployment.
36+
37+
1. Once you receive your activation code, log in to TDengine TSDB Explorer. The default URL is `http://127.0.0.1:6060`.
38+
39+
1. From the main menu on the left, select **Management**. Open the **License** tab and click **Activate License**.
40+
41+
1. Enter your activation code and click **Confirm**.
42+
43+
Your TDengine TSDB-Enterprise deployment is now licensed. You can view the details of your license, including expiration date, on the **License** tab.

docs/en/14-reference/03-taos-sql/40-tmq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ Displays the allocation relationship and consumption information between consume
116116

117117
## MQTT Data Subscription
118118

119-
TDengine 3.3.7.0 includes MQTT-based data subscription, allowing data to be subscribed to directly via an MQTT client. For details, refer to the MQTT Data Subscription section.
119+
You can subscribe to data directly via an MQTT client. For details, refer to [MQTT Data Subscription](../../../advanced-features/data-subscription/mqtt-data-sub/).

docs/en/14-reference/09-error-code.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Below are the business error codes for each module.
114114
| 0x8000013C | Invalid disk id | Invalid disk id | Check users whether the mounted disk is invalid or use the parameter diskIDCheckEnabled to skip the disk check. |
115115
| 0x8000013D | Decimal value overflow | Decimal value overflow | Check query expression and decimal values |
116116
| 0x8000013E | Division by zero error | Division by zero | Check division expression |
117+
| 0x8000013F | Decimal value parse error | Decimal value parse error | Preserve the scene and logs, report issue on github |
117118
| 0x80000140 | Edition not compatible | Edition incompatibility between nodes | Check editions(enterprise or community) of all nodes (including server and client), ensure node editions are consistent or compatible |
118119
| 0x80000141 | Invalid signature | Message signature is invalid or mismatch | Check if client and server are using the same signature algorithm |
119120

docs/zh/14-reference/09-error-code.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ TSDB 错误码包括 taosc 客户端和服务端,所有语言的连接器无
112112
| 0x8000013C | Invalid disk id | 不合法的 disk id | 建议用户检查挂载磁盘是否失效或者使用参数 diskIDCheckEnabled 来跳过磁盘检查 |
113113
| 0x8000013D | Decimal value overflow | Decimal 计算溢出 | 检查计算表达式和参数值是否计算结果导致类型溢出 |
114114
| 0x8000013E | Division by zero error | Division by zero | 检查除法操作是否除以 0 |
115+
| 0x8000013F | Decimal value parse error | Decimal 解析错误 | 保留现场和日志,github 上报 issue |
115116
| 0x80000140 | Edition not compatible | 社区版/企业版不匹配 | 检查各节点(包括服务端和客户端)是否有社区版和企业版混用的情况,确保都是企业版或都是社区版 |
116117
| 0x80000141 | Invalid signature | 消息签名无效或不正确 | 检查客户端和服务端是否使用了相同的签名算法 |
117118

include/util/taoserror.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ int32_t taosGetErrSize();
170170
#define TSDB_CODE_INVALID_DISK_ID TAOS_DEF_ERROR_CODE(0, 0x013C)
171171
#define TSDB_CODE_DECIMAL_OVERFLOW TAOS_DEF_ERROR_CODE(0, 0x013D)
172172
#define TSDB_CODE_DIVISION_BY_ZERO TAOS_DEF_ERROR_CODE(0, 0x013E)
173+
#define TSDB_CODE_DECIMAL_PARSE_ERROR TAOS_DEF_ERROR_CODE(0, 0x013F)
173174

174175
#define TSDB_CODE_EDITION_NOT_COMPATIBLE TAOS_DEF_ERROR_CODE(0, 0x0140) // internal
175176
#define TSDB_CODE_INVALID_SIGNATURE TAOS_DEF_ERROR_CODE(0, 0x0141) // internal

source/client/src/clientTmq.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3703,7 +3703,8 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_
37033703

37043704
int32_t msgSize = tSerializeSMqSeekReq(NULL, 0, &req);
37053705
if (msgSize < 0) {
3706-
return TSDB_CODE_PAR_INTERNAL_ERROR;
3706+
tqErrorC("%s get invalid msg at line %d", __func__, __LINE__);
3707+
return TSDB_CODE_TMQ_INVALID_MSG;
37073708
}
37083709

37093710
char* msg = taosMemoryCalloc(1, msgSize);
@@ -3712,8 +3713,9 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_
37123713
}
37133714

37143715
if (tSerializeSMqSeekReq(msg, msgSize, &req) < 0) {
3716+
tqErrorC("%s serialize seek req failed at line %d", __func__, __LINE__);
37153717
taosMemoryFree(msg);
3716-
return TSDB_CODE_PAR_INTERNAL_ERROR;
3718+
return TSDB_CODE_TMQ_INVALID_MSG;
37173719
}
37183720

37193721
SMsgSendInfo* sendInfo = taosMemoryCalloc(1, sizeof(SMsgSendInfo));

source/common/src/tdataformat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5199,7 +5199,7 @@ int32_t tRowBuildFromBind2(SBindInfo2 *infos, int32_t numOfInfos, SSHashObj *par
51995199
if (infos[iInfo].type == TSDB_DATA_TYPE_DECIMAL) {
52005200
if (!pSchemaExt) {
52015201
uError("stmt2 decimal64 type without ext schema info, cannot parse decimal values");
5202-
code = TSDB_CODE_PAR_INTERNAL_ERROR;
5202+
code = TSDB_CODE_DECIMAL_PARSE_ERROR;
52035203
goto _exit;
52045204
}
52055205
uint8_t precision = 0, scale = 0;
@@ -5221,7 +5221,7 @@ int32_t tRowBuildFromBind2(SBindInfo2 *infos, int32_t numOfInfos, SSHashObj *par
52215221
} else if (infos[iInfo].type == TSDB_DATA_TYPE_DECIMAL64) {
52225222
if (!pSchemaExt) {
52235223
uError("stmt2 decimal128 type without ext schema info, cannot parse decimal values");
5224-
code = TSDB_CODE_PAR_INTERNAL_ERROR;
5224+
code = TSDB_CODE_DECIMAL_PARSE_ERROR;
52255225
goto _exit;
52265226
}
52275227
uint8_t precision = 0, scale = 0;

source/dnode/mnode/impl/src/mndDnode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ static int32_t mndProcessCreateEncryptKeyReq(SRpcMsg *pReq) {
16171617
tFreeSMCfgDnodeReq(&cfgReq);
16181618
return mndProcessCreateEncryptKeyReqImpl(pReq, cfgReq.dnodeId, &dcfgReq);
16191619
} else {
1620-
code = TSDB_CODE_PAR_INTERNAL_ERROR;
1620+
code = TSDB_CODE_MND_INTERNAL_ERROR;
16211621
tFreeSMCfgDnodeReq(&cfgReq);
16221622
TAOS_RETURN(code);
16231623
}

source/dnode/mnode/impl/src/mndSubscribe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ static int32_t assignVgroups(SMqRebOutputObj *pOutput, SHashObj *pHash, int32_t
696696

697697
if (pAssignIter != NULL) {
698698
mError("tmq rebalancesub:%s assign iter is not NULL, never should reach here", pOutput->pSub->key);
699-
code = TSDB_CODE_PAR_INTERNAL_ERROR;
699+
code = TSDB_CODE_MND_INTERNAL_ERROR;
700700
goto END;
701701
}
702702
while (1) {

source/libs/command/src/command.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ static void appendColumnFields(char* buf, int32_t* len, STableCfg* pCfg) {
652652

653653
static void appendColRefFields(char* buf, int32_t* len, STableCfg* pCfg) {
654654
char expandName[(SHOW_CREATE_TB_RESULT_FIELD1_LEN << 1) + 1] = {0};
655+
bool firstRef = true;
655656
for (int32_t i = 1; i < pCfg->numOfColumns; ++i) {
656657
SSchema* pSchema = pCfg->pSchemas + i;
657658
SColRef* pRef = pCfg->pColRefs + i;
@@ -669,8 +670,11 @@ static void appendColRefFields(char* buf, int32_t* len, STableCfg* pCfg) {
669670
}
670671

671672
*len += tsnprintf(buf + VARSTR_HEADER_SIZE + *len, SHOW_CREATE_TB_RESULT_FIELD2_LEN - (VARSTR_HEADER_SIZE + *len),
672-
"%s`%s` %s", ((i > 1) ? ", " : ""), expandIdentifier(pSchema->name, expandName), type);
673-
673+
"%s`%s` %s", (!firstRef ? ", " : " ("), expandIdentifier(pSchema->name, expandName), type);
674+
firstRef = false;
675+
}
676+
if (!firstRef) {
677+
*len += tsnprintf(buf + VARSTR_HEADER_SIZE + *len, SHOW_CREATE_TB_RESULT_FIELD2_LEN - (VARSTR_HEADER_SIZE + *len), ")");
674678
}
675679
}
676680

@@ -939,10 +943,10 @@ static int32_t setCreateTBResultIntoDataBlock(SSDataBlock* pBlock, SDbCfgInfo* p
939943
snprintf(buf2 + VARSTR_HEADER_SIZE + len, SHOW_CREATE_TB_RESULT_FIELD2_LEN - (VARSTR_HEADER_SIZE + len), ")");
940944
} else if (TSDB_VIRTUAL_CHILD_TABLE == pCfg->tableType) {
941945
len += tsnprintf(buf2 + VARSTR_HEADER_SIZE, SHOW_CREATE_TB_RESULT_FIELD2_LEN - VARSTR_HEADER_SIZE,
942-
"CREATE VTABLE `%s` (", expandIdentifier(tbName, buf1));
946+
"CREATE VTABLE `%s`", expandIdentifier(tbName, buf1));
943947
appendColRefFields(buf2, &len, pCfg);
944948
len += snprintf(buf2 + VARSTR_HEADER_SIZE + len, SHOW_CREATE_TB_RESULT_FIELD2_LEN - (VARSTR_HEADER_SIZE + len),
945-
") USING `%s` (", expandIdentifier(pCfg->stbName, buf1));
949+
" USING `%s` (", expandIdentifier(pCfg->stbName, buf1));
946950
appendTagNameFields(buf2, &len, pCfg);
947951
len += tsnprintf(buf2 + VARSTR_HEADER_SIZE + len, SHOW_CREATE_TB_RESULT_FIELD2_LEN - (VARSTR_HEADER_SIZE + len),
948952
") TAGS (");

0 commit comments

Comments
 (0)