Skip to content

Commit 57371d0

Browse files
Merge branch 'main' into merge/mainto3.0
2 parents b98f6f9 + ee7c9c3 commit 57371d0

43 files changed

Lines changed: 1707 additions & 209 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmake/define.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,16 @@ IF(TD_WINDOWS)
145145
# /Zi : generate a separate PDB file (previously /Zi- which disabled it entirely).
146146
# The PDB is NOT shipped to the user but must be archived internally per version
147147
# so that crash dumps from the field can be symbolicated with WinDbg / VS.
148-
SET(COMMON_FLAGS "/W3 /D_WIN32 /DWIN32 /Zi /O2 /GL /MD")
148+
IF(${BUILD_SANITIZER})
149+
MESSAGE("${Green} will build with AddressSanitizer (MSVC ASan)! ${ColourReset}")
150+
# /fsanitize=address: MSVC ASan (incompatible with /GL and /O2)
151+
# _DISABLE_VECTOR_ANNOTATION/_DISABLE_STRING_ANNOTATION: suppress STL ASan
152+
# annotations to avoid LNK2038 mismatch with pre-built libs (e.g. rocksdb)
153+
# that were compiled without /fsanitize=address.
154+
SET(COMMON_FLAGS "/W3 /D_WIN32 /DWIN32 /Zi /O1 /MD /fsanitize=address /D_DISABLE_VECTOR_ANNOTATION=1 /D_DISABLE_STRING_ANNOTATION=1")
155+
ELSE()
156+
SET(COMMON_FLAGS "/W3 /D_WIN32 /DWIN32 /Zi /O2 /GL /MD")
157+
ENDIF()
149158
ELSE()
150159
MESSAGE("${Green} will build Debug version! ${ColourReset}")
151160
# NOTE: let cmake to choose default compile options

docs/en/06-advanced/01-subscription/01-topic.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ CREATE TOPIC [IF NOT EXISTS] topic_name as subquery;
3131
This SQL query subscribes to data using a SELECT statement (for example, SELECT * or SELECT ts, c1), and may include filter conditions and scalar function calculations. However, aggregate functions and time-window aggregations are not supported.
3232

3333
1. Once this type of topic is created, the structure of the subscribed data is fixed.
34-
2. Columns or tags that are subscribed to or referenced in calculations cannot be deleted (`ALTER TABLE DROP`) or modified (`ALTER TABLE MODIFY`). From 3.4.0.0, you can modify and delete, but you need to reload the topic.
35-
3. If the table schema changes, any newly added columns will not appear in the subscription result.
36-
4. For SELECT \*, the subscription expands to include all columns present at creation time. For subtables and normal tables, these are data columns; for supertables, they include both data and tag columns.
37-
5. Query subscription on virtual tables is not supported.
34+
2. Columns or tags that are subscribed to or referenced in calculations cannot be deleted (`ALTER TABLE DROP`) or modified (`ALTER TABLE MODIFY`). From 3.4.0.0, you can modify or delete or add, but you need to execute the command of "reload topic".
35+
3. For SELECT \*, the subscription expands to include all columns present at creation time. For subtables and normal tables, these are data columns; for supertables, they include both data and tag columns.
36+
4. Query subscription on virtual tables is not supported.
37+
5. The super table, sub-table, and regular table within the subquery can be deleted. After deletion, the subscribed data becomes empty. If the table is recreated after deletion, the subscribed data remains empty because the table ID has changed. If you want to subscribe to the new table data, you can reload the topic using the reload topic syntax
3838

3939
For example, if you need to subscribe to all smart meter records where the voltage is greater than 200, and only return the timestamp, current, and voltage (excluding the phase), you can create a topic named `power_topic` with the following SQL statement:
4040

@@ -97,7 +97,7 @@ SHOW TOPICS;
9797
RELOAD TOPIC IF EXISTS topic_name as subquery;
9898
```
9999

100-
1. This syntax is supported since version 3.3.9 and is used to reload topics. It primarily addresses issues where the output results do not take effect after deleting or adding columns and tags in queries involving topic changes or tag lengths, as well as when selecting * to query subscriptions.
100+
1. This syntax is supported since version 3.4.0 and is used to reload topics. It primarily addresses issues where the output results do not take effect after deleting or adding columns and tags in queries involving topic changes or tag lengths, as well as when selecting * to query subscriptions.
101101
2. When it is necessary to change the schema of the subscription table structure, first stop consuming, then make the change, execute "reload topic", and then restart the subscription.
102102

103103
The above SQL statement displays information about all topics in the current database.

docs/en/08-operation/16-security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ auditLevel = 3 // AUDIT_LEVEL_DATABASE
199199
| recalc stream | recalcStream | streamName | recalcName | SQL |
200200
| create topic | createTopic | topic's DB | name of the created topic | SQL |
201201
| drop topic | dropTopic | topic's DB | name of the deleted topic | SQL |
202-
| reload topic | reloadTopic | NULL | name of the deleted topic | SQL |
202+
| reload topic | reloadTopic | topic's DB | name of the topic | SQL |
203203
| create Rsma | createRsma | Rsma name | NULL | SQL |
204204
| alter Rsma | alterRsma | Rsma name | Table name | SQL |
205205
| drop Rsma | dropRsma | Rsma name | NULL | SQL |

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ CREATE TOPIC [IF NOT EXISTS] topic_name as subquery
2121
Subscribe through a `SELECT` statement (including `SELECT *`, or specific query subscriptions like `SELECT ts, c1`, which can include conditional filtering and scalar function calculations, but do not support aggregate functions or time window aggregation). It is important to note:
2222

2323
- Once this type of TOPIC is created, the structure of the subscribed data is fixed.
24-
- Columns or tags that are subscribed to or used for calculations cannot be deleted (`ALTER table DROP`) or modified (`ALTER table MODIFY`). From 3.4.0.0, you can modify and delete, but you need to reload the topic.
25-
- If there are changes to the table structure, new columns will not appear in the results.
24+
- Columns or tags that are subscribed to or used for calculations cannot be deleted (`ALTER table DROP`) or modified (`ALTER table MODIFY`). From 3.4.0.0, you can modify or delete or add, but you need to execute the command of "reload topic".
2625
- For `select *`, the subscription expands to include all columns at the time of creation (data columns for subtables and basic tables, data columns plus tag columns for supertables).
2726
- Query subscription on virtual tables is not supported.
27+
- The super table, sub-table, and regular table within the subquery can be deleted. After deletion, the subscribed data becomes empty. If the table is recreated after deletion, the subscribed data remains empty because the table ID has changed. If you want to subscribe to the new table data, you can reload the topic using the reload topic syntax
2828

2929
### Supertable topic
3030

@@ -81,7 +81,7 @@ SHOW TOPICS;
8181
RELOAD TOPIC IF EXISTS topic_name as subquery;
8282
```
8383

84-
- This syntax is supported since version 3.3.9 and is used to reload topics. It primarily addresses issues where the output results do not take effect after deleting or adding columns and tags in queries involving topic changes or tag lengths, as well as when selecting * to query subscriptions.
84+
- This syntax is supported since version 3.4.0 and is used to reload topics. It primarily addresses issues where the output results do not take effect after deleting or adding columns and tags in queries involving topic changes or tag lengths, as well as when selecting * to query subscriptions.
8585
- When it is necessary to change the schema of the subscription table structure, first stop consuming, then make the change, execute "reload topic", and then restart the subscription.
8686

8787
Displays information about all topics in the current database.

docs/en/14-reference/05-connector/40-csharp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ For error code information please refer to [Error Codes](../09-error-code.md)
7272
| JSON | byte[] |
7373
| VARBINARY | byte[] |
7474
| GEOMETRY | byte[] |
75+
| BLOB | byte[] |
7576
| DECIMAL | decimal |
7677

7778
**Note**:
7879

7980
- JSON type is only supported in tags.
81+
- BLOB type is not supported as a tag column and does not support stmt parameterized query binding.
8082
- The GEOMETRY type is binary data in little endian byte order, conforming to the WKB standard. For more details, please refer to [Data Types](../03-taos-sql/01-datatype.md)
8183
For WKB standard, please refer to [Well-Known Binary (WKB)](https://libgeos.org/specifications/wkb/)
8284
- The DECIMAL type in C# is represented using the `decimal` type, which supports high-precision decimal numbers.

docs/zh/06-advanced/01-subscription/01-topic.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ CREATE TOPIC [IF NOT EXISTS] topic_name as subquery
2727
该 SQL 通过 SELECT 语句订阅(包括 SELECT *,或 SELECT ts, c1 等指定查询订阅,可以带条件过滤、标量函数计算,但不支持聚合函数、不支持时间窗口聚合)。需要注意的是:
2828

2929
1. 该类型 TOPIC 一旦创建则订阅数据的结构确定。
30-
2. 被订阅或用于计算的列或标签不可被删除(ALTER table DROP)、修改(ALTER table MODIFY)。(从 3.4.0.0 开始,可以修改,删除,但是需要重新 reload topic)。
31-
3. 若发生表结构变更,新增的列不出现在结果中
32-
4. 对于 select *,则订阅展开为创建时所有的列(子表、普通表为数据列,超级表为数据列加标签列)
33-
5. 不支持虚拟表的查询订阅
30+
2. 被订阅或用于计算的列或标签不可被删除(ALTER table DROP)、修改(ALTER table MODIFY)。(从 3.4.0.0 开始,可以修改,删除,增加,但是需要重新 reload topic)。
31+
3. 对于 select *,则订阅展开为创建时所有的列(子表、普通表为数据列,超级表为数据列加标签列)
32+
4. 不支持虚拟表的查询订阅
33+
5. subquery 里的超级表,子表,普通表可以被删除,删除后,订阅的数据为空。如果删除后重新建,订阅的数据仍然为空,因为表的 id 变了。如果想订阅到新的表数据,可以通过 reload topic 语法重新加载 topic 即可
3434

3535
假设需要订阅所有智能电表中电压值大于 200 的数据,且仅仅返回时间戳、电流、电压 3 个采集量(不返回相位),那么可以通过下面的 SQL 创建 power_topic 这个主题。
3636

@@ -90,7 +90,7 @@ SHOW TOPICS;
9090
RELOAD TOPIC IF EXISTS topic_name as subquery;
9191
```
9292

93-
1. 该语法从 3.3.9 版本开始支持,用于重新加载主题,主要解决查询主题里变更列或 tag 长度,以及 select * 查询订阅时,删除增加列和 tag 后,输出结果不生效问题。
93+
1. 该语法从 3.4.0 版本开始支持,用于重新加载主题,主要解决查询主题里变更列或 tag 长度,以及 select * 查询订阅时,删除增加列和 tag 后,输出结果不生效问题。
9494
2. 需要变更订阅表结构的 schema 时,先停止消费,然后变更,然后执行 reload topic,接着重新开始订阅即可。
9595

9696
上面的 SQL 会显示当前数据库下的所有主题的信息。

docs/zh/08-operation/16-security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ auditLevel = 3 // AUDIT_LEVEL_DATABASE
193193
| recalc stream | recalcStream | streamName | recalcName | SQL |
194194
| create topic | createTopic | topic 所在 DB | 创建的 topic 名字 | SQL |
195195
| drop topic | dropTopic | topic 所在 DB | 删除的 topic 名字 | SQL |
196-
| reload topic | reloadTopic | NULL | 删除的 topic 名字 | SQL |
196+
| reload topic | reloadTopic | topic 所在 DB | topic 名字 | SQL |
197197
| create Rsma | createRsma | Rsma name | NULL | SQL |
198198
| alter Rsma | alterRsma | Rsma name | Table name | SQL |
199199
| drop Rsma | dropRsma | Rsma name | NULL | SQL |

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ CREATE TOPIC [IF NOT EXISTS] topic_name as subquery
2323
通过 `SELECT` 语句订阅(包括 `SELECT *``SELECT ts, c1` 等指定查询订阅,可以带条件过滤、标量函数计算,但不支持聚合函数、不支持时间窗口聚合)。需要注意的是:
2424

2525
- 该类型 TOPIC 一旦创建则订阅数据的结构确定。
26-
- 被订阅或用于计算的列或标签不可被删除(`ALTER table DROP`)、修改(`ALTER table MODIFY`)。(从 3.4.0.0 开始,可以修改,删除,但是需要重新 reload topic)。
27-
- 若发生表结构变更,新增的列不出现在结果中。
26+
- 被订阅或用于计算的列或标签不可被删除(`ALTER table DROP`)、修改(`ALTER table MODIFY`)。(从 3.4.0.0 开始,可以修改,删除,增加,但是需要重新 reload topic)。
2827
- 对于 select \*,则订阅展开为创建时所有的列(子表、普通表为数据列,超级表为数据列加标签列)。
2928
- 不支持虚拟表的查询订阅。
29+
- subquery 里的超级表,子表,普通表可以被删除,删除后,订阅的数据为空。如果删除后重新建,订阅的数据仍然为空,因为表的 id 变了。如果想订阅到新的表数据,可以通过 reload topic 语法重新加载 topic 即可。
3030

3131
### 超级表 topic
3232

@@ -83,7 +83,7 @@ SHOW TOPICS;
8383
RELOAD TOPIC IF EXISTS topic_name as subquery;
8484
```
8585

86-
1. 该语法从 3.3.9 版本开始支持,用于重新加载主题,主要解决查询主题里变更列或 tag 长度,以及 select * 查询订阅时,删除增加列和 tag 后,输出结果不生效问题。
86+
1. 该语法从 3.4.0 版本开始支持,用于重新加载主题,主要解决查询主题里变更列或 tag 长度,以及 select * 查询订阅时,删除增加列和 tag 后,输出结果不生效问题。
8787
2. 需要变更订阅表结构的 schema 时,先停止消费,然后变更,然后执行 reload topic,接着重新开始订阅即可。
8888

8989
显示当前数据库下的所有主题的信息。

docs/zh/14-reference/05-connector/40-csharp.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,13 @@ TDengine TSDB 其他功能模块的报错,请参考 [错误码](../../../refer
7171
| JSON | byte[] |
7272
| VARBINARY | byte[] |
7373
| GEOMETRY | byte[] |
74+
| BLOB | byte[] |
7475
| DECIMAL | decimal |
7576

7677
**注意**
7778

7879
- JSON 类型仅在 tag 中支持。
80+
- BLOB 类型不支持作为 tag 列,不支持 stmt 参数化查询绑定。
7981
- GEOMETRY 类型是 little endian 字节序的二进制数据,符合 WKB 规范。详细信息请参考 [数据类型](../../taos-sql/datatype)
8082
WKB 规范请参考 [Well-Known Binary (WKB)](https://libgeos.org/specifications/wkb/)
8183
- DECIMAL 类型在 C# 中使用 `decimal` 类型表示,支持高精度的十进制数值。因为 C# 的 `decimal` 类型与 TDengine TSDB 的 DECIMAL 类型在精度和范围上有所不同,

include/common/tmsg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2710,7 +2710,14 @@ void tFreeSRetrieveFuncRsp(SRetrieveFuncRsp* pRsp);
27102710

27112711
typedef struct {
27122712
int32_t statusInterval;
2713-
int64_t checkTime; // 1970-01-01 00:00:00.000
2713+
/*
2714+
Local timezone UTC offset in seconds (east-positive, e.g. +28800 for
2715+
Asia/Shanghai). Derived from taosGetLocalTimezoneOffset() on each
2716+
status report. Paired with the timezone string in
2717+
mndCheckClusterCfgPara: a mismatch is reported only when both the
2718+
timezone string AND this offset differ.
2719+
*/
2720+
int64_t checkTime;
27142721
char timezone[TD_TIMEZONE_LEN]; // tsTimezone
27152722
char locale[TD_LOCALE_LEN]; // tsLocale
27162723
char charset[TD_LOCALE_LEN]; // tsCharset

0 commit comments

Comments
 (0)